LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using and Indexing Tables

Hi, I'm fairly new to LabVIEW and had a few questions in regards to a VI I'm building.

I would like to be able to enter in a pressure profile into a table (basically a pressure and time the system stays at that pressure).  However, the built-in tables that I've found only use the string format.  Is there a standard table for using numeric values, or do I have to build the table from scratch?  I could not seem to find a way to format the table to use numeric values.

In addition, I'm trying to use a timer in order to look up the associated pressure value.  For instance, if 10 minutes have passed, use that time to look up the pressure from the table.  Is this most easily accomplished by indexing?  I also saw a look-up table, but was unsure if there is a more appropriate tool to use.

Does anyone have some advice or could you point me in the right direction?  Thanks in advance for your time.
0 Kudos
Message 1 of 5
(3,189 Views)
Hi drfunkphd,

well a table is just a 2d array of strings...
There are other ways to store your time/pressure pairs. Maybe a 2d array of DBL would be ok? Or an array of clusters of [time, pressure] using different representation for each value?

To look up the pressure by time you have to add up the time values for each pressure value and the use "Threshold 1D Array" to find the index of the pressure valueSmiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,186 Views)
Thanks for the help.  I just had another follow-up question  (maybe I'm just not too familiar with the formatting in LabVIEW).  Whenever I use a pre-made table, it uses the string format.  Is there such a table that uses say the double format?  Or can you change the format of the table? We're trying to use a table on the front panel, because of user-friendliness.  Sorry for the tedious questions, I'm just new with this software.
0 Kudos
Message 3 of 5
(3,180 Views)
The table control is just strings. There's no numeric version. However, you can just create a 2D array of numbers. Place an array container on the front panel and then place a numeric control inside the container. It won't look like a table, though.

To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
0 Kudos
Message 4 of 5
(3,166 Views)
Ok, I think we're at a good starting point.  Thanks again for all the help guys.
0 Kudos
Message 5 of 5
(3,163 Views)