ConvertPosToDcTime
This function block converts an NC axis position to a corresponding 32-bit distributed clock system time variable of type T_DCTIME32 (i.e. the time which precisely this NC axis position was or will be reached).
Inputs
VAR_INPUT
nAxisId : UDINT;
nSubIdx : UDINT;
fPosition : LREAL;
END_VAR
Name | Type | Description |
---|---|---|
nAxisId | UDINT | ID of the NC axis |
nSubIdx | UDINT | This 32-bit input magnitude is composed of two different items of information, and is divided into two 16-bit values:
|
fPosition | LREAL | NC axis position that is converted to the corresponding 32-bit "Distributed Clock System Time" variable. |
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 |