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 ...
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 ...
Moves not getting to position
We have an odd situation with an MC4N running EtherCAT drives. The issue is that axis 1 is not getting to the commanded position via MOVEABS. The command MOVEABS is where we are hanging because the move seems to cancel. We did a the test with all ...
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 ...