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

The text of a manual · part 29 of 68

DL405 User Manual: Chapter 5: Standard RLL Instructions, pages 243 to 252

Pages 243 to 252 of 608, from DL405 User Manual

The original document is the PDF (8.2 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 D4-08B-1, AutomationDirect D4-08ND3S, AutomationDirect D4-16TA, PLC Direct D4-16TD2, AutomationDirect D4-32ND3-1, Konnect-It D4-08B-1, Koyo D4-08B-1, Konnect-It D4-08ND3S, and 6 more models

Page 243

5--71

Standard RLL Instructions Accumulator Logic Instructions

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

And Double (ANDD)

430 440 450

DS

HPP

Operand Data Type

ANDD A aaa

DL430 Range

DL440 Range

DL440 Range

A aaa aaa aaa

V--memory

V

----

All (See p. 3--41)

All (See p. 3--42)

Pointer

P

----

All (See p. 3--41)

All (See p. 3--42)

Constant

K

0--FFFF

0--FFFF

0--FFFF

Discrete Bit Flags

Description

SP63

Will be on if the result in the accumulator is zero

SP70

Will be on is 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 value in V1400 and V1401 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is Anted with V1420 and V1421 using the And double instruction. The value in the accumulator is output to V1500 and V1501 using the Out Double instruction. DirectSOFT X1

V1400

V1401

LDD

5

V1400

4

7

E

2

8

7

A

Load the value in V1400 and V1401 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

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

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

0

0

1 0

0

1

0

0

0

1 0

0

0

0

1 0

1 0

0

0

0

1

0

1

0

0

0

0

0

1

1

1

0

0

0

4

4

6

2

8

3

8

ANDD V1420

36476A38 AND the value in the AND (V1421 and V1420) 0 accumulator with the value in V1420 and V1421 Acc. 0 OUTD V1500

1

Copy the value in the accumulator to V1500 and V1501 Handheld Programmer Keystrokes

V1501

X(IN)

1

LD

SHFT

D

SHFT

V

1

4

0

0

AND

SHFT

D

SHFT

V

1

4

2

0

OUT

SHFT

D

SHFT

V

1

5

0

0

Standard RLL Instructions

STR

V1500

DL405 User Manual, 4th Edition

Page 244

5--72

Standard RLL Instructions Accumulator Logic Instructions

The And Formatted instruction logically ANDs the binary value in the accumulator and a specified range of discrete memory bits (1--32). The instruction requires a starting location (Aaaa) and number of bits (Kbbb) to be ANDed. Discrete status flags indicate if the result is zero or a negative number (the most significant bit =1).

And Formatted (ANDF)

430 440 450

DS

HPP

Operand Data Type

ANDF A aaa K bbb

DL440 Range

Inputs

DL450 Range

A/B aaa bbb aaa bbb

X

0--477

----

0--1777

----

Outputs

Y

0--477

----

0--1777

----

Control Relays

C

0--1777

----

0--3777

----

Stage Bits

S

0--1777

----

0--1777

----

Timer Bits

T

0--377

----

0--377

----

Counter Bits

CT

0--177

----

0--377

----

Special Relays

SP

0--137 320--717

----

0--137 320--717

----

Global I/O

GX

0--1777

----

0--2777

----

Constant

K

----

1--32

----

1--32

Discrete Bit Flags

Description

SP63

Will be on if the result in the accumulator is zero

SP70

Will be on is 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

LDF

C10 K4

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

K4

C13 C12 C11 C10 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 0

0

0

0

8

7

6 5

4 3

2

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

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

1

1

1

0

1

0

0

0

Acc.

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

Acc.

0

0

0

0

Y23 Y22 Y21 Y20 AND (Y20--Y23)

Standard RLL Instructions

Constant

The unused accumulator bits are set to zero

Y20

OUTF

Location C10

ON OFF OFF OFF

C20 K4

Copy the value in the lower 4 bits in accumulator to C20--C23 Handheld Programmer Keystrokes STR

X(IN)

1

LD

SHFT

F

SHFT

C(CR)

1

0

K(CON)

4

AND

SHFT

F

SHFT

Y(OUT)

2

0

K(CON)

4

OUT

SHFT

F

SHFT

C(CR)

2

0

K(CON)

4

DL405 User Manual, 4th Edition

Location

Constant

C23 C22 C21 C20

C20

K4

ON OFF OFF OFF

Page 245

5--73

Standard RLL Instructions Accumulator Logic Instructions

And with Stack (ANDS)

430 440 450

DS

HPP

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

ANDS

Discrete Bit Flags

Description

SP63

Will be on if the result in the accumulator is zero

SP70

Will be on is 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 Anted with the binary value in the first level or 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

7

V1400 E

2

8

7

A

Load the value in V1400 and V1401 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

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

ANDS

AND the value in the accumulator with 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

0

36476A38 AND (top of stack)

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

1 0

0

1

0

0

0

1 0

0

0

0

1 0

1 0

0

0

0

1

0

1

0

0

0

0

0

1

1

1

0

0

0

4

4

6

2

8

3

8

OUTD V1500 1

Copy the value in the accumulator to V1500 and V1501

V1501

V1500

Handheld Programmer Keystrokes STR

X(IN)

1

LD

SHFT

D

AND

SHFT

S

OUT

SHFT

D

SHFT

V

1

4

0

0

SHFT

V

1

5

0

0

Standard RLL Instructions

DL405 User Manual, 4th Edition

Page 246

5--74

Standard RLL Instructions Accumulator Logic Instructions

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 in the accumulator. The discrete status flag indicates if the result of the Or is zero.

Or (OR)

430 440 450

DS

HPP

Operand Data Type

OR A aaa

DL430 Range

DL440 Range

DL440 Range

A aaa aaa aaa

V--memory

V

All (See p. 3--40)

All (See p. 3--41)

All (See p. 3--42)

Pointer

P

----

All V mem (See p. 3--41)

All V mem (See p. 3--42)

Discrete Bit Flags

Description

SP63

Will be on if the result in the accumulator is zero

NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 will be loaded into the accumulator using the Load instruction. The value in the accumulator is Hoped with V1420 using the Or instruction. The value in the lower 16 bits of the accumulator is output to V1500 using the Out instruction. DirectSOFT X1

V1400

LD V1400 Load the value in V1400 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

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

1

0

0

0

0

1

1

1

1

0

1

0

V1420

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 V1420

6A38 OR (V1420)

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

OR

OUT V1500

Standard RLL Instructions

Copy the value in the lower 16 bits of the accumulator to V1500 Handheld Programmer Keystrokes STR

X(IN)

1

V1500

LD

V

1

4

0

0

OR

V

1

4

2

0

OUT

V

1

5

0

0

DL405 User Manual, 4th Edition

Page 247

5--75

Standard RLL Instructions Accumulator Logic Instructions

The OR Double is a 32 bit instruction that ORs the value in the accumulator with the value (Aaaa), which is either two consecutive V--memory locations 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).

