07-28-2014 12:14 PM
I have a 2D array control (or indicator) CH x T : each cell of the array contains the voltage recording for the channel and at the time represented by the respective row and column.
I would like to be able to scroll the data by showing the channel names and the time values in the Index display instead of the numeric values.
For example, instead of seeing 0,1,2,3 etc as row index values I would like to see Channel1, Channel2, Channel3 etc.
Is this somehow possible?
Any idea is very welcome!
Thank you in advance!
Cheers.
MG
Solved! Go to Solution.
07-28-2014 12:35 PM
The easiest solution is probably to use a table indicator instead of an array, so that you can set the row and column headers. You can either enter the headers while editing the front panel, or you can set them programmatically using a property node for the table. Tables only display strings, so you will need to convert your data array to strings, but many of the number-to-string conversion functions accept arrays so this is simple.
07-28-2014 11:22 PM
Do you mean you want to display only 1 text value at a time? If that is the case why don't you try using a Ring control with the Channel names along with the time value concatenated and scroll up/down the ring to change the values.
07-29-2014 06:47 AM
If you want to display the data as a 2D array, but use channel & time as the Index display, you can use Text rings and an Event structure. You can shrink the display of the array if you only want to show one value.
07-29-2014 06:54 AM - edited 07-29-2014 06:56 AM
Doh! Or, you could do this - http://digital.ni.com/public.nsf/allkb/64DCAB86E5E0D83886256E5F005E9B96 Customize the array control by replacing the numeric indicators with Text rings.
07-29-2014 07:24 AM
Hello jcarmody,
this is exactly what I was looking for!
Thanks a million!
MG
07-29-2014 12:55 PM
Cool!
But the strings can only be edited in "Customize Control"
I could not see a property node to be able to edit the "Strings And Values [ ]" of the Text Ring of the array index?
Even better if you could edit the strings in the Test Ring at run time.
07-29-2014 02:03 PM
@jcarmody wrote:
Doh! Or, you could do this - http://digital.ni.com/public.nsf/allkb/64DCAB86E5E0D83886256E5F005E9B96 Customize the array control by replacing the numeric indicators with Text rings.
Oh how neat. I can't think of a time when I would want to do something like this instead of using a listbox, but I like it because I didn't know you could do it.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord