MC_Stop

PLCopen motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - 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

0, 1

N/A

No default

On the rising edgeClosed The transition of a digital signal from low to high. AKA: positive edge., request to stop the axis.

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

Axis

AXIS_REF

1, 256

N/A

No default

Name of a declared instance of the AXIS_REF library functionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances..

Deceleration

LREAL

No range

User unit/sec2

No default

Trapezoidal: Deceleration rate.

S-curve: Unused.

See S-curve and Trapezoidal Acceleration / Deceleration.

JerkClosed In physics, jerk is the rate of change of acceleration. More precisely, the derivative of acceleration with respect to time.

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

 

 

Indicates both:

Busy

BOOL

 

 

High from the time both:

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

Active

BOOL

 

 

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

 

 

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 programClosed The act of performing a sequence of instructions or commands. 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.

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