XFC_PathPositionAtTime

XFC_PathPositionAtTime 1:

XFC_PathPositionAtTime calculates a relative path distance at a given time in relation to the current path position.

The function extrapolates the path distance in relation to the current dynamics. Precise extrapolation is only possible over a short interval, since the group dynamics may change.

The function block requires precisely one call in order to provide the result. Therefore it can be used in a similar way to a function, but may return an error in addition to the relative path distance. This error must be evaluated to ensure that the calculated path distance is valid.

Inputs

VAR_INPUT
    GrpId   : UDINT;
    DcTime  : T_DCTIME32; 
    Options : ST_NcTimeConversionOptions;
END_VAR

GrpId

Group ID of the Nci group. This clearly identifies the requested Nci group in the system.

DcTime

Distributed clock system time.
DcTime contains the lower 32 bits of the complete DcTime and covers a time range of +/- 2 seconds around the current time. In order to optimize the calculation of the path value, the time should be close to the current time, i.e. only a few PLC or NC cycles in the future or the past.

Options

Data structure with options for the extrapolation of the relative path.

Options.

SubIndex

not implemented

Options.

InterpolationOptions

0: The extrapolation of the relative path is carried out at the current path velocity without taking into account the current path acceleration.
1: The path acceleration of the axis is incorporated into the extrapolation of the relative path.

Options.

CompensationTime

additional compensation time.

Outputs

VAR_OUTPUT
    PathPosition : LREAL;
    Error        : BOOL;
    ErrorID      : UDINT;
END_VAR

PathPosition

Extrapolated relative path up to the preset time DcTime.

Error

Becomes TRUE if an error occurs.

ErrorID

If the error output is set, this parameter supplies the error number