LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change values of front panel controls using values from excel

Hello all,

 

I am very sure someone has ask this before, but I can't seem to find the answer. Anyways.

I have an excel file that looks like this:

time, value1, value2, value3 

0 ,   1 ,  2 , 3

10,  1 ,  2 , 3

15,  1 ,  4 , 3

30,  5 ,  4 , 3

 

So, at time 10, I want the value of my control1 on the front panel to be 1, essentially following the value indicated by the excel file as time elapses. What is the simplest way of doing that?

 

Thanks.

0 Kudos
Message 1 of 3
(2,173 Views)
Here's one way of doing it (see attached). If you actually have controls instead of indicators, just use property nodes. This assumes that your spreadsheet will always start from time 0. Also, this requires that your Excel file is first exported into csv.
0 Kudos
Message 2 of 3
(2,163 Views)
Ugh. . . Forum seems to be losing my attachment. Basic principle: Read from Spreadsheet. For loop with a shift register for time point, initialized to zero. Inside of the for loop, a time delay for the difference in the current value from the spreadsheet from the last timepoint in the shift register. Index array to update shift register with new timepoint and update the indicators. Note, I used the dirty trick of a single frame flat sequence with an error cluster wired through it to enforce execution order of the updates.
0 Kudos
Message 3 of 3
(2,161 Views)