XFC_TimeToPathPosition

XFC_TimeToPathPosition 1:

XFC_TimeToPathPosition calculates the time period within which an Nci group has travelled a relative path or which has elapsed since then.

The function extrapolates the time in relation to the current path position and 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. 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 duration is valid.

Inputs

VAR_INPUT
    GrpId        : UDINT;
    PathId       : UDINT;
    PathPosition : LREAL;
    Options      : ST_NcTimeConversionOptions;
END_VAR

GrpId

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

PathId

Unique ID that continually increases over the path course and belongs to the relative path.

PathPosition

Relative path

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
    Duration       : DINT; 
    TimeOfPosition : T_DCTIME32; 
    Error          : BOOL;
    ErrorID        : UDINT;  
END_VAR

Duration

Time period in nanoseconds after which the relative path will have been travelled (>0) or which has elapsed since then (<0).
Duration is a differential value from two variables of the type T_DCTIME32

TimeOfPosition

Distributed clock system time at which the relative path distance was or will have been be travelled.
DcTime contains the lower 32 bits of the complete DcTime and covers a time range of +/- 2 seconds around the current time.

Error

Becomes TRUE if an error occurs.

ErrorID

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