13 subtract time instruction (tmsub) – Yaskawa Ladder Works Programming Manual User Manual

Page 39

Advertising
background image

2.13 SUBTRACT TIME Instruction (TMSUB)

2-22

2.13 SUBTRACT TIME Instruction (TMSUB)

[Outline]

The TMSUB instruction subtracts one time (hours/minutes/seconds) from another time. The Source is
subtracted from the Dest and the result is stored in the Dest. The formats of Source and Dest are as
follows.

Data Format

Register Offset

Data Contents

Data Range (BCD)

0

Hours/minutes

Upper byte (hours) : 0 to 23
Lower byte (minutes) : 0 to 59

1 Seconds

0000~0059

If the contents of the Dest and Source are with the appropriate ranges, the operation will be performed
normally. After the operation is completed, the [Status] is turned OFF. If the contents of the Dest and
Source are outside the data ranges, the operation is not performed. In this case, 9999H is stored in the
column "second" of the Dest, and the [Status] is turned ON.

[Format]

Symbol : TMSUB
Full Name : Time Sub
Category : MATH

Icon :

[Parameter]

Parameter Name

Setting

Source

· Any integer type register
· Any integer type register with subscript

Dest

· Any integer type register (except for # and C register)
· Any integer type register with subscript (except for # and C register)

[Status]

· Any bit type register (except for # and C register)
· Any bit type register with subscript (except for # and C register)
* possible to omit

Advertising