MC_Halt

PLCopen motion icon

 Function Block - Decelerates an axis to zero velocity.

  • See Function Blocks - General Rules about how inputs and outputs work.
  • It is a queued single-axis move.
    • The move is complete when the axis reaches zero velocity.
  • It is typically used with Abort at the BufferMode input to terminate a move.
  • See MC_Stop to execute a stop that cannot be aborted.
  • See Main about how this function is used in the Hole punch project.

    • This function block starts a motion-related action and stores data for calculations and error checking.
    • If using a dual-core controller, see Program a Multi-Core Controller.

Inputs

Input

Data Type

See Data Types.

Range

Unit

Default

Description

Execute

BOOL

FALSE, TRUE

N/A

No default

On the rising edge, request to queue the move.

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 units / sec2

No default

Jerk

LREAL

No range

User units / sec3

No default

BufferMode

SINT

Enumerated

N/A

No default

The specified buffer mode.

  • BM_ABORTING
  • BM_BUFFERED
  • BM_BLENDING_PREVIOUS
  • BM_BLENDING_NEXT
  • BM_BLENDING_LOW
  • BM_BLENDING_HIGH
  • See Buffer Modes.

Outputs

Output

Data Type

See Data Types.

Range

Unit

Description

Done

BOOL

FALSE, TRUE

N/A

Indicates the move completed successfully.
The Command Position has reached the endpoint.

Busy

BOOL

FALSE, TRUE

N/A

High from the moment the Execute input goes high until the time the move is ended.

Active

BOOL

FALSE, TRUE

N/A

Indicates this move is the Active move.

CommandAborted

BOOL

FALSE, TRUE

N/A

If TRUE, the command was aborted by another function block.

Error

BOOL

FALSE, TRUE

N/A

Indicates either:

  • An invalid input was specified.
  • The move was terminated due to an error.

ErrorID

INT

No range

N/A

Time Diagram

This example shows the behavior in combination with a MC_MoveVelocity.

  • A rotating axis is ramped down with FB2 MC_Halt.
  • Another motion command overrides the MC_Halt command.
    • MC_Halt allows this, in contrast to MC_Stop.
  • The axis can accelerate again without reaching standstill.

Figure 1: Time Diagrams: First and Second FBs

Figure 2: Time Diagram

FBD Language Example

Not available.

FFLD Language Example

IL Language Example

Not available.

ST Language Example

(* MC_Halt ST example *)
Inst_MC_Halt( HaltReq, Axis1,100.0, 100.0, 0 );
//Inst_MC_Halt is an instance of MC_halt function block
HaltComplete := Inst_MC_Halt.Done; //store Done output into user defined variable

See Also