Or Double (ORD)

430 440 450

DS

HPP

Operand Data Type

ORD A aaa

DL430 Range

DL440 Range

DL450 Range

A aaa aaa aaa

V--memory

V

----

All (See p. 3--41)

All (See p. 3--42)

Pointer

P

----

All (See p. 3--41)

All (See p. 3--42)

Constant

K

0--FFFF

0--FFFF

0--FFFF

Discrete Bit Flags

Description

SP63

Will be on if the result in the accumulator is zero

SP70

Will be on is 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 value in V1400 and V1401 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is Hoped with V1420 and V1421 using the Or Double instruction. The value in the accumulator is output to V1500 and V1501 using the Out Double instruction. DirectSOFT X1

V1401

LDD

5

V1400

4

7

V1400 E

2

8

7

A

Load the value in V1400 and V1401 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

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

0

1

1

0

1

0

1

0

0

0

1

1

1

0

0

0

0

1

1

0

1

0

1

0

0

1

1

1

1

0

1

0

6

A

7

A

ORD V1420

36476A38 OR the value in the OR (V1421 and V1420) 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 accumulator with the value in V1420 and V1421 1 0 1 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Acc. 0 0 OUTD V1500 7

6

7

V1501

F

V1500

Standard RLL Instructions

Copy the value in the accumulator to V1500 and V1501 Handheld Programmer Keystrokes STR

X(IN)

1

LD

SHFT

D

SHFT

V

1

4

0

0

OR

SHFT

D

SHFT

V

1

4

2

0

OUT

SHFT

D

SHFT

V

1

5

0

0

DL405 User Manual, 4th Edition

Page 248

5--76

Standard RLL Instructions Accumulator Logic Instructions

The Or Formatted instruction logically ORs the binary value in the accumulator and a specified range of discrete bits (1--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).

Or Formatted (ORF)

430 440 450

DS

HPP

Operand Data Type

ORF

A aaa K bbb

DL440 Range

DL450 Range

A/B aaa bbb aaa bbb

X

0--477

----

0--1777

----

Inputs Outputs

Y

0--477

----

0--1777

----

Control Relays

