Skip to main content
Submitted by LarryAhr on Thu, 07/17/2014 - 08:56

How can I determine which direction (fwd or rev) an axis is going? In this application the motor's direction (or polarity) can be reversed, depending upon how the machine is set up (cw=fwd or ccw=fwd). I could set a variable that indicates the intended direction, but that is not bullet proof. Is there a status variable that indicates if the motor is moving forward (+) or reverse (-)?

Comments 3

AndrewS on 07/18/2014 - 13:14

Hi LarryAhr,

You can use the command TV or its operand which will actual velocity in counts/sec. With a simple if statement, you can then determine if the direction is positive or negative.

Andrew

LarryAhr on 07/28/2014 - 14:10

Thanks for the reply, I think that will work. I can use the sign of the value to determine motor direction.