Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 32 of 61

DL205 PLC User Manual, Volume 1 of 2: Chapter 5: RLL and Intelligent Box Instructions, pages 293 to 302

Pages 293 to 302 of 592, from DL205 PLC User Manual, Volume 1 of 2

The original document is the PDF (13 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the PLC Direct D2-08ND3 and Koyo D2-08ND3

Page 293

Chapter 5: Standard RLL Instructions - Logical

Logical Instructions (Accumulator)

1 And (AND) The And instruction is a 16-bit instruction that logically ANDs 2 the value in the lower 16 bits of the accumulator with a specified V-memory location (Aaaa). The result resides in the 3 accumulator. The discrete status flag indicates if the result of the

And is zero. 4 Operand Data Type DL230 Range DL240 Range DL250-1 Range DL260 Range A aaa aaa aaa aaa 5 6 Discrete Bit Flags Description 7 8 NOTE: The status flags are only valid until another instruction that uses the same flags is executed. In the following example, when X1 is on, the value in V2000 will be loaded into the accumulator using the Load instruction. The value in the accumulator is anded with the value 9 in V2006 using the And instruction. The value in the lower 16 bits of the accumulator is output to V2010 using the Out instruction. 10 11 12 13 14 A B C D 230

AND

240

A aaa

250-1 260

V-memory

V

All. See memory map

Pointer

P

-

SP63

All. See memory map All V-memory. See memory map

All. See All. See memory map memory map All V-memory. All V-memory. See memory map See memory map on when the result of the instruction causes the value in the accumulator to be zero.

DS Used HPP Used DirectSOFT X1

V2000

LD

V2000

Load the value in V2000 into the lower 16 bits of the accumulator

2

8

? 7

A

The upper 16 bits of the accumulator will be set to 0

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9

8

7

6 5

Acc.

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

1

0

0

0

0

1

4 3

1 1

2

1

0

1

0

1

0

AND

V2006

AND the value in the accumulator with the value in V2006

Acc.

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

1

0

0

0

0

1 1

1

1

0

1

0

6A38 AND (V2006)

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1 1

0

1

0

1

0

0

0

1

1

1

0

0

0

Acc.

0

0

0

0

0

0 1

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

0

0

0

0

1 1

1

0

0

0

2

8

3

8

1

OUT

V2010

Copy the lower 16 bits of the accumulator to V2010

V2010

Handheld Programmer Keystrokes $

B

1

STR

SHFT

V AND

GX OUT

L ANDST

ENT

D

C

A

2

3

SHFT

V AND

C

SHFT

V AND

C

A

0

A

2

0

A 2

A

0

A

0

B 0

0

G

6

A 1

0

ENT ENT ENT

DL205 User Manual, 4th Edition, Rev. A

5–71

Page 294

Chapter 5: Standard RLL Instructions - Logical

1

2

3 4 5 6 7 8 9 10 11 12 13 14 A B C D

And Double (ANDD) 230 240 250-1 260

DS Used HPP Used

The And Double is a 32-bit instruction that logically ANDs the value in the accumulator with two consecutive V-memory locations or an 8-digit (max.) constant value (Aaaa). The result resides in the accumulator. Discrete status flags indicate if the result of the And Double is zero or a negative number (the most significant bit is on). Operand Data Type

DL230 Range

ANDD A aaa

DL240 Range DL250-1 Range DL260 Range

A aaa aaa aaa aaa

V-memory

V

-

-

Pointer

P

-

-

Constant

K

0-FFFFFFFF

0-FFFFFFFF

All. See memory map All V-memory. See memory map 0-FFFFFFFF

All. See memory map All V-memory. See memory map 0-FFFFFFFF

Discrete Bit Flags

Description

SP63 SP70

Will be on if the result in the accumulator is zero Will be on if the result in the accumulator is negative

NOTE: The status flags are only valid until another instruction that uses the same flags is executed.

In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is anded with 36476A38 using the And Double instruction. The value in the accumulator is output to V2010 and V2011 using the Out Double instruction.

DirectSOFT

V2000

X1

5

LDD

4

7

V2000 E

2

8

7

A

V2000 Load the value in V2000 and V2001 into the accumulator

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9

8

7

6 5

Acc.

0

1

0

1

0

1

0

0

0

1

1

1

1 1

1

0

0

0

1

0

1

0

0

0

0

1

Acc.

0

1

0

1

0

1

0

0

0

1

1

1

1 1

1

0

0

0

1

0

1

0

0

0

0

1 1

AND 36476A38

0

0

1 1

0

1 1

0

0

1

0

0

0

1

1 1

0

1

1

0

1

0

1

0

0

0

Acc.

0

0

0

0

1

0

0

1 0

0

0

0

1 0

1 0

0

0

1

0

1

0

0

0

0

0

1 1

4

4

6

2

8

3

8

4 3

2

1

0

1

0

1

0

1

1

0

1

0

1 1

1

0

0

0

1

0

0

0

1 1

ANDD K36476A38 AND the value in the accumulator with the constant value 36476A38

1 0

0

0

OUTD V2010

1

V2011

Copy the value in the accumulator to V2010 and V2011

V2010

Handheld Programmer Keystrokes $

B STR

1

SHFT

L ANDST

D

V AND

SHFT

D

SHFT

D

GX OUT

5–72

ENT D

3 3 3

C

A

SHFT

K JMP

D

C

A

B

2

0

A 0

2

3

A 0

G 3

6 A

1

0 E

0

ENT H

4

G 7

ENT

DL205 User Manual, 4th Edition, Rev. A

6

SHFT

A 0

SHFT

D

I 3

8

ENT

Page 295

Chapter 5: Standard RLL Instructions - Logical

And Formatted (ANDF) And Formatted instruction logically ANDs the binary value in 230 The the accumulator and a specified range of discrete memory bits (1 to 240

32). The instruction requires a starting location (Aaaa) and number 250-1 of bits (Kbbb) to be ANDed. Discrete status flags indicate if the 260 result is zero or a negative number (the most significant bit =1). Operand Data Type DS Used HPP Used

Inputs Outputs Control Relays Stage bits Timer bits Counter bits Special Relays Global I/O Constant

ANDF A aaa K bbb

DL250-1 Range

DL260 Range

A aaa bbb aaa bbb

X Y C S T CT SP GX/GY K

0–777 0–777 0–1777 0–1777 0–377 0–177 0-777 -

– – – – – – – – 1–32

0–1777 0–1777 0–3777 0–1777 0–377 0–377 0–777 0-3777 -

– – – – – – – – 1–32

Discrete Bit Flags

Description

SP63 SP70

Will be on if the result in the accumulator is zero Will be on if the result in the accumulator is negative

NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on the Load Formatted instruction loads C10–C13 (4 binary bits) into the accumulator. The accumulator contents is logically ANDed with the bit pattern from Y20–Y23 using the And Formatted instruction. The Out Formatted instruction outputs the accumulator’s lower four bits to C20–C23. DirectSOFT X1

C10

LDF K4

Load the status of 4 consecutive bits (C10-C13) into the accumulator ANDF

Location

Constant

C10

K4

C13 C12 C11 C10 ON ON ON OFF

The unused accumulator bits are set to zero 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9

8

7 6 5

4 3

2

1

0

0

0

0 0

0

0

1 1

0

Y20 K4

0

0

0 0

0

0

0

0

0 0

0 0

0

0

0

0

0

0 0

0 0

0

0

0

0

0

0

Acc.

0

0

0 0

0

0

0 0

0

0

0

0 0

0

0

0

0 1

1

1

0

1

0

0

0

0 0

0

0

0

0 0

0

0

0

0 1

0

0

0

Accumulator

And the binary bit pattern (Y20-Y23) with the value in the accumulator

0

Acc.

0 0

0

0

0

0

Y23 Y22 Y21 Y20 ON OFF OFF OFF

AND (Y20-Y23) C20

OUTF

1

K4 Copy the value in the lower 4 bits in accumulator to C20-C23

Location

Handheld Programmer Keystrokes $

B STR

1

SHFT

L ANDST

D

V AND

SHFT

F

GX OUT

SHFT

F

C20

5 5

C23 C22 C21 C20

K4

ON OFF OFF OFF

ENT F

3

Constant

NEXT

NEXT

NEXT

C

A

PREV

PREV

5

2

NEXT

A 2

B

E

ENT

4

0 C

NEXT

A 1

E 0

4

E 0

4

ENT

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

ENT

DL205 User Manual, 4th Edition, Rev. A

5–73

Page 296

Chapter 5: Standard RLL Instructions - Logical

1 2

3 4 5 6 7 8 9 10 11 12 13 14 A B C D

And with Stack (ANDS) 230 240 250-1 260

DS Used HPP Used

The And with Stack instruction is a 32-bit instruction that logically ANDs the value in the accumulator with the first level of the accumulator stack. The result resides in the accumulator. The value in the first level of the accumulator stack is removed from the stack and all values are moved up one level. Discrete status flags indicate if the result of the And with Stack is zero or a negative number (the most significant bit is on). Discrete Bit Flags Description SP63 SP70

ANDS

Will be on if the result in the accumulator is zero Will be on if the result in the accumulator is negative

NOTE: Status flags are valid only until another instruction uses the same flag.

In the following example, when X1 is on, the binary value in the accumulator will be anded with the binary value in the first level of the accumulator stack. The result resides in the accumulator. The 32 bit value is then output to V1500 and V1501.

DirectSOFT X1

V1401

LDD 5

V1400

E

2

V1400 8 7

A

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9

8 7

6 5

4 3

2

1

0

Acc.

0

1

0 1

0

1

0

0 0

1

1

1

1 1

1

0

0

0

1 0

1

0

0

0 0

1

1

1

1 0

1

0

Acc.

0

1

0 1

0

1

0

0 0

1

1

1

1 1

1

0

0

0

1 0

1

0

0

0 0

1

1

1

1 0

1

0

(top of stack)

0

0

1

0 1

1

0

1 0

0

0

1 1

0

1

1

1 0

1

0

0 1

1

1

0

0 0

Acc.

0

0

0 0 1

0

0

0 0

1 0

0

0 0 1

1 0

0

0

1 0

1

0

0 0

0

1

1 0

0 0

4

6

8

8

ANDS

AND the value in the accumulator with the first level of the accumulator stack

36476A38 AND

1

1

0

0

1

0

0

0

0

OUTD V1500 1

Copy the value in the accumulator to V1500 and 1501

$

B

STR

1 D

D 3

3

V AND

SHFT

S RST

ENT

GX OUT

SHFT

D

B

E

F 1

A 4

1

B 3

4

V1501

ENT

L ANDST

5–74

7

Load the value in V1400 and 1401 into the accumulator

Handheld Programmer Keystrokes

SHFT

4

A 5

A 0

A 0

0

0

ENT

ENT

DL205 User Manual, 4th Edition, Rev. A

2

3

V1500

1

Page 297

Chapter 5: Standard RLL Instructions - Logical

Or (OR)

230 240 250-1 260

The Or instruction is a 16-bit instruction that logically ORs the value in the lower 16 bits of the accumulator with a specified V-memory location (Aaaa). The result resides in the accumulator. The discrete status flag indicates if the result of the Or is zero.

DS Used HPP Used

Operand Data Type

OR A aaa

DL230 Range DL240 Range DL250-1 Range DL260 Range A aaa aaa aaa aaa

V-memory

V

All See memory map

Pointer

P

-

All See memory map All V-memory. See memory map

All See memory map All V-memory. See memory map

All See memory map All V-memory. See memory map

Discrete Bit Flags

Description

SP63

Will be on if the result in the accumulator is zero

NOTE: The status flags are only valid until another instruction that uses the same flags is executed.

In the following example, when X1 is on, the value in V2000 will be loaded into the accumulator using the Load instruction. The value in the accumulator is ored with V2006 using the Or instruction. The value in the lower 16 bits of the accumulator are output to V2010 using the Out instruction. DirectSOFT X1

V2000

LD 2

V2000

8

7

A

The upper 16 bits of the accumulator will be set to 0

Load the value in V2000 into the lower 16 bits of the accumulator

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9

8

7

6 5

2

1

0

Acc.

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

1

0

0

0

0

1

1 1

1

0

1

0

V2006

Acc.

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

1

0

0

0

0

1

1 1

1

0

1

0

Or the value in the accumulator with the value in V2006

6A38 OR (V2006)

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

1

0

1

0

1

0

0

0

1 1

1

0

0

0

Acc.

0

0

0

0

0

0 1

0

0

0

0

0

0

0

0

0

0

0

1

1

0

1

0

1

0

0

1

1 1

1

0

1

0

6

A

7

A

4 3

OR

OUT V2010 Copy the value in the lower 16 bits of the accumulator to V2010

V2010

Handheld Programmer Keystrokes $

B STR

SHFT Q OR GX OUT

1 L ANDST

ENT

D

C 3

A 2

SHFT

V AND

C

SHFT

V AND

C

A 0

A 2

A 0

A 2

A 0

6

0 B

0

0 G A

1

0

ENT ENT ENT

DL205 User Manual, 4th Edition, Rev. A

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

5–75

Page 298

Chapter 5: Standard RLL Instructions - Logical

1 2

3 4 5 6 7 8 9 10 11 12 13 14 A B C D

Or Double (ORD) 230 240 250-1 260

The Or Double is a 32-bit instruction that ORs the value in the accumulator with the value (Aaaa) or an 8-digit (max.) constant value. The result resides in the accumulator. Discrete status flags indicate if the result of the Or Double is zero or a negative number (the most significant bit is on). Operand Data Type

DS Used HPP Used

DL230 Range

ORD A aaa

DL240 Range DL250-1 Range DL260 Range

A aaa aaa aaa aaa

V-memory

V

-

-

Pointer

P

-

-

Constant

K

0-FFFFFFFF

0-FFFFFFFF

All. See memory map All V-memory. See memory map 0-FFFFFFFF

All. See memory map All V-memory. See memory map 0-FFFFFFFF

Discrete Bit Flags

Description

SP63 SP70

Will be on if the result in the accumulator is zero Will be on if the result in the accumulator is negative

NOTE: The status flags are only valid until another instruction that uses the same flags is executed.

In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is ored with 36476A38 using the Or Double instruction. The value in the accumulator is output to V2010 and V2011 using the Out Double instruction.

DirectSOFT X1

V2001

LDD 5

V2000

4

7

V2000 E

2

8

7

A

Load the value in V2000 and V2001 into accumulator 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9

8

7

6 5

Acc.

0

1

0

1

0

1

0

0

0

1

1

1

1 1

1

0

0

0

1

0

1

0

0

0

0

1

Acc.

0

1

0

1

0

1

0

0

0

1

1

1

1 1

1

0

0

0

1

0

1

0

0

0

0

1 1

OR 36476A38

0

0

1

1

0

1

1

0

0

1

0

0

0

1 1

1

0

1 1

0

1

0

1

0

0

Acc.

0

0 1

0 1 10

0

1 10

0

0

0 1

0 1

1 0

1 0 10

1 0 10

0

1

0

1

0

1

0

0

6

7

F

6

A

7

A

K36476A38 OR the value in the accumulator with the constant value 36476A38

GX OUT

5–76

0

1

0

1

1

0

1

0

1

0

1 1

1

0

0

0

1

1 1

1

0

1

0

V2010 7

Copy the value in the accumulator to V2010 and V2011

B

STR

OR

1

0

OUTD

$

Q

2

1

ORD

V2011

V2010

Handheld Programmer Keystrokes

SHFT

4 3

1 1

1 L ANDST

D

SHFT

D

SHFT

D

ENT D

3 3 3

C

A

SHFT

K JMP

D

C

A

B

2

0

A 0

2

3

A 0

G 3

6 A

1

0 E

0

ENT H

4

G 7

ENT

DL205 User Manual, 4th Edition, Rev. A

6

SHFT

A 0

SHFT

D

I 3

8

ENT

Page 299

Chapter 5: Standard RLL Instructions - Logical

Or Formatted (ORF)

1 K bbb 2 3 Operand Data Type DL250-1 Range DL260 Range A aaa bbb aaa bbb 4 5 6 7 8 Discrete Bit Flags Description 9 10 NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on the Load Formatted instruction loads C10–C13 11 (4 binary bits) into the accumulator. The Or Formatted instruction logically ORs the accumulator contents with Y20–Y23 bit pattern. The Out Formatted instruction outputs the accumulator’s lower four bits to C20–C23. 12 13 14 A B C D The Or Formatted instruction logically ORs the binary value in the accumulator and a specified range of discrete bits (1 to 32). The instruction requires a starting location (Aaaa) and the number of bits (Kbbb) to be ORed. Discrete status flags indicate if the result is zero or negative (the most significant bit =1).

230 240 250-1 260 DS Used HPP Used

Inputs Outputs Control Relays Stage bits Timer bits Counter bits Special Relays Global I/O Constant

X Y C S T CT SP GX/GY K

SP63 SP70

0–777 0–777 0–1777 0–1777 0–377 0–177 0-777 -

– – – – – – – – 1–32

A aaa

0–1777 0–1777 0–3777 0–1777 0–377 0–377 0–777 0-3777 -

– – – – – – – – 1–32

Will be on if the result in the accumulator is zero Will be on if the result in the accumulator is negative

DirectSOFT X1

ORF

LDF

C10

Location

Constant

C13 C12 C11 C10

C10

K4

OFF ON ON OFF

K4

The unused accumulator bits are set to zero

Load the status of 4 consecutive bits (C10-C13) into the accumulator ORF

Acc.

Y20

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9

8

7 6 5

4 3

2

1

0

0

0

0 0

0

0

1 1

0

1

0

0

0

0

0

0 1

1

1

0

0

0

0 0

0

0

0

0 0

0

0

0

0 0

0

0

0

0

0

0

0 0

0

0

0

0 0

0

0

0 0

0 0

0

0

0

0

0 0

0

K4

OR the binary bit pattern (Y20 - Y23) with the value in the accumulator OUTF

Y23 Y22 Y21 Y20

ON OFF OFF OFF

OR (Y20- Y23)

Acc.

C20

0

0

0

0 0

0

0

0

K4

Copy the specified number of bits from the accumulator to C20-C23

Handheld Programmer Keystrokes $

B

STR

1

SHFT

L ANDST

D

Q

SHFT

F

SHFT

F

OR GX OUT

5 5

Constant

C23 C22 C21 C20

C20

K4

ON ON ON OFF

ENT

F

3

Location

NEXT

NEXT

NEXT

C

A

PREV

PREV

5

NEXT

C

A 2

B

E

ENT

4

0

2

NEXT

A

1

E 0

4

E

0

4

ENT

ENT

DL205 User Manual, 4th Edition, Rev. A

5–77

Page 300

Chapter 5: Standard RLL Instructions - Logical

1 2

3 4 5 6 7 8 9 10 11 12 13 14 A B C D

Or with Stack (ORS) 230 240 250-1 260

DS Used HPP Used

The Or with Stack instruction is a 32-bit instruction that logically ORs the value in the accumulator with the first level of the accumulator stack. The result resides in the accumulator. The value in the first level of the accumulator stack is removed from the stack and all values are moved up one level. Discrete status flags indicate if the result of the Or with Stack is zero or a negative number (the most significant bit is on). Discrete Bit Flags

OR S

Description

SP63 SP70

Will be on if the result in the accumulator is zero Will be on if the result in the accumulator is negative

In the following example, when X1 is on, the binary value in the accumulator will be ORed with the binary value in the first level of the stack. The result resides in the accumulator.

DirectSOFT X1

V1400

V1401

LDD

5

V1400

4

7

E

2

8

7

A

Load the value in V1400 and V1401 in the accumulator

Acc.

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9

8 7

6 5

4 3

0

0 0

1

1

1

1

0 1

0

1

0

0 0

1

1

1

1 1

1

0

0

0

1 0

1

0

0

2

1

0

1 0

1

0

0

ORS

OR the value in the accumulator with the value in the first level of the accumulator stack

Acc.

0

1

0 1

0

1

0

0 0

1

1

1

1 1

1

0

0

0

1 0

1

0

0

0 0

1

1

1

1 0

1

36476A38 OR (top of stack)

0

0

1

0 1

1

0

1 0

0

0

1 1

0

1

1

1 0

1

0

0 1

1

1

0 0

0

1 0

1 0 0 1

0

1 0

0 0

1 0

1 0

1 0 0 1

1 0

0

1

1 0

1

1

0 0

1

1

1 0

6

F

A

A

Acc.

1

1

0

1 0

1

1 0

0

0

0

OUTD V1500 Copy the value in the accumulator to V1500 and V1501

7

Handheld Programmer Keystrokes

5–78

$

B 1

STR

ENT

SHFT

L ANDST

D 3

3

Q

SHFT

S RST

ENT

SHFT

D

OR GX OUT

D

B

E

F 1

A 4

1

B 3

7

V1501

A 5

A 0

A 0

0

0

ENT

ENT

DL205 User Manual, 4th Edition, Rev. A

6

7

V1500

1

0

1

0

Page 301

Chapter 5: Standard RLL Instructions - Logical

Exclusive Or (XOR)

230 240 250-1 260 DS Used HPP Used

1 2 3 Operand Data Type DL230 Range DL240 Range DL250-1 Range DL260 Range A aaa aaa aaa aaa 4 5 Discrete Bit Flags Description 6 7 NOTE: The status flags are only valid until another instruction that uses the same flags is executed. 8 In the following example, when X1 is on, the value in V2000 will be loaded into the accumulator using the Load instruction. The value in the accumulator is exclusive ORed with V2006 using the Exclusive Or instruction. The value in the lower 16 bits of the accumulator 9 are output to V2010 using the Out instruction. 10 11 12 13 14 A B C D The Exclusive Or instruction is a 16-bit instruction that performs an exclusive OR of the value in the lower 16 bits of the accumulator and a specified V-memory location (Aaaa). The result resides in the accumulator. The discrete status flag indicates if the result of the XOR is zero.

V-memory

V

All See memory map

Pointer

P

-

SP63 SP70

DirectSOFT X1

All See memory map All V-memory. See memory map

XOR

A aaa

All See memory map All V-memory. See memory map

All See memory map All V-memory. See memory map

Will be on if the result in the accumulator is zero Will be on if the result in the accumulator is negative

V2000

LD

2

V2000

8

7

A

The upper 16 bits of the accumulator will be set to 0

Load the value in V2000 into the lower 16 bits of the accumulator

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Acc. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 1 0 0 1

0 0 0 1 1 1

1 0 1 0

XOR

V2006

XOR the value in the accumulator with the value in V2006

Acc.

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 1 0 0 1 0 0 0 1 1 1

1 0 1 0

6A38 XOR (V2006)

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 1 1

1 0 0 0

0 0 0 0 0 0 0 0 0 0 0 Acc. 0 0 0 0 0 1

0 1 0 1 0 0 0 1 1

0 1 0 0 1 1 1 0 0 1 0 0 0 0 1 0

OUT

V2010

4

Copy the lower 16 bits of the accumulator to V2010

E

4

2

V2010

Handheld Programmer Keystrokes $

B

STR

1

SHFT

L D 3 ANDST

SHFT

X SET

GX OUT

ENT

SHFT

SHFT

Q

SHFT

V AND

OR

C 2

V AND

C

SHFT

V AND

C

A

B

A

0

A

2

1

A

0

A

0

A

2 0

0

A

0

ENT

G

0

6

ENT

ENT

DL205 User Manual, 4th Edition, Rev. A

5–79

Page 302

Chapter 5: Standard RLL Instructions - Logical

1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D

Exclusive Or Double (XORD) Exclusive Or Double is a 32-bit instruction that 230 The performs an exclusive OR of the value in the 240 accumulator and the value (Kaaa), which is an 250-1 8-digit (max.) constant. The result resides in the 260 accumulator. Discrete status flags indicate if the DS Used HPP Used

XORD K aaa result of the Exclusive Or Double is zero or a negative number (the most significant bit is on). Operand Data Type Constant

DL230 Range K

DL240 Range DL250-1 Range DL260 Range aaa aaa aaa aaa

0-FFFFFFFF

0-FFFFFFFF

0-FFFFFFFF

0-FFFFFFFF

NOTE: The status flags are only valid until another instruction that uses the same flags is executed.

In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into Discrete Bit Flags

Description

SP63 SP70

Will be on if the result in the accumulator is zero Will be on if the result in the accumulator is negative the accumulator using the Load Double instruction. The value in the accumulator is exclusively ORed with 36476A38 using the Exclusive Or Double instruction. The value in the accumulator is output to V2010 and V2011 using the Out Double instruction.

DirectSOFT

V2001

X1

5

LDD

4 ?

7

V2000 E

2

8

7

A

V2000 Load the value in V2000 and V2001 into the accumulator

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9

8

7

6 5

Acc.

0

1

0

1

0

1

0

0

0

1

1

1

1 1

1

0

0

0

1

0

1

0

0

0

0

1

Acc.

0

1

0

1

0

1

0

0

0

1

1

1

1 1

1

0

0

0

1

0

1

0

0

0

0

1 1

XORD 36476A38

0

0

1

1

0

1

1

0

0

1

0

0

0

1 1

1

0

1 1

0

1

0

1

0

0

Acc.

0

1 0

1 0

0

0

0 1

1 0

0

0

0

1 0

1 0

1 0

0

1 0

0

1

0

0

0

1

0

0

2

3

9

4

2

4

2

XORD

4 3

2

1

0

1

0

1

0

1

1

0

1

0

0

1 1

1

0

0

0

1

0

0

0

1

0

1 1

K36476A38 XORD the value in the accumulator with the constant value 36476A38 OUTD

0

0

V2010 Copy the value in the accumulator to V2010 and V2011

6

V2011

Handheld Programmer Keystrokes $

B 1

STR SHFT

L ANDST

D

SHFT

X SET

Q

D

G

E

3 GX OUT

5–80

3 OR

6 SHFT

ENT D

4 D

C

SHFT

D

H

G 6 2

A

SHFT

K JMP

SHFT

A

SHFT

D

A

B

A

ENT

3

7

A 0

2

C 3

A 0

3

0

0 1

0

ENT

0

I 3

8

DL205 User Manual, 4th Edition, Rev. A

ENT

V2010

0