Example Of A Ladder Program Using Date And Time; Programming The Nx1P Using Date And Time; Exercise: Continuous Operating Time Of Escalator - Omron NX1P Programming Manual

Machine automation controller
Table of Contents

Advertisement

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 3-6-3 Exercise: Energy
Saving Escalator.
[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.
62

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents