02-19-2009 10:18 AM
Hi All,
I've been using the sensor mapping express VI that is new in LV 8.6. When I place the express vi in my block diagram of my main vi I get the normal 'express' style configuration dialog. As a part of the configuration there is a really nice 'color-ramp' control where I can configure ranges; max; min; out -of-range colors and so on.
What I would like to do is have the color-ramp control appear as a control on my main vi's front panel. After I convert the express VI to a regular VI I can't seem to find the connection to this control. Although I have found the sub-vi that the expressvi uses in an .llb here:
C:\Program Files\National Instruments\LabVIEW 8.6\vi.lib\express\express 3d picture\SensorConfig.llb
Can anyone point me in the right direction to do this? I get so deep into all the sub-vi's I end up getting lost-haha!
Thanks - Paul
02-20-2009 01:22 PM
Hi Paul,
The color-ramp indicator looks like it is just a custom indicator. So you should be able to copy the color-ramp indicator from Configure Sensors.vi and paste it into your VI. Then, just right-click the color ramp indicator and choose Change to Write to turn it into a control.
02-20-2009 04:56 PM
Will,
Thanks for your reply. That is simple enough - but then how is data passed between the copied color ramp control that I place on my VI's front panel and the color ramp data needed to generate the actual color data used by the sensor mapping express VI? I can't seem to figure out how to pass the data. Is it like a global variable?
- Paul
02-23-2009 04:38 PM
Paul,
What do you mean by passing the values of the color ramp control to the color ramp data used to generate the actual color data used in the express VI? Do you mean you want to change the numeric range of the color ramp? Change the colors in the color ramp? Something else?
02-24-2009 11:22 AM
Will,
I'd like the end-user to be able to at least see the color ramp as an indicator. But even better than that would be if he could control it.
Say , for instance, I have a vi where the user can import an array of data points and display them as a sensor map. The way the express vi is currently, he can input his data points, run the VI, and if a datapoint happens to be out of range, there is nothing he can really do because the end-user doesn't have access to the color ramp as a control.
It seems like a lot to ask an end-user to go into the express vi's configuration dialog, change a configuration, then go back and run the main VI.
Thanks for your help - Paul
02-25-2009 04:52 PM
Paul,
Sorry if I'm misunderstanding you, but it sounds like what you want is to be able to programmatically change the max and min value of the color ramp, allowing all of your data points to show up in a relative color, no matter their value. Is this correct?
02-26-2009 09:34 AM
Will - I appreciate you taking the time to figure out what I'm trying to do.
Not really programmatically - but as a front panel control. So that the user can control the min & max, out-of-tolerance color, all while the program is running.
Maybe I could explain better what I am trying to do over the phone. Feel free to email me at paul.wintrode@bshg.com - we can discuss in more detail.
- Paul
02-27-2009 06:28 PM
The characteristics of the color ramp (max, min, colors) are all part of a "colorrampstuff" cluster that is inside the Sensor Mapping express VI. In order to change those values for the express VI, you will need to create a custom express VI that provides you with inputs to this cluster. This is done similarly to creating a subVI. Then you can use a variety of methods to write to the elements in this cluster and change them while the program is running.
It may be easier to place numeric controls on the front panel that write directly to the elements in the cluster than to use a color ramp as a control.