2 Instruction Descriptions
2-558
NJ-series Instructions Reference Manual (W502)
SUB_DT_TIME
The SUB_DT_TIME instruction subtracts a time from a date and time.
Instruction Name FB/FUN Graphic expression ST expression
SUB_DT_TIME Subtract Time from
Date and Time
FUN Out:=SUB_DT_TIME(In1,
In2);
Variables
Name Meaning I/O Description Valid range Unit Default
In1 Date and
time
Input
Date and time
Depends on data type.
Year, month,
day, hour,
minutes, sec-
onds
DT#197
0-1-1-
0:0:0
In2 Time to
subtract
Time to subtract ns T#0s
Out Resulting
date and
time
Output Resulting date and time Depends on data type. Year, month,
day, hour,
minutes, sec-
onds
---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1 OK
In2 OK
Out OK
(@)SUB_DT_TIME
EN ENO
In1 Out
In2