XFC_TimeOfPosition
The function block XFC_TimeOfPosition calculates the time at which the axis will be or was at a specified position.
The function block extrapolates the time in relation to the current position and dynamics. Precise extrapolation is only possible over a short interval, since the axis dynamics may change.
It needs exactly one call to provide the result. It can therefore be used similar to a function, although as well as the time it may also return an error. This error must be analyzed in order to ensure that the calculated time DcTime is valid.
Inputs
VAR_INPUT
Position : LREAL;
Options : ST_NcTimeConversionOptions;
END_VAR
Name | Type | Description |
---|---|---|
Position | LREAL | Absolute axis position |
Options
| Data structure with options for position extrapolation. |
/ Inputs/Outputs
VAR_IN_OUT
Axis : AXIS_REF;
END_VAR
Name | Type | Description |
---|---|---|
Axis | The axis data structure of type AXIS_REF addresses an axis unambiguously within the system. Among other parameters, it contains the current axis status, including position, velocity or error state. |
Outputs
VAR_OUTPUT
DcTime : T_DCTIME32;
Error : BOOL;
ErrorID : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
DcTime | T_DCTIME32 | Distributed clock system time at which the position will be reached or was reached. DcTime contains the lower 32 bits of the complete DcTime and covers a time range of +/- 2 seconds around the current time. |
Error | BOOL | Becomes TRUE if an error occurs. |
ErrorID | UDINT | If the error output is set, this parameter supplies the error number. |