Jump to content
OMRON Forums

Hitting End-Limit switches while using 2 PID filters in series.


meindert.norg

Recommended Posts

LS,

Summary:

  • Observation: Motor runs fast in opposite direction after hitting Positive end-switch.
  • Cause: Configuration of "Overtravel Limit Use Bit" for motor #2 servo, which was used in series with #1 servo.
  • Solution: Ignore Overtravel Limit switches for #2.
  • Technical nitty gritty:
    1. When a motor hits an EndSwitch, moves in that direction are forbidden.
    2. When using 2 filters in series (#1 and #2), the #2 filter receives the #1FilterOutput through the #2MasterPosition input into its #2FollowingError.
    3. Positive changes to the #1FilterOutput are forbidden and ignored...
    4. ... but Negative changes to the #1FilterOutput are forwarded to the #2 Filter.
    5. In the presence of noise in #1FilterOutput, the result is a (fast) changing input in the negative direction for the #2 Filter...
    6. ...resulting in a large negative force on the motor...
    7. ... resulting in the motor moving away from the EndSwitch in an unexpected fast manner.

 

Details:

While testing Limit Switches (MLIM and PLIM) I noticed that everything worked according to expectation when using only one PID filter, but when using a second filter in series with the first filter, the motor would 'shoot back when hitting a Limit-Switch'.

 

It is noteworthy to mention that I used manual switches for this test. The consequence is that if the motor moves away from the switch (as explained), the switch is not released as it would be if the switch was actually operated by the motor. In that case, the problem stated below is still true, but 'solves itself' automatically after the motor moves away from the switch. Still, the motor would experience an undesired jump in the opposite direction after hitting an End-Switch.

 

I placed the filter from a #2 (unused motor) filter in series with the filter from my #1 motor, using the procedure from page 168 in the Turbo PMAC User Manual. This gave me to option to use both a low pass filter and a notch filter for my servo.

 

When ready to engage the inner loop as well, do the following:

1. Set Ixx01 for the outer-loop motor to 2 to point the output to an X register. This also disables

commutation for the motor if you had been using it before.

2. Set Ixx02 for the outer-loop motor to the address of an open register, usually $0010Fx.

3. Set Ixx00 for the inner-loop motor to 1 to activate it.

4. Set Ixx01 and Ixx02 for the inner-loop motor to the same values you had for the outer-loop motor

when running it alone. If commutating with Turbo PMAC, also set Ixx70 – Ixx84 for the inner-loop

motor to the same values you had for the outer-loop motor.

5. Set Ixx24 and Ixx25 flag parameters for the inner-loop motor to the same values you had for the

outer-loop motor when running it alone.

6. Set Ixx03 and Ixx04 feedback address parameters for the inner-loop motor to the address of a register

that will always be set to 0. Register $35C0 at the end of the conversion table is suggested.

7. Set Ixx05 for the inner-loop motor to the same address as the outer-loop motor’s Ixx02 to pick up the

intermediate value.

8. Set Ixx06 for the inner-loop motor to 1 to enable the use of the Ixx05 register.

9. Set the Ixx07 master position scale factor for the inner loop motor to 1.

10. Set gain term Ixx30 for the inner-loop motor to 65,536, and Ixx31 – Ixx39 to 0. This should make the

inner loop a pass-through and your performance should be the same as with the outer loop alone.

11. Now adjust the gains of the inner-loop motor to get the additional filtering you desire.

Cascaded Loops for Single Quantity Control

Servo

 

In step 5 the procedure tell you to copy the Motor xx Flag Mode Control settings from the original motor (in my case #1) to the servo that is to be placed in series with the first motor (in my case #2). I used I124 = $800001:

  • $1 = PMAC2 style.
  • $80000 = Fault bit polarity

This setting responds to EndSwitches by:

  • Stopping the motor
  • Ignoring any further positive commands, untill switch is released.

 

When jogging in positive direction, and hitting the Positive Endswitch, the motor would immediate start running very fast in the opposite direction, as indicated in the measurement below.

 

EndOfStrokeSwitches_18_Forum1.png.9dc7a5cae090aabe59d27b6341193d4a.png

 

When zooming in to the event of hitting the EndSwitch, we observe that only negative (allowed) changes in the #1FilterOutput are forwarded to the #2FollowingError.

 

EndOfStrokeSwitches_18_Forum2.png.3cee5e41f69c69487e2d6aa12cb48c88.png

 

This causes the #2filter to output an increasingly large negative value, making the motor accelerate in the negative direction.

 

This problems is solved by ignoring the Endswitch flags for the second motor: #224 = $820001.

 

regards,

 

Meindert

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Guest
This topic is now closed to further replies.

×
×
  • Create New...