LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make a while loop wait for input boolean?

Hi.
I'm trying to control a robotic arm with labview for my undergrad dissertation, and I have a decent polar coordinate control panel made, but there is one problem; it checks for changes in the coordinates every five seconds, while I want it to only check on the touch of a button (ie, go!, I've changed your coordinates!). The changes are calculated with a while loop comparing the last value of theta, x and z in a while loop with the current one. I can't find a way of putting that into a case structure. If there is a way of making the while loop progress at the push of a button, I think it would work. The VI's attached below.
 
Thanks in advance for any help.
Cathal Scanlon
 
ps, sorry about the mess, I'm going to reorganise the while loop into 2 if I can get the control button working.

Message Edited by CatScan on 02-08-2007 02:45 PM

0 Kudos
Message 1 of 3
(4,320 Views)
Have you tried using an event structure? To use one, right click on the structure to add an event. Set the event as whatever button you wish to monitor and set the event to "Value Change". If you put this inside a while loop any time the button is pressed, the event structure will run the contents inside the loop. There are a number of options to have the event structure activate.
 
 
 
 
*** Warning! I'm probably the last guy you want answering your labVIEW questions, but I figured I might be able to help.
0 Kudos
Message 2 of 3
(4,308 Views)
Dear Labviewnubie,
That seems to do the trick, I'll have to test it a bit more, but thank you, it looks good.
 
Cathal
0 Kudos
Message 3 of 3
(4,297 Views)