EasyManua.ls Logo

Omron NJ501-1500

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2 Instruction Descriptions
2-552
NJ-series Instructions Reference Manual (W502)
SUB_TOD_TIME
The SUB_TOD_TIME instruction subtracts a time from a time of day.
The SUB_TOD_TIME instruction subtracts a time In2 from a time of day In1. The result of subtraction in
Out is also a time of day.
The following example is for when In1 is TOD#23:59:59 and In2 is T#1s.
Instruction Name FB/FUN Graphic expression ST expression
SUB_TOD_TIME Subtract Time from
Time of Day
FUN Out:=SUB_TOD_TIME(In1,
In2);
Variables
Name Meaning I/O Description Valid range Unit Default
In1 Time of day
Input
Time of day
Depends on data type.
Hour, min-
utes, seconds
TOD#0:0
:0
In2 Time to
subtract
Time to subtract ns T#0s
Out Resulting
time of day
Output Resulting time of day Depends on data type. Hour, min-
utes, seconds
---
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
Function
(@)SUB_TOD_TIME
EN ENO
In1 Out
In2
abc:=SUB_TOD_TIME(TOD#23:59:59, T#1s);
LD
ST
abc
TOD#23:59:59
T#1s
SUB_TOD_TIME
EN ENO
In1
In2
In1
In2
Out=abc
TOD#23:59:59
T#1s
TOD#23:59:58

Table of Contents

Related product manuals