LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Turn off a motor once a while loop has terminated

Solved!
Go to solution

Hi,

 

I currently have a motor which is controlled by a Boolean switch (Motor On/Off) but when I terminate the while loop (stop button), the motor will continue to run as the switch is still on. I want the motor to turn off once I press the stop button. Currently I must turn off the motor before I terminate the loop.

 

I have attached a photo and the VI.

MotorProject.JPG

Thanks in advance.

0 Kudos
Message 1 of 3
(2,279 Views)

Simply add a sequentialized digital output with FALSE constant after the loop.

Other solution is to set the output state in AND with the NOT(STOP) button.

0 Kudos
Message 2 of 3
(2,260 Views)
Solution
Accepted by topic author kevlenahan11

Put a separate "Turn On Motor" Express VI on the output side of the While Loop, bring the wire from the Stop switch through the output side of the While, connect it to a Not, and wire it to "Turn On Motor" (because of the Not, it will turn the motor Off).

 

Bob Schor

Message 3 of 3
(2,249 Views)