C

0--1777

----

0--3777

----

Stage Bits

S

0--1777

----

0--1777

----

Timer Bits

T

0--377

----

0--377

----

Counter Bits

CT

0--177

----

0--377

----

Special Relays

SP

0--137 320--717

----

0--137 320--717

----

Global I/O

GX

0--1777

----

0--2777

----

Constant

K

----

1--32

----

1--32

Discrete Bit Flags

Description

SP63

Will be on if the result in the accumulator is zero

SP70

Will be on is 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 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. DirectSOFT X1

LDF

C10 K4

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

Acc.

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

K4

C13 C12 C11 C10 OFF 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 0

0

0

0

0

0

8

7

6 5

4 3

2

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

1

0

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

1

1

1

0

Y23 Y22 Y21 Y20 OR (Y20--Y23)

C20

Acc.

K4

Standard RLL Instructions

Constant

The unused accumulator bits are set to zero

Y20

OUTF

Location C10

ON OFF OFF OFF 0

0

0

0

0

0

Copy the specified number of bits from the accumulator to C20--C23 Handheld Programmer Keystrokes STR

X(IN)

1

LD

SHFT

F

SHFT

C(CR)

1

0

K(CON)

4

OR

SHFT

F

SHFT

Y(OUT)

2

0

K(CON)

4

OUT

SHFT

F

SHFT

C(CR)

2

0

K(CON)

4

DL405 User Manual, 4th Edition

Location

Constant

C23 C22 C21 C20

C20

K4

ON ON ON OFF

Page 249

5--77

Standard RLL Instructions Accumulator Logic Instructions

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

Or with Stack (ORS)

430 440 450

DS

HPP

ORS

Discrete Bit Flags

Description

SP63

Will be on if the result in the accumulator is zero

SP70

Will be on is the result in the accumulator is negative

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

V1401

LDD

5

V1400

4

7

V1400 E

2

8

7

A

Load the value in V1400 and V1401 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

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

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

0

36476A38 Or (Top of stack)

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

1 0

1 0

1 0

0

1

1 0

0

0

1 0

1 0

1 0

1 0

1 0

1 0

1 0

0

1

1

0

1

0

1

0

0

1

1

1

1

0

1

0

6

7

F

6

A

7

A

OUTD V1500 7

Copy the value in the accumulator to V1500 and V1501

V1501

V1500

Handheld Programmer Keystrokes STR

X(IN)

1

LD

SHFT

D

OR

SHFT

S

OUT

SHFT

D

SHFT

V

1

4

0

0

SHFT

V

1

5

0

0

Standard RLL Instructions

DL405 User Manual, 4th Edition

Page 250

5--78

Standard RLL Instructions Accumulator Logic Instructions

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 discrete status flag indicates if the result of the Xor is zero.

Exclusive Or (XOR)

430 440 450

DS

HPP

Operand Data Type

XOR A aaa

DL430 Range

DL440 Range

DL440 Range

A aaa aaa aaa

V--memory

V

All (See p. 3--40)

All (See p. 3--41)

All (See p. 3--42)

Pointer

P

----

All V mem (See p. 3--41)

All V mem (See p. 3--42)

Discrete Bit Flags

Description

SP63

Will be on if the result in the accumulator is zero

NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the value in V1400 will be loaded into the accumulator using the Load instruction. The value in the accumulator is exclusive Hoped with V1420 using the Exclusive Or instruction. The value in the lower 16 bits of the accumulator is output to V1500 using the Out instruction. DirectSOFT X1

V1400

LD V1400 Load the value in V1400 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

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

1

0

0

0

0

1

1

1

1

0

1

0

XOR V1420 XOR the value in the accumulator with the value in V1420

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 XOR (V1420)

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

0

0

0

0

1

0

0

1

0

0

0

0

1

0

4

E

4

2

OUT V1500 Copy the lower 16 bits of the accumulator to V1500

V1500

Standard RLL Instructions

Handheld Programmer Keystrokes STR

X(IN)

1

LD

V

1

4

0

0

SHFT

X

SHFT

OR

V

1

OUT

V

1

5

0

0

DL405 User Manual, 4th Edition

4

2

0

Page 251

5--79

Standard RLL Instructions Accumulator Logic Instructions

The Exclusive OR Double is a 32 bit instruction that performs an exclusive or of the value in the accumulator and the value (Aaaa), which is either two consecutive V-memory locations or an 8 digit (max.) constant. The result resides in the accumulator. Discrete status flags indicate if the result of the Exclusive Or Double is zero or a negative number (the most significant bit is on).

