MC_ReadActualPosition_BkPlcMc (from V3.0)
The function block determines the current position of an axis.
Inputs
VAR_INPUT
Enable: BOOL;
END_VAR
Name | Type | Description |
---|---|---|
Enable | BOOL | Updating of the position value is initiated by a rising edge at this input. |
Inputs/outputs
VAR_INOUT
Axis: Axis_Ref_BkPlcMc;
END_VAR
Name | Type | Description |
---|---|---|
Axis | Axis_Ref_BkPlcMc | Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred. |
Outputs
VAR_OUTPUT
Busy: BOOL;
Valid: BOOL;
Error: BOOL;
ErrorID: UDINT;
Position: LREAL;
END_VAR
Name | Type | Description |
---|---|---|
Busy | BOOL | Indicates that a command is being processed. |
Valid | BOOL | Successful determination of the actual position is indicated here. |
Error | BOOL | The occurrence of an error is indicated here. |
ErrorID | UDINT | An encoded indication of the cause of the error is provided here. |
Position | LREAL | [mm] The actual position. |
Behavior of the function block
On a rising edge at Enable the function block checks the transferred axis interface. A number of problems can be detected and reported during this process:
- If the axis is in an error state and the cause is an encoder problem, the response is Error and ErrorID:=error code of the encoder.
The actual position is determined and Valid is reported if these checks can be carried out without problems.
A falling edge at Enable clears all the pending output signals.
This function block requires no time for executing its tasks. The output Busy will never assume the value TRUE and only exists for compatibility reasons. |