LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GUI for Displaying Data from Array of Values

Hello,

 

I'm developing a program for displaying data to a user based on an array imported through a .csv file. The rows of the array are channels (0 through 128) and the columns have the characteristic data about that channel (units, mulitplier values, if the channel is used, etc.). Ideally I would like to have a Main VI which brings in the .csv file and allows the user to select an individual channel (preferrably though a button). Once the user clicks on the button I would like to display the information about that channel (value, units, address).

 

I am able to load the .csv into the program as an array but am stuck from there.

 

Any suggestions?

 

Thank you!

0 Kudos
Message 1 of 4
(3,221 Views)

Once you have a 2D Array you can use the "Index Array" function and wire either the row or column. You can leave the other one empty to get the entire 1D array of data in the unwired index. For instance, if you wire Column = 2 you will get the entire 3rd column of data in a 1D array. You can then use "Array to Cluster" and send your data to a cluster with all the correct names you wish to label the data with.

 

If you are still stuck, please upload a VI with characteristic data (either the CSV or saved as a constant on the block diagram).

0 Kudos
Message 2 of 4
(3,213 Views)

Do you want to pull the data out of the array and display them in string controls or do you want to use the array control itself to display the values?  Either way is quite simple.  Use the index array function to pull the data values out or use an Index Values property node to set the desired row as the only visible item. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 4
(3,205 Views)

I'm not a fan of the LabVIEW Array controls/indicators for displaying large amounts of data - I tend to use a table control/indicator. There are mouse events you can register for and a method that allow you to get the row/column that the user has clicked on - you can then use that to display the relevant information somewhere appropriate. You can also do neat things like highlight the row by setting properties on the table (e.g. row background colour).

 

Tree controls can also be useful for displaying large amounts of data - but as they can take a while to redraw, it's best to only update them once or occasionally - you wouldn't want to do it in a tight loop.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 4
(3,183 Views)