14 spend time instruction (spend), Outline, Format – Yaskawa MP900 Series Machine Controller New Ladder Editor User Manual

Page 51

Advertising
background image

1.2 Numeric Operation Instructions

1-41

1

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

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

Table 1.5 Source Format

Register Offset

Data Contents

Data Range (BCD)

I/O

0

Year (BCD)

0000 to 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 to 0059

IN

Table 1.6 Dest Format

Register Offset

Data Contents

Data Range (BCD)

I/O

0

Year (BCD)

0000 to 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 to 0059

IN/OUT

4

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

5

Symbol: SPEND
Full Name: Time Spend
Category: MATH
Icon:

Advertising
This manual is related to the following products: