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.
In the ladder editor, time and date data types are supported in these instructions: ADD, CLR, EQ, GE, GSV, GT, JSR, LE, LT, MOVE, NE, RET, SBR, SUB, and SSV.
In Structured Text (ST), you can use Time and date data types with these single operator expressions and instructions:
  • Single operator expressions: +, -, =, >=, >, <=, <, and <>
  • Instructions: GSV, JSR, RET, SBR, and SSV
In the Function Block Diagram (FBD) editor, time and date data types are supported in these functions and instructions:
  • Functions: ADD__F, SUB__F, MOVE (IREF->OREF), EQ__F, GE__F, GT__F, LE__F, LT__T, and NE__F
  • Instructions: JSR, SBR, and RET
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 (MOVE) 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 MOVE allows the Logix Designer application 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
    • MOVE its value to a DT tag, or
    • Convert the LINT microsecond tag to nanoseconds and then MOVE 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.