MC_Stop

PLCopen motion icon

 Function Block - Aborts the active move, removes the next move from the queue, performs a controlled stop, and switches the axis to Stopping state.

Inputs

Input

Data Type

Range

Unit

Default

Description

Execute

BOOL

FALSE, TRUE

N/A

No default

On the rising edge, request to stop the axis.

It can be held high to prevent any other moves from being queued.

Axis

AXIS_REF

1 to 256

N/A

No default

Name of a declared instance of the AXIS_REF library function.

Deceleration

LREAL

No range

User unit/sec2

No default

Trapezoidal: Deceleration rate.

S-curve: Unused.

See S-curve and Trapezoidal Acceleration / Deceleration.

Jerk

LREAL

No range

User unit/sec3

No default

Trapezoidal: 0 (zero).

S-curve: Constant jerk.

See S-curve and Trapezoidal Acceleration / Deceleration.

Outputs

Output

Data Type

Range

Unit

Description

Done

BOOL

FALSE, TRUE

N/A

Indicates both:

  • The axis has reached zero velocity.
  • The Execute input is low.

Busy

BOOL

FALSE, TRUE

N/A

High from the time both:

  • The Execute input goes high until the axis reaches zero velocity.
  • The Execute input is low.

Active

BOOL

FALSE, TRUE

N/A

High from the time both:

  • The MC_Stop move becomes the active move until the axis reaches zero velocity.
  • The Execute input is low.

Error

BOOL

FALSE, TRUE

N/A

Indicates an invalid input was specified.

ErrorID

INT

 

 

 

 

Indicates the error if the Error output is set to TRUE.

See PLCopen Function Block ErrorIDs.

Remarks

  • See Function Blocks - General Rules about how inputs and outputs work.
  • An MC_Stop cannot be aborted.
    • This means that, while in Stopping state, no function block can command any motion on the axis.
    • The axis remains in Stopping state until it reaches zero velocity and the Execute input is low.
  • The application program can hold the axis in Stopping state even after it reaches zero velocity by leaving the Execute input high.
  • It aborts any ongoing function block execution.
  • When the Done output is set, the state transfers to StandStill.
  • While the axis is in Stopping state, no other FB can perform any motion on the same axis.

Figure 1: MC_Stop

Time Diagram

This example shows the behavior of the combination of a MC_Stop FB with a MC_MoveVelocity.

  • A rotating axis is ramped down with FB2 MC_Stop
  • The axis rejects motion commands as long as MC_Stop parameter “Execute” = TRUE

FB1 MC_MoveVelocity reports an error indicating the busy MC_Stop command.

Figure 2: Time Diagrams: First and Second FBs

Figure 3: Time Diagram

FBD Language Example

Not available.

FFLD Language Example

IL Language Example

Not available.

ST Language Example

            (* MC_Stop S
            T example *)

Inst_MC_Stop( StopRequest , Axis1, 100.0, 100.0 ); //Inst_MC_Stop is an instance of MC_Stop function block


StopComplete := Inst_MC_Stop.Done;     //store the Done output into a user defined variable

StopActive := Inst_MC_Stop.Active;     //store the Active output into a user defined variable

StopError := Inst_MC_Stop.Error;       //store the Error output into a user defined variable