62
3-7
Example of a Ladder Program Using
Date and Time
3-7-1
Programming the NX1P Using Date and Time
For example, best before date and time that is 30 hours from production is printed on boxed
lunch.
A program is required to
acquire date and time of production and
calculate the best before date and time by adding
30 hours to the acquired date and time
Programming with variables uses DATE_AND_TIME data (year, month, day, hour, minute, and
second), TIME data, and instructions to perform calculations easily.
3-7-2
Exercise: Continuous Operating Time of Escalator
Create a program to measure time by using the program created in
[Exercise] Acquire current time and calculate elapsed time
Measure continuous operating time of the escalator (continuous ON time of L1). Create a
program to subtract time of day when L1 turns OFF from time of day when L1 turns ON.
Tips
(1) Use the GetTime function to acquire current time.
(2) Use the SUB_DT_DT function to subtract date and time.
(3) The SUB_DT_DT function returns TIME data.
Summary of Contents for NX1P
Page 106: ...2017 0917 0917 P122 E1 01...