09-30-2012 09:32 AM
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.
09-30-2012 11:01 AM
yes, its called an append to file
09-30-2012 11:27 AM
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.
09-30-2012 11:38 AM - edited 09-30-2012 11:42 AM
@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
10-01-2012 10:24 AM
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
10-01-2012 10:57 AM
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.