Name :Read the actual location command

Symbol :MC_ReadActualPosition

Illustrate:

        Used to read the current position of the axis (the axis control system manages itself), active high.
        This command can only be invoked if the location information exists (using MC_Home to complete the origin regression processing, or using the MC_SetPosition to complete the position setting).
        When VALID is set to TRUE, the POS is valid for reading the axis position.
        There is no interrupt flag for this command, and multiple commands can be run at the same time.

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
VALID | BOOL | OUT | Valid signs | TRUE-POS output value is valid |
    FALSE
BUSY | BOOL | OUT | Busy sign | TRUE-The read position is being processed |
    FALSE
POS | REAL | OUT | Axis position | Current axis position, in units: unit |
    0
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_ReadActualPosition_inst1(AXISNO := 0, ENABLE := TRUE, VALID => ValidOut, BUSY => BusyOut, POS => PosOut, ERROR => ErrorOut, ERRORID => ErrorIdOut);

Interpretation:

       AXISNO is 0, which means that the operating pulse axis is 0;
       ENABLE is TRUE, and the shaft position reading command is initiated;
       If ValidOut is TRUE, the axis position reading value is valid for POS.
       If BusyOut is set to TRUE, the axis position reading is in progress, and BusyOut is reset after it is completed.
       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.