LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can we save a True or False state in Labview?

I'm using Labview 4.01 and I'm trying to control my testing process. In
this case, I have 3 gas cylinders and every one of them can be turned on
or off through the digital out lines. After one tank is empty, I can
turn it off and turn on another one. My question is, how we can save
this status either it's true or false so next time, we can open the
other one instead of this empty one. After this one is turned off, I can
show its state with an indicator, but the program can not read an
indicator, so we still can not check the state of this tank. Any one
have a solution for this problem?

Thanks in advance,

Guangde Wang
0 Kudos
Message 1 of 4
(1,628 Views)
Guangde Wang wrote:
>
> I'm using Labview 4.01 and I'm trying to control my testing process. In
> this case, I have 3 gas cylinders and every one of them can be turned on
> or off through the digital out lines. After one tank is empty, I can
> turn it off and turn on another one. My question is, how we can save
> this status either it's true or false so next time, we can open the
> other one instead of this empty one. After this one is turned off, I can
> show its state with an indicator, but the program can not read an
> indicator, so we still can not check the state of this tank. Any one
> have a solution for this problem?
>
> Thanks in advance,
>
> Guangde Wang

Your version is too old. So I believe that saving data in any kind of
configuration file will
do the job (like .ini or .conf).

It also depends on if you are closing application between your vi runs.
If you don't remove the vi from memory, you have a chance to use global
or functional global to store your state.

In latest versions you can do it another way.
--
Sergey Krasnishov
____________________________________
Automated Control Systems
National Instruments Alliance Member
Moscow, Russia
sergey_acs@levsha.ru
http://acs.levsha.ru
0 Kudos
Message 2 of 4
(1,628 Views)
It is very easy. You can always read an indicator by using a local variable.
To create a local variable, point your indicator, click on the right mouse
button and choose "create-> local variable". It will be created in your diagram.
This local variable will have the same name as the original indicator. By
then selecting the local variable and clicking on the right mouse button,
you can change it to read or write variable.

Maybe you should read the manuals coming with Labview. It's all explained
and is part of the Labview basics.
0 Kudos
Message 3 of 4
(1,628 Views)
Dear Lionel Reynaud:

Thank you for helping me. I didn't know before that we can read from a indicator or
write to a control, so this problem had been puzzling me for days, I couldn't figure
out a solution. your answer solved my exact problem.

Thank you again,

Guangde Wang


Lionel Reynaud wrote:

> It is very easy. You can always read an indicator by using a local variable.
> To create a local variable, point your indicator, click on the right mouse
> button and choose "create-> local variable". It will be created in your diagram.
> This local variable will have the same name as the original indicator. By
> then selecting the local variable and clicking on the right mouse button,
> you can change it to read or write variable.
>
> Maybe you should read th
e manuals coming with Labview. It's all explained
> and is part of the Labview basics.
0 Kudos
Message 4 of 4
(1,628 Views)