MOVEABS not ending in Target positon

MOVEABS not ending in Target positon

The cause the problem is that a MOVEABS takes ENDMOVE of the previous move as the start point.  When we cancel the move in the MTYPE, it stops before ENDMOVE so it is not a valid start point any more.

Here is a possible solution but it is not perfect.  The end position is not exact but it is close.

PRINT""
SERVO AXIS(0) = ON
UNITS AXIS(0) = 1000
SERVO AXIS(1) = ON
UNITS AXIS(1) = 1000
WDOG = ON
MERGE = ON

SPEED = 2000
ACC(SPEED * 10)

decel_dist = SPEED ^ 2 / (2 * DECEL)

DEFPOS(0)

first_endpointx = 2000
first_endpointy = 1000
second_endpointx = 2500
second_endpointy = 1700

TRIGGER
MOVEABS(first_endpointx, first_endpointy)
WAIT LOADED
WAIT UNTIL REMAIN < 1000
GOSUB calc_xy_decel

MOVE(second_endpointx - DPOS AXIS(0) - decel_distx, second_endpointy - DPOS AXIS(1) - decel_disty)
CANCEL

' print the positions
WA(1)
PRINT "After CANCEL "; DPOS AXIS(0), DPOS AXIS(1), ENDMOVE

WAIT IDLE
PRINT "End positions  "; DPOS AXIS(0), DPOS AXIS(1), ENDMOVE

STOP

calc_xy_decel:
    decel_distx = (DEMAND_SPEED AXIS(0) * 1000) ^ 2 / (2 * DECEL)
    decel_disty = (DEMAND_SPEED AXIS(1) * 1000) ^ 2 / (2 * DECEL)
    PRINT DEMAND_SPEED * 1000
RETURN

    • Related Articles

    • Moving traverse from point to point repeatedly

      2 suggestions: 1. Move to positions BASE(0) REPEAT MOVEABS(position1) MOVEABS(position2) UNTIL event=TRUE 2. Move to sensor position1 and position 2 are set to be beyond the sensor postion BASE(0) REPEAT MOVEABS(position1) WAIT UNTIL IN(1)=ON CANCEL ...
    • 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 ...
    • 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 ...
    • 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 ...
    • MOVEABSSEQSP type problem

      Work out how many points per second are being executed in the MOVEABSSEQSP. If more than one per msec then that is not possible even with the MOVEABSSEQ type move. The other consideration is the vector length in the buffer. The LIMIT_BUFFERED value ...