What MC_GrpStop Does

MC_GrpStop performs a controlled motion stop of all axes in a coordinated motion group.

See Differences between MC_GrpHalt and MC_GrpStop.

Example

This example demonstrates a linear coordinated move with a starting point of (0,0) and an endpoint of (200, 0).

  • MC_GrpStop is called while the linear coordinated move is still moving to the endpoint.
  • In the oscilloscope, the path velocity reaches zero (approximately [100,0]) before the linear coordinated move reaches its endpoint value.

Linear Move Parameters

MC_GroupStop Parameters

Velocity = 100

N/A

Acceleration = 200

N/A

Deceleration = 200

Declaration - 75

Jerk = 0

Jerk = 0

Inst_MC_GrpReadCmdPos(TRUE, Group1_ref, CS_ACS, CmdPositionArray);
Inst_MC_GrpReadCmdVel2(TRUE, Group1_ref, CS_ACS, VelocityArray);
CASE MC_MoveCounter OF0: // Enable the group
Inst_MC_GrpEnable(TRUE, Group1_ref);
Inst_TON3( true, t#1500ms );	// Allow for turning on the scopeIF ((Inst_TON3.Q) and (Inst_MC_GrpEnable.Done OR Inst_MC_GrpEnable.Error)) THEN

     Inst_TON3(false, t#1s);
     IF (Inst_MC_GrpEnable.Error) THENPrintMessage( LEVEL_INFO (*DINT*),  'MC_GrpEnable failed - ErrorID: ' + any_to_string(Inst_MC_GrpEnable.ErrorID));
     END_IF;

     Inst_MC_GrpEnable(FALSE, Group1_ref);
     MC_MoveCounter := MC_MoveCounter + 1;
END_IF;

1: // Perform Linear ABSOLUTE move start (0,0) end (200,0)
PosAbs[0]:= 0;
PosAbs[1]:= 200;
PosAbs[2]:= 0;

pathVelocity := Inst_MC_GrpReadCmdVel2.PathVelocity;

Inst_MC_MoveLinAbs(TRUE, Group1_ref, PosAbs,Velocity, Acceleration, Deceleration, Jerk,
     CS_ACS, BM_ABORTING, TM_NONE, TransParam);

Inst_TON3(true, t#600ms);	//Allow for the move to reach path velocity before calling MC_GrpStopIF Inst_TON3.Q  THEN
     MC_MoveCounter := MC_MoveCounter + 1;
     Inst_TON3(false, t#100ms);
END_IF;

2: //Perform a stop on the group
stop_deceleration := 75.0;

pathVelocity := Inst_MC_GrpReadCmdVel2.PathVelocity;

Inst_MC_GrpStop(TRUE, Group1_ref, stop_deceleration, default_jerk );

Inst_TON3( true, t#200ms );
IF ((Inst_TON3.Q) AND (Inst_MC_GrpStop.Done Or Inst_MC_GrpStop.Error)) THENIF Inst_MC_GrpStop.Error THENPrintMessage( LEVEL_INFO (*DINT*), 'Step '+any_to_string(MC_MoveCounter)+',MC_GrpStop ERROR. ErrorID('+any_to_string(Inst_MC_GrpStop.ErrorID)+'), Description:'+MC_ErrorDescription(any_to_int(Inst_MC_GrpStop.ErrorID)));
     END_IF;

     Inst_TON3(false, t#100ms);

     Inst_MC_MoveLinAbs(FALSE, Group1_ref, PosAbs, default_velocity, default_acceleration, default_deceleration, default_jerk,
CS_ACS, BM_ABORTING, TM_NONE, TransParam);

     Inst_MC_GrpStop(FALSE, Group1_ref, stop_deceleration, default_jerk);
END_IF;

When MC_GrpStop is called in the example:

  • The current move is halted.
  • A controlled motion stop is applied to axes group Group1_ref.
  • The deceleration value, stop_deceleration, is set to 75.0 User unit/sec2.
    • It is applied to the path velocity until it reaches 0 (zero).
  • The group state is GroupStopping when the MC_GrpStop function block becomes active.
  • While the axes group is in the GroupStopping state, no other function blocks can perform any motion on the same axes group.
    • Once the path velocity reaches 0, the Done output is TRUE.
  • The Execute input must be set to FALSE before the group state can go to GroupStandBy.
  • Any coordinated moves in the buffer are flushed.
  • New coordinated moves can be queued up upon completion of the MC_GrpStop command.

Figure 1: Oscilloscope Representation of linear coordinated move with a MC_GrpStop.

Exceptions

  • The deceleration rate from the MC_GrpStop function block is only applied to the absolute and relative moves.
    • Direct moves use the default deceleration value as defined by the AxisRef.
  • MC_GrpStop cannot occur if a group is not enabled.
  • An MC_GrpStop command cannot be aborted by any other commands.
  • When there are two coordinated motion moves (Active and Next) in the queue, and the path velocity does not reach 0 (zero) before the end of the Active move, the path velocity continues to reach zero during the Next move.
  • The deceleration rate is increased if there is only one Active coordinated move and the path velocity cannot reach zero before the endpoint.
    • This prevents overshooting the endpoint.
  • The stop action pauses during S-Curve Corner transitions.
    • Any stop in progress continues after the S-Curve Corner transition is complete.
    • If a stop is started during an S-Curve Corner transition, the stop action starts after the S-Curve Corner transition completes.
    • While a stop action is in progress, there may be a discontinuity in acceleration at the endpoints of the S-Curve Corner transition.
  • An MC_GrpStop command does not prevent performing a single axis motion.