LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to reinitialise a control value to default each time the program redo his cycle in a while loop ?

Is it possible to reinitialise a control value to default each time the program redo his cycle in a while loop ?
My problem is that I have a numeric control (0 or 1) and I want taht wahn the numeric is 1 labview makes the writing process of my data but after that the control must return to 0 to write only one time.
Is it possible ? I've tried some trials but none of them succeded
0 Kudos
Message 1 of 5
(3,059 Views)
Hi sims,

1) You can reinitialize only all controls and indicators in your program. You need open reference to your vi ( Open VI reference that founds in Application Control palette) and create method "Reinitialize All To Default".

2) Why you want use this method. You can set control value by it property. Create property node of your numeric, select "value" property, change it to "write" mode and set it to 0.
0 Kudos
Message 2 of 5
(3,059 Views)
well i'm student and i have to write a program for school i don't know labview very well.
i post here the part of the program i have to do so you can see what i must do .
The button pass with datasocket so i can't use boolean and the problem is that the value must be set to 1 only for one cycle (one writing of the values). so when th people set it to 1 in internet explorer for exemple the value must be considered as a impulsion and as it is it always do a lot of cycle until the man set it manualy to 0 what i don't want.
0 Kudos
Message 3 of 5
(3,059 Views)
> 1) You can reinitialize only all controls and indicators in your
> program. You need open reference to your vi ( Open VI reference that
> founds in Application Control palette) and create method "Reinitialize
> All To Default".
>
> 2) Why you want use this method. You can set control value by it
> property. Create property node of your numeric, select "value"
> property, change it to "write" mode and set it to 0.
>

Even better is to use a local variable to the control, and better than
that, if the user isn't changing this interactively is to use an
indicator and write to the terminal. If this doesn't need to show up on
the UI at all, don't use a control or an indicator and instead use a
bit of wire and a shift register.

Greg McKaskle
0 Kudos
Message 4 of 5
(3,060 Views)

Hi Greg,

I have similar problem also....even I make the value reinitalise to default using Invoke method and also by wiring a 0 constant to its local variable I could not able to reinitalise the counter value  to every time I start my cycle....what may be the solution then????..

 

Regards

0 Kudos
Message 5 of 5
(2,872 Views)