14 spend time instruction (spend) – Yaskawa Ladder Works Programming Manual User Manual
Page 41
2.14 SPEND TIME Instruction (SPEND)
2-24
2.14 SPEND TIME Instruction (SPEND)
[Outline]
The SPEND instruction subtracts one time (year/month/day/hours/minutes/seconds) from another time
data and calculates the elapsed time. Source is subtracted from the Dest and the result is stored in the
Dest. The formats of Source and Dest are as follows.
Source Format
Register Offset
Data Contents
Data Range (BCD)
I/O
0 Year
(BCD)
0000~0099
IN
1
Month/Day (BCD)
Upper byte (month) : 1 to 12
Lower byte (day) : 1 to 31
IN
2
Hours/minutes (BCD)
Upper byte (hours) : 0 to 23
Lower byte (minutes) : 0 to 59
IN
3 Seconds
(BCD) 0000~0059
IN
Dest Format
Register Offset
Data Contents
Data Range (BCD)
I/O
0 Year
(BCD)
0000~0099
IN/OUT
1
Month/Day (BCD)
Upper byte (month) : 1 to 12
Lower byte (day) : 1 to 31
IN/OUT
2
Hours/minutes (BCD)
Upper byte (hours) : 0 to 23
Lower byte (minutes) : 0 to 59
IN/OUT
3 Seconds
(BCD) 0000~0059
IN/OUT
4
5
Total number of seconds This is the number of records which is
obtained by converting Year/Month/Day/
Hour/Minutes/Seconds, which is the results
of operations, to seconds. (Double-length
integer)
IN/OUT
If the contents of the Dest, Source and the operation result are with the appropriate ranges, the
operation will be performed normally. After the operation is completed, [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 : SPEND
Full Name : Time Spend
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