How do I limit movement to one direction to stop reversal of the axis?

How do I limit movement to one direction to stop reversal of the axis?

If it is an axis with a REP_DIST and REP_OPTION set to 1, then when the end position is “behind” the current position, add the REP_DIST to the MOVEABS target position value.

IF new_position - DPOS < 0 THEN
    New_position = new_position + REP_DIST
ENDIF
MOVEABS(new_position)

If the axis is moving at the time you want to load the new moveabs, then compare with ENDMOVE.

IF new_position - ENDMOVE < 0 THEN
    New_position = new_position + REP_DIST
ENDIF
MOVEABS(new_position)

Otherwise with the same logic, simply do not load the move.
    • Related Articles

    • What is the accuracy on the UNITS / REP_DIST?

      Q: What is the accuracy on the UNITS / REP_DIST?   UNITS = 2^23*3/360 '    Counts/deg   REP_DIST = 180 '   deg   REP_OPTION = 0 '            [-REP_DIST..REP_DIST] As UNITS is approx. 69905.0667 then what will happen when I have run the system for ...
    • 'Forward' speed change during move

      FORWARD commands do not need to buffer. Just set FORWARD once and leave it running. You can change SPEED any time on the fly. SPEED set to 0 will stop the axis. A negative SPEED value will make the axis move in reverse. You only need to CANCEL when ...
    • Following error

      We have a customer with a MC664x that has an issue with FE in a master axis. The machine is a printer and the axis is a rotary axis controlled by speed. The FE_LIMIT is configured at maximum value (4.0e17). He sends a video where we can see how FE is ...
    • Touch probe problem when motor direction reversed

      With EtherCAT touch probe it is not possible to reverse the axis direction with ENCODER_RATIO and STEP_RATIO. Instead you must reverse the direction in the servo drive itself. Check the operating and setup manuals for the drives you have connected to ...
    • AN-307 Move Embedded Parameters

      Move Embedded Parameters are a new feature within the Trio MC4XX Motion Coordinator system software. Each move can have up to 2 user parameters per axis pass through the motion buffers and become available during the motion for processing. The first ...