ConvertPathPosToDcTime
This function block converts a relative Nci path distance to a corresponding 32-bit distributed clock system time variable of type T_DCTIME32 (i.e. the time that corresponds or corresponded to the relative Nci path distance).
Inputs
VAR_INPUT
nGrpId : UDINT;
nSubIdx : UDINT;
fPosition : LREAL;
END_VAR
Name | Type | Description |
---|---|---|
nGrpId | UDINT | Group ID of the corresponding Nci channel |
nSubIdx | UDINT | This 32-bit input variable contains two different items of information, and is therefore divided into two 16-bit values:
|
fPosition | LREAL | Relative Nci path distance converted to the corresponding 32-bit "Distributed Clock System Time". |
Outputs
VAR_OUTPUT
dcTime : T_DCTIME32;(* 32 bit distributed clock time *)
iErr : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
dcTime | T_DCTIME32 | Returns the 32-bit "Distributed Clock System Time" variable that corresponds to input fPosition. |
iErr | UDINT | Supplies an error number if an error occurs, e.g.
|
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1.0 | PC or CX (x86, x64, ARM) | Tc2_EtherCAT |