LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save the last value

hello
 
is there a way to register an that the last value of an numeric indicator in a  file LVM OR EXCEL

 

OR

 

THE inside a LabVIEW program is even better, for example in VI memory if there exists, or another trick I do not know.

 

and thank you.

0 Kudos
Message 1 of 6
(3,123 Views)

yes, its called an append to file

0 Kudos
Message 2 of 6
(3,111 Views)

bilalus wrote:

is there a way to register an that the last value of an numeric indicator in a  file LVM OR EXCEL


There is no real "last value", because your VI will exceeed the range if I32 within milliseconds. When you stop the VI, the last value will be in the indicator. (what is the meaning of "register"?)

 


@bilalus wrote:

THE inside a LabVIEW program is even better, for example in VI memory if there exists, or another trick I do not know.


VI memory always exists and there are probably many tricks that you don't know. However, I have no idea what you actually want.

Do you want to save the VI with a certain default value. Do you want to retain the current value between runs? Something else?

Your feedback node alredy retains data between runs. If you always want to start with zero, you need to initialize it.

0 Kudos
Message 3 of 6
(3,103 Views)

@bilalus wrote:

hello
 
is there a way to register an that the last value of an numeric indicator in a  file LVM OR EXCEL

 

OR

 

THE inside a LabVIEW program is even better, for example in VI memory if there exists, or another trick I do not know.

 

and thank you.


Assuming that you want to save the last value to reload it when you restart the program, it is usually done with the Configuration File VIs.  You will find these VIs in the File I/O palette. Look at the LabVIEW help on how to use them. Do not put them in the while loop (by-the-way you should put a delay in your loop)

 

Ben64

0 Kudos
Message 4 of 6
(3,097 Views)

But more accurately I want to achieve an energy meter in electric labview
 
meter works well and accumulates energy
 
my problem is how to preserve or save the last accumulated value  in case   labview exit or stop PC
 
 
In the relaunch LABVIEW it must retrieve this value and insert into the meter as the initial value.

 

THANKS

0 Kudos
Message 5 of 6
(3,056 Views)

Whenever the value changes, you need to write it to a special file (e.g. "yourApp.ini"), overwriting the old value. When LabVIEW starts the next time, it should check for the existence of that file, and if present, read the value.

0 Kudos
Message 6 of 6
(3,047 Views)