Sub_Tod_Time - Omron NY532-5400 Reference Manual

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

Advertisement

2 Instruction Descriptions

SUB_TOD_TIME

The SUB_TOD_TIME instruction subtracts a time from a time of day.
Instruction
SUB_TOD_TIME
Subtract Time from
Time of Day
Variables
Name
Meaning
In1
Time of day
In2
Time to
subtract
Out
Resulting
time of day
Bit strings
In1
In2
Out
Function
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.
LD
TOD#23:59:59
In1
In2
Out=abc
2-602
Name
FB/FUN
FUN
I/O
Description
Time of day
Input
Time to subtract
Output
Resulting time of day
SUB_TOD_TIME
EN
In1
T#1s
In2
TOD#23:59:59
T#1s
TOD#23:59:58
Graphic expression
(@)SUB_TOD_TIME
EN
ENO
In1
In2
Valid range
Depends on data type.
Depends on data type.
Integers
ST
abc:=SUB_TOD_TIME(TOD#23:59:59, T#1s);
ENO
abc
NY-series Instructions Reference Manual (W560)
ST expression
Out:=SUB_TOD_TIME(In1,
In2);
Out
Unit
Default
Hour, min-
TOD#0:0
utes, seconds
:0
ns
T#0s
Hour, min-
---
utes, seconds
Times, durations, dates,
and text strings
OK
OK
OK

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents