LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

difficulty stopping stepper motor with a pressure reading above 10bar

In my system I am trying to put a maximum pressure of 10bar so the motor stops.  I have the stepper motor running and the pressure transducer calibrated so it reads the pressure in a vessal.  The problem is the pressure transducer is in a while loop and when the pressure reaches 10bar the loop continues and does not send the signal to the motor and so the pressure continues to rise until I press the stop button. 
 
The signal from the transducer is analogue but ive converted it to a boule with a simple greater than function
 
 
can anyone suggest a way of sending the signal to the motor during a loop cycle? 
 
Thanks for any suggestion
 
DAVE
0 Kudos
Message 1 of 3
(2,518 Views)

Hi dave222,

one solution could be to stop the while loop after the pressure reaches the 10bar mark and send after the while loop stops the signal to the motor. Another solution is to use queues for the communication between two loops. One loop to control the value and another to send the signal to the the motor. Or you insert a case structure into your while loop and insert there your function to stop the motor. This case will only execute if the pressure is high enough.

Hope it helps.

Mike

0 Kudos
Message 2 of 3
(2,514 Views)

Hi Dave,

It would be easier to see where your problem is if you would post your code.

Jim

LV 2020
0 Kudos
Message 3 of 3
(2,508 Views)