LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using table data to change numerical control values over time

In my labview programme, I am looking to change a numeric control's value over different time changes instead of manually changing the values which running the system.

e.g.

numerical value = 5    hold for 5 second

numerical value = 7.2 hold for 2 seconds

numerical value = 15 hold for 1.5 seconds

 

This list can be long, and I want to input it into a table in Labview and have the 2 columns (numerical value and time duration) to be linked to two numeric controls on the programme. The commands will run in a sequence, so once the time duration of the first row is finished, it will move on to the second row and change the value to 7.2 for another 2 seconds and so on.

 

Is there anyway to connect a table to numeric controls? And then later change the data in the table to run a different sequence.

Thanks for your help.

0 Kudos
Message 1 of 4
(2,916 Views)

Hi LRUCL,

 

The commands will run in a sequence

Your VI will not run "in a sequence", but it will run in a LOOP! (And you should not use a table, but an array…)

And if you combine this with the elementary autoindexing feature of LabVIEW's loops your task will be more than easy!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,909 Views)

If you want it to be a set sequence, why would you ever make it a control?  A control can be changed while the program is running.  This seems contrary to what you want.  Change your logic to use a constant instead of the control.

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

GerdW wrote:  (And you should not use a table, but an array…)

A table is just a 2D array of strings.  A simple FOR loop with autoindexing should do the trick quite easily.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,824 Views)