beautypg.com

Function sample program, 2 instructions, Xorw – Omron SYSMAC CP CP1E-N@@D@-@ User Manual

Page 251: Xorl

background image

2-215

2 Instructions

CP1E CPU Unit Instructions Reference Manual(W483)

Lo

gic I

n

stru

ctio

ns

2

XOR

W/XORL

Function

Sample program

When the execution condition CIO 0.00 is ON, the logical exclusive OR is taken of corresponding bits in
CIO 151, CIO 150 and D1001, D1000 and the results will be output to corresponding bits in D1201 and
D1200.

XORW

XORW(036) takes the logical exclusive OR of
data specified in I

1

and I

2

and outputs the

result to R.

XORL

XORL(612) takes the logical exclusive OR of
data specified in I

1

and I

2

as double-word data

and outputs the result to R, R+1.

I

1

I

2

+ I

1

I

2

R

I

1

I

2

R

1

1

0

1

0

1

0

1

1

0

0

0

(I

1,

I

1

+1)

(I

2

, I

2

+1) + (I

1

, I

1

+1)

(I

2

, I

2

+1)

(R, R+1)

I

1,

I

1

+1

I

2,

I

2

+1

R, R+1

1

1

0

1

0

1

0

1

1

0

0

0

150.00

150.01

150.02

150.03

150.15

151.00

151.15

00

01

02

03

15

00

15

1

1

0

0

1

1

0

1

0

1

0

1

0

1

00

01

02

03

15

00

15

0

1

1

0

0

1

1

XORL

150

D1000

D1200

0.00

S

1

: 150CH

S

1

+1: 151CH

S

2

: D1000

S

2

+1: D1001

D: D1200

D+1: D1201

D1200

D1201

D1000

D1001

Note The symbol indicates exclusive logical OR.

This manual is related to the following products: