6F3B0250
236 T1/T1S User’s Manual
7. Instructions

FUN 155 CLDS Calendar operation

Expression
Input -[
A
CLDS
B
]- Output
Function
When the input is ON, this instruction subtracts the date and time stored in 6 registers starting with
A
fr om t he cur rent date and time, and stores the r esult in 6 r egisters star t ing with
B
.
If an invalid data is cont ained in t he r egisters, t he oper ation is not executed and the output is t urned
ON.
Execution condition
Input Operation Output
OFF No operation OFF
ON Execution (data is valid)) OFF
No execution (data is not valid) ON
Operand
Name Device Re
g
ister Constant Index
X Y R S T. C. XW YW RW SW T C D I J K
A
Subtrahend ÖÖÖÖÖÖÖ
B
Result ÖÖÖÖÖÖ
Example
When R020 is O N, the date and time dat a r ecor ded in D0050 t o D0055 are subtracted from the
current dat e and time of clock/calendar, and t he result is stored in D0100 t o D0105.
In normal oper at ion, the output is O FF ( R0035 is O FF) . If D0050 t o D0055 cont ains invalid data,
the operation is not executed and t he output is turned O N ( R0035 comes ON).
F0 F0
H0098 D0050 H0097 D0100 H0000 (Year)
H0001 D0051 H0010 D0101 H0003 (Month)
H0015 minus D0052 H0010 D0102 H0007 (Day)
H0017 D0053 H0015 D0103 H0001 (Hour)
H0000 D0054 H0030 D0104 H0030 (Minute)
H0000 D0055 H0000 D0105 H0000 (Second)
Note
· Future date and t im e cannot be used as subtrahend
A
.
· In the calculation result, it m eans t hat 1 year is 365 days and 1 month is 30 days.
T1S only
Current date & time
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net