UTC-Time-Quality string format specification
A TwinCAT UTC-Time-Quality string has the following structure: 'UQ#LFC|A[A]'.
Variable | Representation | Value range | Description |
---|---|---|---|
Prefix | UQ# | ‘UQ#‘ | Constant prefix. |
LeapSecondsKnown | L | ‘0‘..‘1‘ | Quality of the leap second ('0':=unknown, '1':=known). |
ClockFailure | F | ‘0‘..‘1‘ | Quality of the timer ('0':=good, '1':=erroneous). |
ClockNotSynchronized | C | ‘0‘..‘1‘ | Quality of the time synchronization ('0':=synchronized, '1':=not synchronized). |
Accuracy | A[A] | ‘0‘..‘31‘ | Accuracy of the time information (precision of the fraction of a second). Max. number of significant bits in the T_UtcTime.fractionOfSecond component (1 or 2 decimal places). |
Samples
The table below contains some strings and the values of the components after conversion to the structured type T_UtcTimeQuality.
STRING(9) | T_UtcTimeQuality | Description |
---|---|---|
'UQ#000|0' | STRUCT(0) | All components have the value: 0. |
'UQ#001|3' | STRUCT(ClockNotSynchronized:=1, Accuracy3:=1, Accuracy4:=1) | Timer not synchronized. Precision: 3-bit. All other components have the value: 0. |
'UQ#000|24' | STRUCT(Accuracy0:=1, Accuracy1:=1) | Precision: 24-bit. All other components have the value: 0. |