beautypg.com

Flags function, 2 instructions, Operand specifications – Omron SYSMAC CP CP1E-N@@D@-@ User Manual

Page 419: Cadd, Csub

background image

2-383

2 Instructions

CP1E CPU Unit Instructions Reference Manual(W483)

Clo

c

k

I

n

stru

ctio

ns

2

CADD/C

S

U

B

Operand Specifications

Flags

Function

CADD

CADD(730) adds the calendar data (words C through C+2) to the
time data (words T and T+1) and outputs the resulting calendar data
to R through R+2.

CSUB

CSUB(731) subtracts the time data (words T and T+1) from the cal-
endar data (words C through C+2) to and outputs the resulting calen-
dar data to R through R+2.

Area

Word addresses

Indirect DM addresses

Constants

CF

Pulse bits

TR bits

CIO

WR

HR

AR

T

C

DM

@DM

*DM

C

OK

OK

OK

OK

OK

OK

OK

OK

OK

---

---

---

---

T

OK

R

---

Name

Label

Operation

Error Flag

P_ER

ON if the calendar data in C through C+2 is not within the specified ranges.

ON if the time data in T and T+1 is not within the specified ranges.

OFF in all other cases.

Equal Flag

P_EQ

ON when the result of a CSUB instruction is 0.

OFF in all other cases.

C+1

C

C+2

T+1

T

R+1

R

R+2

+

15

7

0

8

15

7

0

8

15

7

0

8

Minutes

Seconds

Day

Hour

Year

Month

Minutes

Seconds

Minutes

Seconds

Day

Hour

Year

Month

Hours

C+1

C

C+2

T+1

T

R+1

R

R+2

-

15

7

0

8

15

7

0

8

15

7

0

8

Minutes

Seconds

Day

Hour

Year

Month

Minutes

Seconds

Minutes

Seconds

Day

Hour

Year

Month

Hours

This manual is related to the following products: