LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reset toggle after sub vi is called

Hello all,

I have this simple sub vi written (and attached).  It is used in conjunction with a main program.  What I want is that when a user hits the "set frequency and voltage button" the sub vi is called and the user inputs the new data and then hits a continue botton to return to the main program.  The vi is called ok and the inputs work fine but the toggle button to select continue stays in the high or on position so that in the next loop of the program the sub vi is called again.  I do not want this to happen but want the toggle to be reset so that the user can chose when or when not to set the frequency.  I think this should be simple but I can't figure it out....

Thanks a lot!!!!!!!

Azazal

Azazel

Pentium 4, 3.6GHz, 2 GB Ram, Labview 8.5, Windows XP, PXI-5122, PCI-6259, PCI-6115
0 Kudos
Message 1 of 4
(2,595 Views)
Azazel,

Pop up on the control and set the Mechanical Action to Latch when Pressed or Latch when Released.

Lynn
0 Kudos
Message 2 of 4
(2,588 Views)
The simple answer is to change the mechanical action of the continue button to latched. If you were to right click on the termination terminal of a while loop and select Create>Control, a button with the correct mechanical action would have been created for you. You also have a problem is that the loop is constantly sending commands over the GPIB bus until the user clicks continue. This will happen no matter whether the values change or not. and just result in an awful lot of unneccessary bus traffic.  You could use an event structure to only send commands when a front panel value changes. You could also put all of the GPIB write commands outside the while loop so that the user can make some changes and then when continue is clicked, the GPIB commands are sent once. I've attached a picture to show you what I mean.
0 Kudos
Message 3 of 4
(2,585 Views)
Thanks!!!! Changing the mechanical action worked like a charm

Azazl

Azazel

Pentium 4, 3.6GHz, 2 GB Ram, Labview 8.5, Windows XP, PXI-5122, PCI-6259, PCI-6115
0 Kudos
Message 4 of 4
(2,578 Views)