6F3B0250

7. Instructions

FUN 155

CLDS

Calendar operation

T1S only

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).

Current date & time

 

 

 

H0098

 

 

D0050

 

H0001

 

 

D0051

 

H0015

 

minus

D0052

 

H0017

 

 

D0053

 

H0000

 

 

D0054

 

H0000

 

 

D0055

F0

H0097

H0010

H0010

H0015

H0030

H0000

D0100

D0101

D0102

D0103

D0104

D0105

F0

H0000

H0003

H0007

H0001

H0030

H0000

(Year)

(Month)

(Day)

(Hour)

(Minute)

(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.

236 T1/T1S User’s Manual

CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net

Page 238
Image 238
Toshiba PROSEC T1 T1S, 6F3B0250 user manual Clds, Calendar operation T1S only