MC_ReadHome
This function block provides a read-only view on the parameters and status of the home command attached to CommandHandle. While Enable is TRUE the outputs are updated on every call. Valid signals that they describe a home command. The Command* outputs stay FALSE until the axis has processed the command.
Syntax
Definition:
FUNCTION_BLOCK MC_ReadHome
VAR_IN_OUT
CommandHandle : Reference To MC_CommandHandle;
END_VAR
VAR_INPUT
Enable : BOOL;
END_VAR
VAR_OUTPUT
Valid : BOOL;
Error : BOOL;
ErrorId : UDINT;
Position : LREAL;
CommandQueued : BOOL;
CommandDone : BOOL;
CommandActive : BOOL;
CommandAborted : BOOL;
CommandError : BOOL;
CommandErrorId : UDINT;
END_VAR
Inputs
|
Name |
Type |
Description |
|---|---|---|
|
Enable |
BOOL |
The outputs are updated while TRUE. |
In/Outputs
|
Name |
Type |
Description |
|---|---|---|
|
CommandHandle |
Reference To MC_CommandHandle |
Handle of the command to observe |
Outputs
|
Name |
Type |
Description |
|---|---|---|
|
Valid |
BOOL |
The outputs describe the home command attached to CommandHandle. |
|
Error |
BOOL |
Error occurred within function block, e.g. no command attached to CommandHandle or not a home command. |
|
ErrorId |
UDINT |
Error identifier |
|
Position |
LREAL |
Absolute position after homing ([PosUnit]). |
|
CommandQueued |
BOOL |
Command is queued for execution. |
|
CommandDone |
BOOL |
Homing sequence succeeded. |
|
CommandActive |
BOOL |
The command is currently active. |
|
CommandAborted |
BOOL |
Command is aborted by another command. |
|
CommandError |
BOOL |
Error occurred while executing the command. |
|
CommandErrorId |
UDINT |
Error identifier of the command |