LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Append data to a table

Solved!
Go to solution

Hello, 

 

I am new to LabVIEW. I am working on a program for a project where I need to measure data populate a table when a button is clicked. 

Please see attached example VI even though it's not the actual program it explains only a simple part of it that I need help with. 

 

I need to write calculated values ​​​to the 1st and 2nd columns of the table each time when I click on the Read button. Most importantly I need to retain previous values ​​​​in the table and append new values ​​​to the table each time when I click the Read button. Attached VI I created does it exactly the way I want. But I used a local variable to get previous values ​​​from the table to append to new values. I am reading that's not a good practice to do it with a local variable like this. but I can't figure out a different way to do it. could someone explain to me why it's not good to do it with an LV as I have done and what's the best way to do it? Thank you  

0 Kudos
Message 1 of 3
(1,083 Views)
Solution
Accepted by ATX1122

Sorry, I don't have LabVIEW 2021 here, so I cannot see your code, but typically a shift register anchored on the toplevel loop is the way to go.

 

0 Kudos
Message 2 of 3
(1,069 Views)
Solution
Accepted by ATX1122

Simplfied, it could look as follows.

 

altenbach_0-1655883744978.png

 

 

(Both buttons are latch action. Other event is for the stop button)

Message 3 of 3
(1,062 Views)