beautypg.com

Function, Hint, Sample program – Omron SYSMAC CP CP1E-N@@D@-@ User Manual

Page 197: 2 instructions

background image

2-161

2 Instructions

CP1E CPU Unit Instructions Reference Manual(W483)

Sym

bol

Math I

n

stru

ctio

ns

2

+C/+CL

Function

+C

+C(402) adds the binary values in Au, Ad, and CY and outputs the result to R.

+CL

+CL(403) adds the binary values in Au and Au+1, Ad and Ad+1, and CY and outputs the result to R.

Hint

To clear the Carry Flag (CY), execute the Clear Carry (CLC(041)) instruction.

Sample program

+

CY

R

CY

Au

Ad

(Signed binary)

(Signed binary)

(Signed binary)

CY will turn ON
when there is a
carry.

+

CY

R

CY

Au+1

Ad+1

R+1

Au

Ad

(Signed binary)

(Signed binary)

(Signed binary)

CY will turn ON
when there is a
carry.

0.00

0.00

When CIO 0.00 is ON, D200, D210, and CY will be added as
4-digit signed binary values and the result will be output to
D220.

When CIO 0.00 is ON, D201, D200, D211, D210, and CY will
be added as 8-digit signed binary values, and the result will
be output to D221 and D220.

+C

D200

D210

D220

+CL

D200

D210

D220

This manual is related to the following products: