Sub_Dt_Dt - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

2 Instruction Descriptions

SUB_DT_DT

The SUB_DT_DT instruction subtracts another date and time from another date and time.
Instruction
SUB_DT_DT
Subtract Date and
Time
Variables
Name
Meaning
In1
Date and
time 1
In2
Date and
time 2
Out
Resulting
time
Bit strings
In1
In2
Out
Function
The SUB_DT_DT instruction subtracts date and time In2 from date and time In1. The result of subtrac-
tion in Out is a time.
The following example is for when In1 is DT#1970-1-7-0:0:0 and In2 is DT#1970-1-2-0:0:0.
LD
In1
In2
Out=abc
2-556
Name
FB/FUN
FUN
I/O
Description
Date and time 1
Input
Date and time 2
Output
Resulting time
SUB_DT_DT
EN
DT#1970-1-7-0:0:0
In1
DT#1970-1-2-0:0:0
In2
DT#1970-1-7-0:0:0
DT#1970-1-2-0:0:0
T#5d
Graphic expression
(@)SUB_DT_DT
EN
ENO
In1
In2
Valid range
Depends on data type.
Depends on data type.
Integers
ST
abc:=SUB_DT_DT(DT#1970-1-7-0:0:0,
ENO
abc
NJ-series Instructions Reference Manual (W502)
ST expression
Out:=SUB_DT_DT(In1,
In2);
Out
Unit
Default
Year, month,
DT#197
day, hour,
0-1-1-
minutes, sec-
0:0:0
onds
ns
---
Times, durations,
dates, and text strings
OK
OK
OK
DT#1970-1-2-0:0:0);

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents