Name :Jog command

Symbol :MC_Jog

Illustrate:

        It is used to realize the jog function of the shaft, and the high level is active.
        This command can only be invoked if the axis is enabled using the MC_Power command.
        On the rising edge of the command, the input VEL and ACC values are locked, and the PLCOpen state machine of the axis switches to ContinuousMotion and starts jogging.
        When JOGFORWARD is active, the shaft moves forward at the speed set by the VEL.
        When JOGBACKWARD is active, the shaft moves in the opposite direction at the speed set by the VEL.
        When JOGFORWARD and JOGBACKWARD are valid at the same time, the axis stops moving and the command returns an error, but it does not enter the Errorstop state.
        When ENABLE is valid, when the axis runs in one direction and encounters the software limit, the command is interrupted and the execution is terminated (CMDABORTED is valid), and the axis stops moving but does not enter the Errorstop state. The command to retrigger MC_Jog move the axis in the opposite direction.
        Other commands that conform to the PLCOpen state machine switch can interrupt this command (the PLCOpen state machine of the reference axis), and the CMDABORTED will take effect after the command is interrupted.

Image:

Parameter:

The name of the parameter | data type | IN/OUT | Parameter role | Illustrate | Default value
--- | --- | --- | --- | --- | ---
AXISNO | UDINT | IN | Pulse shaft number | 0-7 |
    not
ENABLE | BOOL | IN | The function block is enabled | TRUE：The function block is enabled；FALSE：Functional block incapacitated |
    FALSE
JOGFORWARD | BOOL | IN | Forward motion enables | TRUE：Forward motion enables（Forward and reverse motion cannot be enabled at the same time） |
    FALSE
JOGBACKWARD | BOOL | IN | Reverse motion enabled | TRUE：Reverse motion enabled（Forward and reverse motion cannot be enabled at the same time） |
    FALSE
VEL | REAL | IN | Target speed | Target speed(non-0 value, absolute value valid), ≤ maximum speed, ≤ jog maximum speed, unit: unit/s |
    not
ACC | REAL | IN | acceleration | acceleration(non-0 value, absolute value valid), ≤ maximum acceleration, unit：unit/s |
    not
INVELOCITY | BOOL | OUT | Speed arrival sign | TRUE：Speed arrived |
    FALSE
BUSY | BOOL | OUT | Busy sign | TRUE：is in motion |
    FALSE
CMDABORTED | BOOL | OUT | End execution flag | TRUE：If it is interrupted by other instructions, the execution of this instruction will be terminated |
    FALSE
ERROR | BOOL | OUT | Error flags | TRUE：There was an error with the function block call |
    FALSE
ERRORID | UINT | OUT | Error codes | 0：Normal, Other: Error code value |
    0

Example:

LD:

ST:

MC_Jog_inst1(AXISNO := 0, ENABLE := TRUE, JOGFORWARD := TRUE, JOGBACKWARD := FALSE, VEL := 20, ACC := 100, INVELOCITY => InVelOut, BUSY => BusyOut, CMDABORTED => CmdAbortOut, ERROR => ErrorOut, ERRORID => ErrorIdOut);

Interpretation:

       AXISNO is 0, which means that the operating pulse axis is 0;
       ENABLE is TRUE, indicating that the jog command is enabled.
       IF JOGFORWARD IS TRUE, IT MEANS THAT THE FORWARD MOTION IS ENABLED (THE FORWARD AND REVERSE MOTION CANNOT BE ENABLED AT THE SAME TIME).
       JOGBACKWARD IS FALSE, WHICH INDICATES THAT THE REVERSE MOTION IS DISABLED (THE FORWARD AND REVERSE MOTION CANNOT BE ENABLED AT THE SAME TIME);
       VEL is 20, which means that the target speed is 20unit/s;
       ACC is 100, which means acceleration and deceleration at 100 unit/s until the target speed of 20 unit/s is reached;
       InVelOut is TRUE, indicating that the target speed has been reached;
       BusyOut is TRUE, indicating that jog motion is in progress.
       If CmdAbortOut is TRUE, the execution has been terminated due to interruption.
       If ErrorOut is TURE, it means that there is an error and the command cannot be executed.
       If ErrorIdOut is 0, the execution is normal, and if it is not 0, there is an error and cannot be executed.