ConvertDcTimeToPos
This function block converts a 32 bit Distributed Clock System Time into an associated NC axis position (i.e. the axis position that was – or will be – present at exactly that time).
VAR_INPUT
VAR_INPUT
nAxisId : UDINT;
nSubIdx : UDINT;
dcTime : T_DCTIME32;(* 32 bit distributed clock time *)
END_VAR
nAxisId | ID of the NC axis. |
nSubIdx | This 32-bit input value contains two different items of information and is therefore divided into two 16-bit values: |
dcTime | 32-bit distributed clock system time (T_DCTIME32). This input value is converted into the corresponding NC axis position. |
VAR_OUTPUT
VAR_OUTPUT
fPosition : LREAL;
iErr : UDINT;
END_VAR
fPosition | Supplies the NC axis position corresponding to dcTime. This is an NC axis position that has been scaled and provided with an offset, having, for instance, physical units of degrees or of millimetres. |
iErr | Returns the error number if an error occurs, e.g. error 0x4012 (axis ID is not allowed, or axis does not exist within the system). |
Requirements
Development Environment | Target System | PLC Libraries to include |
---|---|---|
TwinCAT v2.11.0 Build >= 1524 or higher | PC or CX (x86, ARM) | TcEtherCAT.Lib |