Name :Origin regression instruction

Symbol :MC_Home

Illustrate:

        It is used to realize the origin regression function of the shaft, and the command rising edge is valid.
        This command can only be invoked when the MC_Power is enabled and the PLCOPen state of the axis is Standstill.
        On the rising edge of EXECUTE, the input POS value is locked, and the PLCOpen state machine of the axis switches from Standstill to Homing, starting the origin regression movement.
        The POS value is used to set the position value of the origin after the origin regression is completed.
        This command can be interrupted by MC_Stop command and terminated, but not by other motion commands (PLCOpen state machine of the reference axis).
        This command does not allow repeated calls, when a MC_Home command is invoked to put the axis in the Homing state, and then other MC_Home instructions are called, and then the invoked command returns an error.

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
EXECUTE | BOOL | IN | Function block triggering | The rising edge triggers the execution of the order |
    FALSE
POS | REAL | IN | Origin location | The position of the origin (positive/negative/0) after the origin regression is completed, in units: unit |
    0
DONE | BOOL | OUT | Origin regression completion flag | TRUE：Origin regression complete |
    FALSE
BUSY | BOOL | OUT | Busy sign | TRUE：Origin regression |
    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_Home_inst1(AXISNO := 0, EXECUTE := TRUE, POS := 0, DONE => DoneOut, BUSY => BusyOut, CMDABORTED => CmdAbortOut, ERROR => ErrorOut, ERRORID => ErrorIdOut);

Interpretation:

       AXISNO is 0, which means that the operating pulse axis is 0;
       EXECUTE FROM FALSE->TRUE, THE RISING EDGE INITIATES THE ORIGIN REGRESSION INSTRUCTION;
       If the POS is 0, the position of the origin is 0-unit, and if it is not 0, the corresponding position is POS-unit.
       If DoneOut is TRUE, the origin regression command is executed.
       If BusyOut is TRUE, it means that the origin regression is being executed, and BusyOut is reset after completion.
       If CmdAbortOut is TRUE, the execution has been terminated due to interruption.
       ErrorOut is TURE, which indicates 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.