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

The text of a manual · part 30 of 60

DL205 PLC User Manual, Volume 1 of 2, pages 291 to 300

Pages 291 to 300 of 598

The original document is the PDF (12 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 AutomationDirect D2-04TD1, AutomationDirect D2-08TD2, AutomationDirect D2-16ND3-2, AutomationDirect D2-32ND3, Konnect-It D2-04TD1, Koyo D2-04TD1, Konnect-It D2-08TD2, Koyo D2-08TD2, and 5 more models

Page 291

Chapter 5: Standard RLL Instructions

Out Formatted (OUTF)

1 2 3 Operand Data Type DL240 Range DL250-1 Range DL260 Range A aaa bbb aaa bbb aaa bbb 4 In the following example, when C0 is on, the binary pattern of C10–C16 (7 bits) will be 5 loaded into the accumulator using the Load Formatted instruction. The lower 7 bits of the accumulator are output to Y20–Y26 using the Out Formatted instruction. 6 7 8 9 10 11 12 13 14 A B C D

Out Formatted instruction outputs 1 to 32 bits from the 230 The accumulator to the specified discrete memory locations. The 240 instruction requires a starting location (Aaaa) for the destination 250-1 and the number of bits (Kbbb) to be output. 260 DS Used HPP Used

Constant

DirectSOFT C0

K

LDF

1-32

1-32

C10

K7

Load the status of 7 consecutive bits (C10–C16) into the accumulator

OUTF

Y20

Handheld Programmer Keystrokes SHFT

C

SHFT

L ANDST

D

F

SHFT

C

B

2

GX OUT

SHFT

C

A

2

0

F

3 1

A

2

A

0

Constant K7

C16 C15 C14 C13 C12 C11 C10

OFF OFF OFF ON ON ON OFF

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

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

1

Accumulator

Copy the value of the specified number of bits from the accumulator to Y20–Y26

STR

Location

C10

1-32

The unused accumulator bits are set to zero

K7

$

OUTF A aaa K bbb

Location

Constant

Y26 Y25 Y24 Y23 Y22 Y21 Y20

Y20

K7

OFF OFF OFF ON ON ON OFF

ENT

5

H

0

7

ENT

5

H

7

ENT

DL205 User Manual, 4th Edition, Rev. D

5-67

Page 292

Chapter 5: Standard RLL Instructions

1

2

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

Out Indexed (OUTX) 230 240 250-1 260

The Out Indexed instruction is a 16-bit instruction. It copies a 16-bit or 4-digit value from the first level of the accumulator stack to a source address offset by the value in the accumulator (V-memory + offset). This instruction interprets the offset value as a HEX number. The upper 16 bits of the accumulator are set to zero.

DS Used HPP Used

Operand Data Type

O UT X A aaa

DL250-1 Range

DL260 Range

A aaa aaa

V-memory

V

Pointer

P

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

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

In the following example, when X1 is on, the constant value 3544 is loaded into the accumulator. This is the value that will be output to the specified offset V-memory location (V1525). The value 3544 will be placed onto the stack when the Load Address instruction is executed. Remember, two consecutive Load instructions places the value of the first load instruction onto the stack. The Load Address instruction converts octal 25 to HEX 15 and places the value in the accumulator. The Out Indexed instruction outputs the value 3544, which resides in the first level of the accumulator stack to V1525.

DirectSOFT

5-68

X1

Constant

LD

3

K3544

5

4

4

5

4

4

The unused accumulator bits are set to zero.

Load the accumulator with the value 3544.

0

Acc.

0

0

0

3

Octal

LDA

2

O25 Load the HEX equivalent to octal 25 into the lower 16 bits of the accumulator. This is the offset for the Out Indexed instruction, which determines the final destinaltion address.

HEX 5

0

0

1

5

1

5

The unused accumulator bits are set to zero. Acc.

0

0

+ 2

V

V1500

1

5

0

0

0

0

=

V 1

5

2

5

3

5

4

4

Octal

Octal

OUTX

0

0

5

Octal

The hex 15 converts to 25 octal, which is added to the base address of V1500 to yield the final destination.

Copy the value in the first level of the stack to the offset address V1525 (V1500+25).

V1525

Handheld Programmer Keystrokes $

B

STR

1

SHFT

L ANDST

D

SHFT

L ANDST

D

GX OUT

SHFT

X SET

ENT PREV

3 3

A

D C

0 B

1

F

3 2 5

F F A

5

E

4

ENT

5 0

4

E

A

DL205 User Manual, 4th Edition, Rev. D

0

ENT

ENT

Accumulator Stack Level 1

0

0

0

0

3

5

4

4

Level 2

X

X X

X

X

X X

X

Level 3

X

X X

X

X

X X

X

Level 4

X

X X

X

X

X X

X

Level 5

X

X X

X

X

X X

X

Level 6

X

X X

X

X

X X

X

Level 7

X

X X

X

X

X X

X

Level 8

X

X X

X

X

X X

X

Page 293

Chapter 5: Standard RLL Instructions

Out Least (OUTL)

230 240 250-1 260

1 2 3 Operand Data Type DL260 Range 4 A aaa 5 6 7 8 9 Out Most (OUTM) 10 The Out Most instruction copies the value in the upper eight bits O UT M of the lower 16 bits of the accumulator to the upper eight bits of A aaa 11 the specified V-memory location (i.e., it copies the high byte of the low word of the accumulator). 12 Operand Data Type DL260 Range aaa 13 14 In the following example, when X1 is on, the value in V1400 will be loaded into the lower 16 bits of the accumulator using the Load instruction. The value in the upper 8 bits of the lower A 16 bits of the accumulator are copied to V1500 using the Out Most instruction. B C D

DS Used HPP Used

The Out Least instruction copies the value in the lower eight O UT L bits of the accumulator to the lower eight bits of the specified A aaa V-memory location (i.e., it copies the low byte of the low word of the accumulator). In the following example, when X1 is on, the value in V1400 will be loaded into the lower 16 bits of the accumulator using the Load instruction. The value in the lower 8 bits of the accumulator are copied to V1500 using the Out Least instruction.

V-memory Pointer

V P

X1

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

Load the value in V1400 into the lower 16 bits of the accumulater

LD

V1400

Copy the value in the lower 8 bits of the accumulator to V1500

OUTL

V1500

8

9

3

5

9

3

5

0

3

5

The unused accumulator bits are set to zero

Acc. 0

0

0

0

8

Handheld Programmer Keystrokes $

B

STR

SHFT

GX OUT

230 240 250-1 260

DS Used HPP Used

1

L ANDST

D

SHFT

L ANDST

ENT

B

3

1

B

1

E F

4 5

A A

0 0

A A

X1

V1500

ENT

0

A V P

V-memory Pointer

0

ENT

0

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

V1400

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

LD

V1400

Copy the value in the upper 8 bits of the lower 16 bits of the accumulator to V1500

OUTM

V1500

8

9

3

5

9

3

5

9

0

0

The unused accumulator bits are set to zero Acc.

0

0

0

0

8

Handheld Programmer Keystrokes $

B

STR

1

SHFT

L ANDST

D

GX OUT

SHFT

M ORST

3

8

ENT

B B

1 1

E F

4 5

A A

0 0

A A

V1500

0 0

ENT ENT

DL205 User Manual, 4th Edition, Rev. D

5-69

Page 294

Chapter 5: Standard RLL Instructions

Pop (POP)

The Pop instruction moves the value from the first level 1 of the accumulator stack (32 bits) to the accumulator and shifts each value in the stack up one level. In the example below, when C0 is on, the value 4545 that was on top of 2 the stack is moved into the accumulator using the Pop

The value is output to V2000 using the Out instruction. The next Pop moves 3 DS Used instruction. the value 3792 into the accumulator and outputs the value to V2001. The last Pop moves the value 7930 into the accumulator and outputs the value to V2002. Please note if the value in 4 HPP Used the stack were greater than 16 bits (4 digits) the Out Double instruction would be used and two V-memory locations for each Out Double must be allocated. 5 Discrete Bit Flags Description 6 7 8 9 10 11 12 13 14 A B C D 230

POP

240

250-1 260

SP63

On when the result of the instruction causes the value in the accumulator to be zero.

DirectSOFT

Previous Acc. value

C0

POP

Acc. X

X

X

X

X X

X X

X

X

0

44 55 44 55

Accumulator Stack

Current Acc. value

Pop the 1st. value on the stack into the accumulator and move stack values up one location

Acc. 0

0

0

OUT

V2000

V2000

Copy the value in the lower 16 bits of the accumulator to V2000 POP

4

5

4

5

Level 1

0 0 0

0

0

3

7

9

2

Level 2

0 0 0

0

0

7

9

3

0

Level 3

X

X

X

X

X

X

X

X

Level 4

X

X

X

X

X

X

X

X

Level 5

X

X

X

X

X

X

X

X

Level 6

X

X

X

X

X

X

X

X

Level 7

X

X

X

X

X

X

X

X

Level 8

X

X

X

X

X

X

X

X

Level 1

0

0

0

0

7

9

3

0

Level 2

X

X

X

X

X

X

X

X

Level 3

X

X

X

X

X

X

X

X

Level 4

X

X

X

X

X

X

X

X

Level 5

X

X

X

X

X

X

X

X

Level 6

X

X

X

X

X

X

X

X

Level 7

X

X

X

X

X

X

X

X

Level 8

X

X

X

X

X

X

X

X

Level 1

X

X

X

X

X

X

X

X

Level 2

X

X

X

X

X

X

X

X

Level 3

X

X

X

X

X

X

X

X

Level 4

X

X

X

X

X

X

X

X

Level 5

X

X

X

X

X

X

X

X

Level 6

X

X

X

X

X

X

X

X

Level 7

X

X

X

X

X

X

X

X

Level 8

X

X

X

X

X

X

X

X

Previous Acc. value Acc. 0

Pop the 1st. value on the stack into the accumulator and move stack values up one location

0

0

0

44 55 44 55

0

3

Accumulator Stack

Current Acc. value Acc. 0

0

0

7

9

2

OUT

V2001

Copy the value in the lower 16 bits of the accumulator to V2001

V2001

3

7

9

2

POP

Previous Acc. value

Pop the 1st. value on the stack into the accumulator and move stack values up one location

Acc. 0

0

0

0

3

7

9

2

0

7

9

3

0

Accumulator Stack

Current Acc. value Acc. 0

OUT

0

0

V2002

Copy the value in the lower 16 bits of the accumulator to V2002

V2002

Handheld Programmer Keystrokes $

STR

SHFT

P

CV

GX OUT

SHFT

P

CV

GX OUT

SHFT GX OUT

5-70

P

CV

SHFT

C

SHFT

O INST#

P

SHFT

V AND

C

SHFT

O INST#

P

SHFT

V AND

C

SHFT

O INST#

P

SHFT

V AND

C

2

A

0

CV 2

CV 2

CV 2

ENT ENT

A

0

A

0

A

0

ENT

ENT

A

0

A

0

B

1

ENT

ENT A

0

A

0

C

2

ENT

DL205 User Manual, 4th Edition, Rev. D

7

9

3

0

Page 295

Chapter 5: Standard RLL Instructions

Logical Instructions (Accumulator)

1 The And instruction is a 16-bit instruction that logically 2 ANDs 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 3 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 9 using the Load instruction. The value in the accumulator is anded with the value in V2006 using the And instruction. The value in the lower 16 bits of the accumulator is output to 10 V2010 using the Out instruction. 11 12 13 14 A B C D

And (AND)

230 240 250-1 260

DS Used HPP Used DirectSOFT X1

AND

A aaa

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

V-memory

V

All. See memory map

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

Pointer

P

-

SP63

On when the result of the instruction causes the value in the accumulator to be zero.

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

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

8

3

8

1

OUT

V2010

2

Copy the lower 16 bits of the accumulator to V2010

V2010

Handheld Programmer Keystrokes $

STR

SHFT V AND GX OUT

B

L ANDST

D

1

ENT

C

3

SHFT

V AND

C

SHFT

V AND

C

2

2 2

A A A

0 0 0

A A B

0 0 1

A

G A

0

6

0

ENT ENT ENT

DL205 User Manual, 4th Edition, Rev. D

5-71

Page 296

Chapter 5: Standard RLL Instructions

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 A

V-memory

V

Pointer

P

Constant

K

ANDD A aaa

DL240 Range DL250-1 Range DL260 Range aaa aaa

-

-

0-FFFFFFFF

0-FFFFFFFF

- aaa

-

Discrete Bit Flags aaa

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

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

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

Load the value in V2000 and V2001 into 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 0

1

0

1

0

1

0

0

0

1

1

1

1

1

1

0

0

0

1

0

8

7

6 5

1

0

0

0

0

1

4 3

1 1

2

1

0

1

0

1

0

ANDD 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

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

1 1

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

1

0

0

0

4

4

6

8

3

8

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

1 0

0

0

OUTD V2010

1

2

V2011

Copy the value in the accumulator to V2010 and V2011

V2010

Handheld Programmer Keystrokes $

A

V2000

B

STR

SHFT

L ANDST

D

V AND

SHFT

D

SHFT

D

GX OUT

5-72

1 3 3 3

ENT D

C

3

2

A

SHFT

K JMP

D

C

A

B

2

0

0 3 1

A G A

0 6 0

A E

0 4

ENT H

7

G

ENT

DL205 User Manual, 4th Edition, Rev. D

6

SHFT

A

0

SHFT

D

3

I

8

ENT

Page 297

Chapter 5: Standard RLL Instructions

And Formatted (ANDF)

1 2 Operand Data Type DL250-1 Range DL260 Range 3 A aaa bbb aaa bbb 4 5 6 7 Discrete Bit Flags Description 8 9 NOTE: Status flags are valid only until another instruction uses the same flag. 10 In the following example, when X1 is on, the Load Formatted instruction loads C10–C13 (4 binary bits) into the accumulator. The accumulator content is logically ANDed with the bit pattern from Y20–Y23 using the And Formatted instruction. The Out Formatted instruction 11 outputs the accumulator’s lower four bits to C20–C23. 12 13 14 A B C D

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 result 260 is zero or a negative number (the most significant bit =1).

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

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

SP63 SP70

DirectSOFT X1

– – – – – – – – 1–32

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

Location

Constant

K4

C10

K4

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

The unused accumulator bits are set to zero

C10

LDF

ANDF

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

1

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

C13 C12 C11 C10 ON ON ON OFF

K4

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

Location

Handheld Programmer Keystrokes $

STR

B

L ANDST

D

V AND

SHFT

F

GX OUT

SHFT

F

SHFT

1

3

5 5

C20

ENT

F

NEXT

NEXT

NEXT

C

A

PREV

PREV

5

2

C

NEXT

0 2

NEXT

E A

0

4

B

1

A

0

E

4

Constant

C23 C22 C21 C20

K4

ON OFF OFF OFF ndard RLL

DS Used HPP Used

ANDF A aaa K bbb

ENT

ENT E

4

ENT

DL205 User Manual, 4th Edition, Rev. D

5-73

Page 298

Chapter 5: Standard RLL Instructions

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

ANDS

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

4

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

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

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

1

L ANDST

D

V AND

SHFT

S RST

GX OUT

SHFT

D

5-74

2

ANDS

STR

SHFT

V1400 E

Load the value in V1400 and 1401 into the accumulator

3

3

ENT D

B

3

1

E

4

A

0

A

0

ENT

ENT B

1

4

V1501

Handheld Programmer Keystrokes $

7

F

5

A

0

A

0

ENT

DL205 User Manual, 4th Edition, Rev. D

2

3

V1500

1

Page 299

Chapter 5: Standard RLL Instructions

Or (OR)

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. In the following example, when X1 is on, the value in V2000 will be loaded into the accumulator 8 using the Load instruction. The value in the accumulator is OR’d with V2006 using the OR instruction. The value in the lower 16 bits of the accumulator are output to V2010 using the 9 Out instruction. 10 11 12 13 14 A B C D 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.

V-memory

V

All See memory map

Pointer

P

-

SP63

DirectSOFT X1

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

OR

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

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

A

7

A

4 3

OR

OUT

V2010

6

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

V2010

Handheld Programmer Keystrokes $

B

STR

SHFT Q

OR

GX OUT

L ANDST

D

1

ENT

C

3

SHFT

V AND

C

SHFT

V AND

C

2

2 2

A A A

0 0 0

A A B

0 0 1

A

G A

0

6

0

ENT ENT ENT

DL205 User Manual, 4th Edition, Rev. D

5-75

Page 300

Chapter 5: Standard RLL Instructions

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 A

V-memory

V

Pointer

P

Constant

K

ORD A aaa

DL240 Range DL250-1 Range DL260 Range aaa aaa

-

-

0-FFFFFFFF

0-FFFFFFFF

- aaa

-

Discrete Bit Flags aaa

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

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

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 OR’d 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

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

1 0

0 1 10

0

1 10

0

0

0 1

0 1

0 1 0 1 1 0

0 1 10

0

1

0

1

0

1

0

0

6

7

F

A

7

A

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

B L ANDST

D

Q

SHFT

D

SHFT

D

5-76

1

0

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

SHFT OR

2

1

OUTD

STR

GX OUT

4 3

1 1

ORD

6

V2011

V2010

Handheld Programmer Keystrokes $

A

Load the value in V2000 and V2001 into accumulator

1 3 3 3

ENT D

C

3

2

A

SHFT

K JMP

D

C

A

B

2

0

0 3 1

A G A

0 6 0

A E

0 4

ENT H

7

G

ENT

DL205 User Manual, 4th Edition, Rev. D

6

SHFT

A

0

SHFT

D

3

I

8

ENT