LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save numbers or data to array, so that I see it when i start sprogram

Hi, I would like to ask, How I can to save data to array so that i see it when I close and repeat open program. I want to save Time and Temperature.

Thank you.array.png

0 Kudos
Message 1 of 4
(3,127 Views)

If this is a Front Panel Control (or Indicator), while you are developing the VI, you can (programmatically or manually) set all of its values as you want them to be when the VI is saved and when it is used.  Once you have the values set the way you want them to be "by default", select the Control or Indicator, go to the Edit menu, and choose "Make Selected Values Default".  Now (and this is the step I usually forget to do) save the VI.

 

If you now close LabVIEW, then restart it and open your VI, you will see that the Control or Indicator has the initial Default values you saved in it.

 

If you open the Edit menu without having anything selected, you will see "Make Current Values Default".  Be careful if you use this, as this affects all of the Controls and Indicators on your Front Panel -- be sure this is what you intend to do.

 

Bob Schor

Message 2 of 4
(3,107 Views)

In addition to what Bob said, if you want to save values changed at run time (as opposed to development time), then you must use a configuration file. This is because the default values are part of the program and the program cannot change itself at run time.

 

Lynn

0 Kudos
Message 3 of 4
(3,092 Views)

If you just want to save the VI with the words "Time and "temperature" in the first row, you should instead use a table indicator and use the table headers.

If you want to actually save the acquired data between runs, you need to save them to a file when the program ends. You could also stream them to disk as they are acquired, then load them from that file when you open the program. Of course you also need a mechanism to reset the data, etc.

 

We can probably give more targeted advice if you would show us your actual VI.

0 Kudos
Message 4 of 4
(3,070 Views)