LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I retain the most recent values written to an array after the program is closed?

I have an array of counters inside a While loop. These counters keep track of inspection results (number good, bad and so on.) When I close and reopen the program these counters revert back to zero (the default values.) I would like them to retain the last value unless I press a button to zero each.

 

It seems like this should be pretty straightforward but I can’t figure it out. What am I missing?

0 Kudos
Message 1 of 3
(2,070 Views)

Save the values that you want to save to a file and read that file when you open the software to initilize the controls.

Tim
GHSP
0 Kudos
Message 2 of 3
(2,068 Views)

I second Tim's suggestion.

 

The reason is that you want the data to be stored for later retrieval when there is a power outage or if the PC is turned OFF. 

Anything that deals with volatile memory just won't do.

0 Kudos
Message 3 of 3
(2,052 Views)