Exclusive Or Double (XORD)

430 440 450

DS

HPP

Operand Data Type

XORD A aaa

DL430 Range

DL440 Range

DL450 Range

A aaa aaa aaa

V--memory

V

----

All (See p. 3--41)

All (See p. 3--42)

Pointer

P

----

All (See p. 3--41)

All (See p. 3--42)

Constant

K

0--FFFF

0--FFFF

0--FFFF

Discrete Bit Flags

Description

SP63

Will be on if the result in the accumulator is zero

SP70

Will be on is 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 value in V1400 and V1401 will be loaded into the accumulator using the Load Double instruction. The value in the accumulator is exclusively Hoped with V1420 and V1421 using the Exclusive Or Double instruction. The value in the accumulator is output to V1500 and V1501 using the Out Double instruction. DirectSOFT X1

V1401

LDD

5

V1400

4

7

V1400 E

2

8

7

A

Load the value in V1400 and V1401 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

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.

XORD V1420 XORD the value in the accumulator with the value in V1420 and V1421

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

36476A38 XORD (V1421 and V1420) 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

0

1 0

1 0

0

0

0 1

1 0

0

0

0

1 0

1 0

1 0

0

0

1 0

0

1

0

0

0

0

1

0

0

1

0

0

0

0

1

0

2

3

9

4

2

4

2

Acc.

OUTD V1500 6

STR

X(IN)

1

LD

SHFT

D

SHFT

X

OUT

SHFT

V1501

SHFT

V

1

4

0

0

SHFT

OR

SHFT

D

SHFT

V

1

D

SHFT

V

1

5

0

0

V1500

4

2

0

DL405 User Manual, 4th Edition

Standard RLL Instructions

Copy the value in the accumulator to V1500 and V1501 Handheld Programmer Keystrokes

Page 252

5--80

Standard RLL Instructions Accumulator Logic Instructions

Exclusive Or Formatted (XORF)

The Exclusive Or Formatted instruction performs an exclusive OR of the binary value in the accumulator and a specified range of discrete memory bits (1--32).

430 440 450

The instruction requires a starting location (Aaaa) and the number of bits (Bbbb) to be exclusive ORed. Discrete status flags indicate if the result of the Exclusive Or Formatted is zero or negative (the most significant bit =1).

DS

HPP

Operand Data Type

XORF A aaa K bbb

DL440 Range

DL450 Range

A/B aaa bbb aaa bbb

X

0--477

----

0--1777

----

Inputs Outputs

Y

0--477

----

0--1777

----

Control Relays

C

0--1777

----

0--3777

----

Stage Bits

S

0--1777

----

0--1777

----

Timer Bits

T

0--377

----

0--377

----

Counter Bits

CT

0--177

----

0--377

----

Special Relays

SP

0--137 320--717

----

0--137 320--717

----

Global I/O

GX

0--1777

----

0--2777

----

Constant

K

----

1--32

----

1--32

Discrete Bit Flags

Description

SP63

Will be on if the result in the accumulator is zero

SP70

Will be on is 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 pattern of C10--C13 (4 bits) will be loaded into the accumulator using the Load Formatted instruction. The value in the accumulator will be logically Exclusive Hoped with the bit pattern from Y20--Y23 using the Exclusive Or Formatted instruction. The value in the lower 4 bits of the accumulator is output to C20--C23 using the Out Formatted instruction. DirectSOFT X1

LDF

C10

Location

Constant

C10

K4

C13 C12 C11 C10 OFF ON ON OFF

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

The unused accumulator bits are set to zero

Y20 K4

0

0

0

0

8

7

6 5

4 3

2

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

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

1

1

0

1

0

0

0

Acc.

0

0

0

0

0

0

0

0

0

0

0

0

1

1

1

0

Accumulator

Exclusive Or the binary bit pattern (Y20--Y23) with the value in the accumulator. OUTF

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

Acc.

0

0

0

0

Y23 Y22 Y21 Y20 XORF (Y20--Y23)

C20

ON OFF OFF OFF

Standard RLL Instructions

K4 Copy the specified number of bits from the accumulator to C20--C23 Handheld Programmer Keystrokes STR

X(IN)

1

LD

SHFT

F

SHFT

C(CR)

1

0

K(CON)

4

SHFT

X

SHFT

OR

SHFT

F

SHFT

Y(OUT)

2

OUT

SHFT

F

SHFT

C(CR)

2

0

K(CON)

4

DL405 User Manual, 4th Edition

0

K(CON)

Location

Constant

C20

K4

4

C23 C22 C21 C20 ON ON ON OFF