MC_ReadActualVelocity_BkPlcMc (from V3.0)
The function block determines the current velocity of an axis.
Inputs
VAR_INPUT
Enable: BOOL;
END_VAR
Name | Type | Description |
---|---|---|
Enable | BOOL | A rising edge at this input triggers an update of the velocity value. |
Inputs/outputs
VAR_IN_OUT
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
Valid: BOOL;
Busy: BOOL;
Error: BOOL;
ErrorID: UDINT;
Velocity: LREAL;
END_VAR
Name | Type | Description |
---|---|---|
Valid | BOOL | This indicates successful determination of the velocity. |
Busy | BOOL | This output is TRUE while the command is being processed. |
Error | BOOL | The occurrence of an error is indicated here. |
ErrorID | UDINT | An encoded indication of the cause of the error is provided here. |
Velocity | LREAL | [mm/s] The actual velocity. |
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 velocity is determined and reported with Valid 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. |