LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Exit the while loop inside the events structure

Hi,
I'm new to labview development. Following is my project description.
 
I'm using while loop to read DAQ Max input to capture user press on the machine button. Basically I read to read the 2 start button to ensure the user are pressing the 2 button together as a safety purposes.
 
Then I created a events structure inside seperate while loop to fire the events. The events will be fire when both button continusly press by user.
Inside this fired events, I have 1 while loop to continue monitor the 2 buttin status to ensure user did not release until the machine ARM going down & hit the limit switch which is anotoher input to the DAQ Max card. The loop will be exit one the limit sw change to TRUE. If the user release the 2 button before the ARM hit the limit sw, it suppose to move back the ARM.
I have another flat sequence structure to turn on the machine ARM.
 
Problem.
Once it hit the limit sw, I release the button, it still move back the ARM & the whole program halted & do not response to anyhings I press.
 
 
 
 
 
0 Kudos
Message 1 of 4
(3,026 Views)

Although you have explained the problem in detail, we can probably answer better by taking a look at the concerned VI

Please post the VI so that we could take a look at it give you an useful solution

0 Kudos
Message 2 of 4
(2,997 Views)

Hi Steven,

It is always advisible to avoid much of coding inside the event staructure case.

In your case, i guess, you are monitoring the state of both the buttons (which you are acquring from Daq card).

Instead, why dont you make a boolean true and then perform the checking in another while loop with the termination terminal using the sates of these two buttons.

I hope you got my idea.

0 Kudos
Message 3 of 4
(2,983 Views)
I take it as a backup you have real hardware, (i.e. the two start buttons wired in series to a relay in series with  the actuator?  I would not trust software to keep from loosing a limb.
 
0 Kudos
Message 4 of 4
(2,969 Views)