MC_Jog
The MC_Jog function block enables an axis to be moved via manual keys. The key signal can be linked directly with the JogForward and JogBackwards inputs. The required operating mode is specified via the mode input. An inching mode for moving the axis by a specified distance whenever the key is pressed is also available. The velocity and dynamics of the motion can be specified depending on the mode.
Inputs
VAR_INPUT
JogForward : BOOL;
JogBackwards : BOOL;
Mode : E_JogMode;
Position : LREAL;
Velocity : LREAL;
Acceleration : LREAL;
Deceleration : LREAL;
Jerk : LREAL;
END_VAR
JogForward | The command is executed with rising edge, and the axis is moved in positive direction of travel. Depending on the operation mode (see mode), the axis moves as long as the signal remains TRUE, or it stops automatically after a specified distance. During the motion no further signal edges are accepted (this includes the JogBackwards input). If signal edges occur simultaneously at the JogForward and JogBackwards inputs, JogForward has priority. |
JogBackwards | The command is executed with rising edge and the axis moved in negative direction of travel. JogForward and JogBackwards should be triggered alternatively, although they are also mutually locked internally. |
Mode | The Mode input specifies the mode for manual operation. MC_JOGMODE_STANDARD_SLOW: |
Position | relative distance for movements in MC_JOGMODE_INCHING operation mode. |
Velocity | Maximum travel velocity (>0). |
Acceleration | Acceleration (≥0). If the value is 0, the standard acceleration from the axis configuration in the System Manager is used. |
Deceleration | Deceleration (≥0). If the value is 0, the standard deceleration from the axis configuration in the System Manager is used. |
Jerk | Jerk (≥0). If the value is 0, the standard jerk from the axis configuration in the System Manager is used. |
![]() | The parameters Position, Velocity, Acceleration, Deceleration and Jerk are not used in the operation modes MC_JOGMODE_STANDARD_SLOW and MC_JOGMODE_STANDARD_FAST and can remain unassigned. |
Outputs
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
Done | Becomes TRUE if a movement is completed successfully. |
Busy | Becomes TRUE as soon as the function block is active, and becomes FALSE when it has returned to its initial state. Only then can a further edge be accepted at the jog inputs. |
Active | Active indicates that the axis is moved via the jog function. |
CommandAborted | Becomes TRUE if the process is interrupted by an external event, e.g. by the call up of MC_Stop. |
Error | Becomes TRUE if an error occurs. |
ErrorID | If the error output is set, this parameter supplies the error number. |