MC_Jog

MC_Jog 1:

This function block enables an axis to be moved via manual keys in different modi.

Syntax

Definition:

FUNCTION_BLOCK MC_Jog
VAR_IN_OUT
    Axis           : Reference To AXIS_REF;
END_VAR
VAR_INPUT
    JogForward     : BOOL;
    JogBackward    : BOOL;
    Mode           : EJogMode;
    Distance       : LREAL;
    Velocity       : LREAL;
    Acceleration   : LREAL;
    Deceleration   : LREAL;
    Jerk           : LREAL;
END_VAR
VAR_OUTPUT
    Done           : BOOL;
    Busy           : BOOL;
    Active         : BOOL;
    CommandAborted : BOOL;
    Error          : BOOL;
    ErrorId        : UDINT;
END_VAR

MC_Jog 2: Inputs

Name

Type

Default

Description

JogForward

BOOL

 

The command is executed with a rising edge, and the axis is moved in positive direction. Depending on the mode, the axis moves as long as the signal remains TRUE, or it stops automatically after a specified distance.

JogBackward

BOOL

 

The command is executed with a rising edge, and the axis is moved in negative direction. Depending on the mode, the axis moves as long as the signal remains TRUE, or it stops automatically after a specified distance.

Mode

EJogMode

StandardSlow

Determines the operation mode in which the manual function is executed.

Distance

LREAL

#Ignore

Distance for movements in Mode Inching

Velocity

LREAL

#Ignore

Jog velocity ([PosUnit]/s, positive). Required for Continuous and Inching modes; StandardSlow and StandardFast use axis defaults.

Acceleration

LREAL

#Default

Maximum acceleration ([PosUnit]/s^2, positive)

Deceleration

LREAL

#Default

Maximum deceleration ([PosUnit]/s^2, positive)

Jerk

LREAL

#Default

Maximum jerk ([PosUnit]/s^3, positive)

MC_Jog 3: In/Outputs

Name

Type

Description

Axis

Reference To AXIS_REF

Reference to the axis

MC_Jog 4: Outputs

Name

Type

Description

Done

BOOL

Function block has succeeded.

Busy

BOOL

Function block is not finished and new output values are to be expected.

Active

BOOL

Function block has active control on the axis.

CommandAborted

BOOL

Command is aborted by another command.

Error

BOOL

Error occurred within function block.

ErrorId

UDINT

Error identifier

Weiterführende Informationen

Die Betriebsart des Funktionsbausteins MC_Jog wird über den Eingang Mode vom Typ E_JogMode definiert:

E_JogMode.StandardSlow

Die Achse wird so lange verfahren, wie das Signal an einem der Eingänge JogForward oder JogBackward TRUE ist. Dabei wird die im Achsparameter Jog Velocity Slow festgelegte Geschwindigkeit sowie die Dynamik entsprechend der Eingänge Acceleration, Deceleration und Jerk verwendet.

Die Funktionsbaustein-Eingänge Distance und Velocity haben in dieser Betriebsart keinen Einfluss.

E_JogMode.StandardFast

Die Achse wird so lange verfahren, wie das Signal an einem der Eingänge JogForward oder JogBackward TRUE ist. Dabei wird die im Achsparameter Jog Velocity Fast festgelegte Geschwindigkeit sowie die Dynamik entsprechend der Eingänge Acceleration, Deceleration und Jerk verwendet.

Die Funktionsbaustein-Eingänge Distance und Velocity haben in dieser Betriebsart keinen Einfluss.

E_JogMode.Continuous

Die Achse wird so lange verfahren, wie das Signal an einem der Eingänge JogForward oder JogBackward TRUE ist.

Der Funktionsbaustein-Eingang Distance hat in dieser Betriebsart keinen Einfluss.

E_JogMode.Inching

Die Achse wird um die am Funktionsbaustein-Eingang Distance festgelegte Strecke verfahren, sobald am Eingang JogForward oder JogBackward eine steigende Flanke detektiert wird.

Versionsinformation

  • TwinCAT Standard >= v3.1.4026.23.1
  • TF5500 MC3 Base >= v4.0.6