erikj Posted February 16, 2011 Share Posted February 16, 2011 Hi DT Support, I noticed the following behavior wrt Motor[x].DesVelZero which disagrees with the PPMAC SW Reference manual (Power PMAC Status Data Structure Elements). The manual says: The Motor[x].DesVelZero status bit is set to 1 if the motor is in closed-loop control and the commanded velocity is zero (i.e. it is trying to hold position). It is zero either if the motor is in closed-loop mode with non-zero commanded velocity, or if it is in open-loop mode (enabled or disabled). It is bit 14 of 32-bit element Motor[x].Status[0]. I am seeing that the value is 1 (true) if the servo loop is open. See the example below. First status is for the loop closed, second one is for loop open. You can see the closedLoop and ampEna flags change state, but the desVelZero flag remains the same. Servo loop is closed at start:Status: Motor[1].pos: -0.5Status: Motor[1].vel: 0Status: Motor[1].desVelZero: trueStatus: Motor[1].closedLoop: trueStatus: Motor[1].ampEna: trueStatus: Motor[1].inPos: true Opening the loop...Status: Motor[1].pos: 1.07031Status: Motor[1].vel: 0Status: Motor[1].desVelZero: trueStatus: Motor[1].closedLoop: falseStatus: Motor[1].ampEna: falseStatus: Motor[1].inPos: false Is this behavior correct? Thanks, Erik Link to comment Share on other sites More sharing options...
bradp Posted February 16, 2011 Share Posted February 16, 2011 The documentation is wrong. The motor can be closed loop, open loop, or killed. When closed loop the bit will be 1 when the commanded motor velocity is zero even if the actual velocity is not zero. When open loop or killed it will be 1 when the actual velocity of the motor is zero. You can AND it with another bit such as Motor[].ClosedLoop if you want to distinguish that case. Link to comment Share on other sites More sharing options...
Recommended Posts