beautypg.com

Instructions fun 155 clds calendar operation – Toshiba 6F3B0253 User Manual

Page 220

background image

6F3B0253

218

T1-16S 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 from the current date and time, and stores the result in 6 registers starting with B.
If an invalid data is contained in the registers, the operation is not executed and the output is
turned 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

Register

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 ON, the date and time data recorded in D0050 to D0055 are subtracted from
the current date and time of clock/calendar, and the result is stored in D0100 to D0105.
In normal operation, the output is OFF (R0035 is OFF). If D0050 to D0055 contains invalid
data, the operation is not executed and the output is turned ON (R0035 comes ON).

F

0

F

0

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 time cannot be used as subtrahend A.

In the calculation result, it means that 1 year is 365 days and 1 month is 30 days.

Current date & time