Time and date data types

Use time and date data types to standardize time and date values in
Logix5000
control systems. Standardized time and date values increase the accuracy and reliability of time-stamped inputs, scheduled outputs, and time-based registration for motion control. They also help increase accuracy for Sequence of Events, Time-stamped Data Logging and Analytics, and Time Synchronization within and across systems.
Time and date data types are supported in the following ladder editor instructions: ADD, SUB, CLR, MOV, EQU, GEQ, GRT, LEQ, LES, NEQ, GSV, and SSV.
You can also use these data types in Structured Text (ST) with single operator expressions involving +, -, =, >=, >, <=, <, and <>. Get System Value (GSV) and Set System Value (SSV) instructions can also be used with assignment statements.
Function Block Diagrams do not support time and date data types.
Absolute time data types
Use these absolute time data types for a specific point in time.
Data type
Description
DT
Date and time. 64-bit storage; units are in microseconds.
LDT
Long date and time. 64-bit storage; units are in nanoseconds.
Relative time data types
Use these relative time data types for a duration or length of time.
Data type
Description
TIME32
Duration of time. 32-bit storage; units are in microseconds.
TIME
Duration of time. 64-bit storage; units are in microseconds.
LTIME
Long duration of time. 64-bit storage; units are in nanoseconds.
Considerations
Keep these considerations in mind when using relative time (LTIME, TIME32, TIME) and absolute time (LDT, DT) data types:
  • Use the Move (MOV) instruction as a bridge between systems adopting time and date data types and legacy systems. Using time and date data types and LINT data types with MOV allows the
    Logix Designer
    to carry out a straight memory copy.
  • You cannot mix time and date operands with any other kind of data type except LINT. LINT data types were often used in legacy systems for time stamping, so they are the only data types that are interoperable with the time and date data types. The system allows LINTs to be used broadly but it assumes that every LINT is an LDT data type, and type conversion occurs based on that assumption. Systems using LINT microsecond tags would need to:
    • Manage that discrepancy wherever a LINT microsecond tag is used, or
    • MOV its value to a DT tag, or
    • Convert the LINT microsecond tag to nanoseconds and then MOV that value to an LDT tag.
  • For Add (ADD), Subtract (SUB), and Compare Instructions:
    • If both Source A and Source B are relative time, the Dest must be relative time.
    • If Source A is relative time and Source B is absolute time or vice versa, the Dest must be absolute time.
    • In ADD instructions, Source A and Source B cannot both be absolute time.
Relative time formats
Literal string and Tag display formats:
T32#2d_3h_1m_22s_123ms_678us
T#8h_33s_234ms_679us
LT#10s_522ms
You can modify relative time literal strings directly inline.
You can modify relative time tags directly inline or in the
Time Browser
. To use the
Time Browser
in a routine, double-click the tag value. In the
Data Monitor
, select the ellipsis to open the
Time Browser
or replace any portion of the relative time tag string using its literal string format.
Absolute time formats
Literal string and Tag display formats:
DT#2020-03-05-08:11:44.345_678
LDT#2020-10-25-11:05:20.123_456_789
You can modify absolute time literal strings directly inline.
You can modify absolute time tags directly inline or in the
Time Browser
. To use the
Time Browser
in a routine, double-click the tag value. In the
Data Monitor
, select the ellipsis to open the Time Browser or replace any portion of the absolute time tag string using its literal string format.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.