Skip to main content
Submitted by tonyfoale on Mon, 07/07/2014 - 14:51

I have been trying to set soft limits but there are problems. Below is a code sequence showing a test and the results. I set a limit, move to a location close but under the limit, then I try to move beyond the limit. It goes a little past the limit but reports an error of zero. I try to move further from the limit but it remains still.
I return the table to zero and try to go way past the limit in one move. It moves close to the demanded position which is way past the limit. The feed is slow so it is not due to inertia.
What am I doing wrong?
Here is the command/answer record.
:FLB=3000
:TPB
0
:PAB=2900
:BGB
:TPB
2900
:PAB=3900
:BGB
:TPB
3171
:PAB=5000
:BGB
:TPB
3171
:TEB
0
:PAB=0
:BGB
:TPB
0
:PAB=5000
:BGB
:TPB
4757
:TEB
0

Comments 1

KushalP on 07/08/2014 - 17:22

tonyfoale,

The way the software limit works is as soon as you go past the limit, the controller profiles a decelerated stop for the motor. For example, I set a limit of 2000, and I issue a PA of 2500. As soon as my motor hits a position of 2000, the controller will command the motor to come to a decelerated stop. How quickly the motor comes to a stop depends on what your deceleration value is set to.

The counts that the motor goes over the limit is your motor coming to a decelerated stop. This stop becomes the controller's commanded reference position, as soon as the motor reaches it it is stopped. Since the reference position and the actual position are equal, your position error will be zero.

There are a few ways to reduce the amount of time, and position that the motor goes over the limit. First, make sure your motor is properly tuned, and then also try increasing the deceleration rate.

I used the same commands as you to illustrate this, note that the reference position (RP), and tell position are the same.

:DP0
:FLA=2000
:PAA=2500
:BGA
:TPA
2012
:TE
0, 0, 0, 0
:RPA
2012
:DCA=?
4096
:ACA=?
9216