Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

Function
The SUB_DT_TIME instruction subtracts a time In2 from a date and time In1. The result of subtraction
in Out is a date and time. Leap years are also accounted for.
The following example is for when In1 is DT#1970-1-1-0:0:0 and In2 is T#1d.
LD
In1
In2
Out=abc
Related System-defined Variables
Name
_CurrentTime
Precautions for Correct Use
An error will not occur even if the subtraction result exceeds the valid range of Out.
• DT#2554-7-21-23:34:33.709551615 − T#-0.000001ms → DT#1970-1-1-0:0:0
• DT#1970-1-1-0:0:0 − T#0.000001ms → DT#2554-7-21-23:34:33.709551615

NY-series Instructions Reference Manual (W560)

SUB_DT_TIME
EN
DT#1970-1-7-0:0:0
In1
T#1d
In2
DT#1970-1-7-0:0:0
T#1d
DT#1970-1-6-0:0:0
Meaning
System Time of Day
DT
ST
abc:=SUB_DT_TIME(DT#1970-1-7-0:0:0, T#1d);
ENO
abc
Data type
The time of day from the system clock. The num-
ber of seconds from 00:00:00 on January 1,1970.
2 Instruction Descriptions
Description
2
2-609

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents