08-25-2012 10:43 PM
Hi,
I have a cRIO 9114 that is running an RT application to control a servo motor using Soft Motion. The RT application is written to perform an immediate stop when a strain gage value exceeds a certain amount. During the velocity move, I pushed on the strain gage to trigger the immediate stop. The attached graph shows the result.
On the graph, I can see that when the force spikes, the setpoint immediately stops changing.
However, what I expect is that the Setpoint would immediatly change to the actual position as part of the immediate stop. What happens is that the setpoint holds where the immediate stop occurs, and the position continues to drive to the setpoint.
My questions are:
1) Is it expected that Immediate Stop uses the current Setpoint, not the current position as the new setpoint?
2) What is the preferred way to stop a motor at its current location?
Thanks
08-27-2012 10:51 AM
Hi SWalpole,
As seen in the Stop Mode function here:
http://zone.ni.com/reference/en-XX/help/371093M-01/nimclvfb/stopmove.mode_00b1005f/
The immediate stop should have it's "full torque is applied in the opposite direction to stop the motor(s) as soon as the command is received." So if this is the behavior you need, it would be the preferred method. From what you are describing, it looks like this isn't the case and the motor continues to move until it reaches the setpoint that was set before the Stop was called.
I am not able to see your screenshots, can you attach them again? Is it possible for you to attach a screenshot with the way your code is architected? Specifically where you writing and reading the setpoints and where you call the Stop function.
It also might be related to this Known Issue:
http://www.ni.com/white-paper/14069/en#327032_by_Category
where the reported velocity is incorrect when calling an immediate stop.
DylanC