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

The text of a manual · part 35 of 60

DL205 PLC User Manual, Volume 1 of 2, pages 341 to 350

Pages 341 to 350 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 341

Chapter 5: Standard RLL Instructions

Add Binary Top of Stack (ADDBS)

1 2 values are moved up one level. 3 Discrete Bit Flags Description 4 5 6 NOTE: Status flags are valid only until another instruction uses the same flag. 7 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 V1420 and V1421 is loaded into the accumulator using the Load Double instruction, pushing the value previously loaded in the 8 accumulator onto the accumulator stack. The binary value in the first level of the accumulator stack is added with the binary value in the accumulator using the Add Stack instruction. The 9 value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. 10 11 12 13 14 A B C D

Binary Top of Stack instruction is a 32-bit instruction 230 Add that adds the binary value in the accumulator with the 240 binary value in the first level of the accumulator stack. 250-1 The result resides in the accumulator. The value in the 260 first level of the accumulator stack is removed, and all stack SP63 SP66 SP67 SP70 SP73

DS Used HPP Used

ADDBS

On when the result of the instruction causes the value in the accumulator to be zero On when the 16-bit addition instruction results in a carry On when the 32-bit addition instruction results in a carry On anytime the value in the accumulator is negative On when a signed addition or subtraction results in a incorrect sign bit

DirectSOFT

V1401

X1

0

Load the value in V1400 and V1401 into the accumulator

LDD

V1400

Acc.

0

0

0

3

3

V1400

A

A

5

5

V1421

0

Load the value in V1420 and V1421 into the accumulator

LDD

V1420

Add the binary value in the accumulator with the binary value in the first level of the accumulator stack

ADDBS

V1500

B

STR

SHFT

L ANDST

D

SHFT

L ANDST

D

SHFT

A

D

GX OUT

SHFT

0

D

1

3 3

3 3

D D

B

3

B

3

3

B B

1

1

1

1

E E

4 4

S RST

ENT

F

A

5

0

C

A

0 2

0

V1420

7

B

0

5

F

0

1

7

B 0

5

F

Acc.

0

0

5

2

0

2

5

0

A

6

0

ENT

D

C

6

Acc.

Handheld Programmer Keystrokes $

1

0

C

1

Accumulator stack after 1st LDD

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

Accumulator stack after 2nd LDD

Copy the value in the accumulator to V1500 and V1501

OUTD

0

0

A A

0 0

ENT

0

5

2

0

1

2

5

Level 1

0

0

3

A 5

0

C

6

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

ENT

ENT

DL205 User Manual, 4th Edition, Rev. D

5-117

Page 342

Chapter 5: Standard RLL Instructions

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

Subtract Binary Top of Stack (SUBBS) Binary Top of Stack is a 32-bit instruction that 230 Subtract subtracts the binary value in the first level of the accumulator 240 stack from the binary value in the accumulator. The result 250-1 resides in the accumulator. The value in the first level of 260 the accumulator stack is removed, and all stack locations are

S UBBS moved up one level.

Discrete Bit Flags

Description

SP63 SP64 SP65 SP70

On when the result of the instruction causes the value in the accumulator to be zero On when the 16-bit subtraction instruction results in a borrow On when the 32-bit subtraction instruction results in a borrow On anytime the value 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 V1420 and V1421 is loaded into the accumulator using the Load Double instruction, pushing the value previously loaded in the accumulator onto the accumulator stack. The binary value in the first level of the accumulator stack is subtracted from the binary value in the accumulator using the Subtract Stack instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction.

DS Used HPP Used

5-118

DirectSOFT

V1400

V1401

X1

Load the value in V1400 and V1401 into the accumulator

LDD V1400

Acc.

0

0

1

A

2

0

5

B

0

0

1

A

2

0

5

B

V1421 0

Load the value in V1420 and V1421 into the accumulator

LDD V1420

Subtract the binary value in the first level of the accumulator stack from the binary value in the accumulator

SUBBS

V1500

B

STR

1

SHFT

L ANDST

D

SHFT

L ANDST

D

SHFT

S RST

SHFT

GX OUT

SHFT

D

3 3

3

D U

3

B

3 ISG

B B

1 1

B F

1 1 1 5

E E

4 4

C

0 2

S RST

ENT

A

A

0

0

C

6

A

5

0 C

6

Acc.

0

0

2

0

3

0

B

6

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

Accumulator stack after 2nd LDD

0

A

0

3

0

2

V1501

B

5

0

ENT D

A

0

Handheld Programmer Keystrokes $

3

Acc.

Copy the value in the accumulator to V1500 and V1501

OUTD

0

V1420

Accumulator stack after 1st LDD

A A

0 0

ENT ENT

ENT

DL205 User Manual, 4th Edition, Rev. D

0

3

0

6

V1500

B

Level 1

0

0

1

A 2

0

5

B

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 343

Chapter 5: Standard RLL Instructions

Multiply Binary Top of Stack (MULBS)

1 2 the accumulator stack is removed, and all stack locations are 3 moved up one level. Discrete Bit Flags Description 4 5 NOTE: Status flags are valid only until another instruction uses the same flag. 6 In the following example, when X1 is on, the Load instruction moves the value in V1400 into the accumulator. The value in V1420 is loaded into the accumulator using the Load 7 instruction, pushing the value previously loaded in the accumulator onto the stack. The binary value in the accumulator stack’s first level is multiplied by the binary value in the accumulator using the Multiply Binary Stack instruction. The Out Double instruction copies the value in 8 the accumulator to V1500 and V1501. 9 10 11 12 13 14 A B C D

Binary Top of Stack is a 16-bit instruction that 230 Multiply multiplies the 16-bit binary value in the first level of 240 the accumulator stack by the 16-bit binary value in the 250-1 accumulator. The result resides in the accumulator and can 260 be 32 bits (8 digits maximum). The value in the first level of

SP63 SP70

MULBS

On when the result of the instruction causes the value in the accumulator to be zero On anytime the value in the accumulator is negative

DS Used HPP Used

DirectSOFT X1

V1400

Load the value in V1400 into the accumulator

LD

V1400

C

3

5

Acc.

0

0

0

0

C

3

5

0

V1420

Load the value in V1420 into the accumulator

LD

V1420

0

Copy the value in the accumulator to V1500 and V1501

OUTD

V1500

0

0

0

0

0

0

1

4

Acc.

0

0

0

F

4

2

4

0

0

Handheld Programmer Keystrokes B

STR

SHFT

L ANDST

D

SHFT

L ANDST

D

SHFT

M ORST

U

GX OUT

SHFT

D

1

ENT

B

3

B

3

ISG 3

L ANDST

B B

1

1

1

1

E E

4 4

A

C

0 2

S RST

ENT

F

A

5

0

A A

A

0 0

0

4

Acc.

0

0

V1501

$

1

The unused accumulator bits are set to zero

Multiply the binary value in the accumulator with the binary value in the first level of the accumulator stack

MULBS

0

F

4

2

4

V1500

Accumulator stack after 1st LDD

0

The unused accumulator bits are set to zero

0

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

Level 1

0

0

0

0 C

3

5

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

Accumulator stack after 2nd LDD

ENT ENT

ENT

DL205 User Manual, 4th Edition, Rev. D

5-119

Page 344

Chapter 5: Standard RLL Instructions

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

Divide Binary by Top of Stack (DIVBS) Divide Binary Top of Stack is a 32-bit instruction that divides

230 the 32-bit binary value in the accumulator by the 16-bit binary 240 value in the first level of the accumulator stack. The result 250-1 resides in the accumulator. and the remainder resides in the 260 first level of the accumulator stack. Discrete Bit Flags

DIVBS

Description

SP53 SP63 SP70

On when the value of the operand is larger than the accumulator can work with On when the result of the instruction causes the value in the accumulator to be zero On anytime the value 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 will be loaded into the accumulator using the Load instruction. The value in V1420 and V1421 is loaded into the accumulator using the Load Double instruction, pushing the value previously loaded in the accumulator onto the accumulator stack. The binary value in the accumulator is divided by the binary value in the first level of the accumulator stack using the Divide Binary Stack instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction.

DS Used HPP Used

DirectSOFT

Accumulator stack after 1st LDD

V1400

X1

Load the value in V1400 into the accumulator

LD V1400

0

The unused accumulator bits are set to zero Acc. 0

0

0

0

0

0

LDD V1420

Divide the binary value in the accumulator by the binary value in the first level of the accumulator stack

DIVBS

Acc. 0

0

Acc. 0

0

Copy the value in the accumulator to V1500 and V1501

OUTD V1500

0

0

0

0

0

1

1

4

4

V1420

V1421 Load the value in V1420 and V1421 into the accumulator

0

0

0

C

C

3

3

5

5

0

0

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

Accumulator stack after 2nd LDD

0

0

0

V1501

0

0

0

0

9

9

C

C

V1500

4

4

Level 1

0

0

1

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

Handheld Programmer Keystrokes $

B

STR

SHFT

L ANDST

D

SHFT

L ANDST

D

SHFT

D

I

GX OUT

5-120

3

SHFT

D

1

B

3 8 3

D

1

E B

3

V AND

0

0

0

The remainder resides in the first stack location

ENT

3

0

B B

1 1

4 1

A E

0 4

S RST

ENT

F

A

5

0

A C

A

0 2

0

ENT A

0

ENT

ENT

DL205 User Manual, 4th Edition, Rev. D

Level 1

0

0

0

0

Level 2

X

X X

0

0

X X

0

0

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 345

Chapter 5: Standard RLL Instructions

Transcendental Functions (DL260 only) The DL260 CPU features special numerical functions to complement its real number capability. The transcendental functions include the trigonometric sine, cosine, and tangent, and also their inverses (arc sine, arc cosine, and arc tangent). The square root function is also grouped with these other functions. The transcendental math instructions operate on a real number in the accumulator (it cannot be BCD or binary). The real number result resides in the accumulator. The square root DS Used function operates on the full range of positive real numbers. The sine, cosine and tangent HPP N/A functions require numbers expressed in radians. You can work with angles expressed in degrees by first converting them to radians with the Radian (RADR) instruction, then performing the trig function. All transcendental functions utilize the following flag bits. Discrete Bit Flags Description

230 240 250-1 260

SP63 SP70 SP72 SP73 SP75

On when the result of the instruction causes the value in the accumulator to be zero On anytime the value in the accumulator is negative On anytime the value in the accumulator is a valid floating point number On when a signed addition or subtraction results in a incorrect sign bit On when a real number instruction is executed and a non-real number was encountered

Math Function SP53

Range of Argument On when the value of the operand is larger than the accumulator can work with

Sine Real (SINR) The Sine Real instruction takes the sine of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format.

SINR

Cosine Real (COSR) The Cosine Real instruction takes the cosine of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format.

COSR

Tangent Real (TANR) The Tangent Real instruction takes the tangent of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format.

TANR

Arc Sine Real (ASINR) The Arc Sine Real instruction takes the inverse sine of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format.

ASINR

DL205 User Manual, 4th Edition, Rev. D

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

5-121

Page 346

Chapter 5: Standard RLL Instructions

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

Arc Cosine Real (ACOSR) The Arc Cosine Real instruction takes the inverse cosine of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format.

ACOSR

Arc Tangent Real (ATANR) The Arc Tangent Real instruction takes the inverse tangent of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format.

Square Root Real (SQRTR) The Square Root Real instruction takes the square root of the real number stored in the accumulator. The result resides in the accumulator. Both the original number and the result are in IEEE 32-bit format.

ATANR

SQRTR

NOTE: The square root function can be useful in several situations. However, if you are trying to do the square-root extract function for an orifice flow meter measurement as the PV to a PID loop, note that the PID loop already has the square-root extract function built in. DS Used HPP N/A

5-122

The following example takes the sine of 45 degrees. Since these transcendental functions operate only on real numbers, we do a LDR (Load Real) 45. The trig functions operate only in radians, so we must convert the degrees to radians by using the RADR command. After using the SINR (Sine Real) instruction, we use an OUTD (Out Double) instruction to move the result from the accumulator to V-memory. The result is 32-bits wide, requiring the Out Double to move it. Accumulator contents (viewed as real number)

DirectSOFT X1

LDR

Load the real number 45 into the accumulator.

45.000000

RADR

Convert the degrees into radians, leaving the result in the accumulator.

0.7853981

SINR

Take the sine of the number in the accumulator, which is in radians.

0.7071067

Copy the valus in the accumulator to V2000 and V2001.

0.7071067

R45

OUTD V2000

NOTE: The current HPP does not support real number entry with automatic conversion to the 32-bit IEEE format. You must use DirectSOFT for entering real numbers, using the LDR (Load Real) instruction.

DL205 User Manual, 4th Edition, Rev. D

Page 347

Chapter 5: Standard RLL Instructions

Bit Operation Instructions

1 The Sum instruction counts the number of bits that are set to “1” 2 SUM in the accumulator. The HEX result resides in the accumulator. 3 Math Function Range of Argument 4 In the following example, when X1 is on, the value formed by discrete locations X10–X17 is 5 loaded into the accumulator using the Load Formatted instruction. The number of bits in the accumulator set to “1” is counted using the Sum instruction. The value in the accumulator is 6 copied to V1500 using the Out instruction. 7 8 9 10 11 12 13 14 A B C D

Sum (SUM)

230 240 250-1 260 DS Used HPP Used

DirectSOFT X1

SP63

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

X17 X16 X15 X14 X13 X12 X11 X10

LDF

ON ON OFF OFF ON OFF ON ON

X10

K8

The unused accumulator bits are set to zero

Load the value represented by discrete locations X10–X17 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

8

7

0

0

1 1

0

0

0

0

0

0

0

0

0

0

0

Acc. 0

SUM

0

0

0

0

0

0

0

0

0

0

0

0

0

0

5

0

0

0

5

0

0

0

6 5

0

4 3

2

1

0

0

1 1

1

0

Sum the number of bits in the accumulator set to “1”

OUT

V1500

V1500

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

Handheld Programmer Keystrokes $

B

STR

SHFT

L ANDST

SHFT

S RST

GX OUT

D

1

3

ENT

F

B

5

SHFT

U

ISG

M ORST

PREV

PREV

PREV

1

A

I

0

8

ENT

ENT

B

1

F

5

A

0

A

0

ENT

DL205 User Manual, 4th Edition, Rev. D

5-123

Page 348

Chapter 5: Standard RLL Instructions

230 Shift Left is a 32-bit instruction that shifts the bits in the a specified number (Aaaa) of places to the left. The 240 accumulator vacant positions are filled with zeros, and the bits shifted out of 250-1 the accumulator are lost. 260 Operand Data Type V-memory Constant

DL230 Range

DL240 Range

SHFL A aaa

DL250-1 Range

DL260 Range

A aaa aaa aaa aaa

V K

All (See page 3-53) 1-32

All (See page 3-54) 1-32

All (See page 3-55) 1-32

All (See page 3-56) 1-32

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 bit pattern in the accumulator is shifted 10 bits to the left using the Shift Left instruction. The value in the accumulator is copied to V2010 and V2011 using the Out Double instruction. DS Used HPP Used

Standard RLL Instructions

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

Shift Left (SHFL)

5-124

Direct SOFT

V2001

X1

6

LDD

7

0

V2000 5

3

1

0

1

V2000 Load the value in V2000 and V2001 into the accumulator SHFL cc K10

The bit pattern in the accumulator is shifted 10 bit positions to the left

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

1

0

0

0

0

0

0

1

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

1

1

0

0

1

1

1

0

0

0

0

0

1

0

1

0

0

1

1

0

0

0

Shifted out of the accumulator

OUTD V2010 Copy the value in the accumulator to V2010 and V2011 cc

0

0

0

1 0

0

1

0

0

1 4

STR

1 L NDST

D

SHFT

S RST

SHFT

X OUT

SHFT

D

3

3

ENT D H

C

3 7

F C

5 2

2

0

L NDST 0

0 1

1

0

0 0

ENT ENT

ENT

DL205 User Manual, 4th Edition, Rev. D

1 0

C 4

V2011

Handheld Programmer Keystrokes

SHFT

1 0

0

0

0

1 0

0

0

0

0

0

0

0

1

8

7

6 5

4 3

2

1

0

0

0

0

0

0

0 0

0

0

4

0

0

V2010

0

0

Page 349

Chapter 5: Standard RLL Instructions

Shift Right (SHFR)

1 2 3 Operand Data Type DL230 Range DL240 Range DL250-1 Range DL260 Range A aaa aaa aaa aaa 4 5 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 bit pattern in the accumulator is 6 shifted 10 bits to the right using the Shift Right instruction. The value in the accumulator is copied to V2010 and V2011 using the Out Double instruction. 7 8 9 10 11 12 13 14 A B C D Right is a 32-bit instruction that shifts the bits in the 230 Shift accumulator a specified number (Aaaa) of places to the right. 240 The vacant positions are filled with zeros, and the bits shifted out 250-1 of the accumulator are lost. 260

V-memory Constant

V K

All (See page 3-53) 1-32

All (See page 3-54) 1-32

SHFR A aaa

All (See page 3-55) 1-32

All (See page 3-56) 1-32

DS Used HPP Used

Direct SOFT

V2001

X1

Constant 6

LDD

7

0

V2000

5

3

1

0

1

V2000

Load the value in V2000 and V2001 into the accumulator SHFR cc

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

1

0

0

0

0

0

1

1

1

0

0

1

1

1

0

0

0

0

0

1

0

1

0

0

1

1

0

0

0

0

0

K10

The bit pattern in the accumulator is shifted 10 bit positions to the right

Shifted out of the accumulator

OUTD

V2010

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

Copy the value in the accumulator to V2010 and V201 1

00

0

0

0

0

0 1

0 0 0

0

0

9

0

1

V2011

0

01 1 0 0

0 1 0

1 1

0

0 0

0

0

C

6 5

4 3

2

1

0

1 0

8

7

1

0

1

0

0

1

C

4

0

1

V2010

Handheld Programmer Keystrokes

L DST

D

SHFT

S RST

SHFT

SHFT

D

X OUT

T

1

STR

SHFT

3

3

D H

C

3

7

F

C

2

5

R OR

2

0

0

1

0

0

1

0

0

T T

T

DL205 User Manual, 4th Edition, Rev. D

5-125

Page 350

Chapter 5: Standard RLL Instructions

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

Rotate Left (ROTL) Left is a 32-bit instruction that rotates the bits in the 230 Rotate accumulator a specified number (Aaaa) of places to the left. 240

250-1 Operand Data Type DL250-1 Range DL260 Range 260 A aaa aaa V-memory Constant

DS Used HPP Used

V K

All (See page 3-55) 1-32

ROTL A aaa

All (See page 3-56) 1-32

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 bit pattern in the accumulator is rotated 2 bit positions to the left using the Rotate Left instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction.

DirectSOFT

V1401

X1

LDD

6 7

V1400

V1400

0 5

3 1

0 1

Load the value in V1400 and V1401 into the accumulator ROTL K2

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

2

1

0

0

1

0

0

0

0

0

0

0

1

1

1

0

0

1

1

1

0

0

0

0

0

1

0

1

0

0

1

1

0

0

0

The bit pattern in the accumulator is rotated 2 bit positions to the left OUTD V1500 Copy the value in the accumulator to V1500 and V1501

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

2

1

0

1

0

0

0

0

0

0

1

0

1

4

0 5

0

0

1

1

1

0

0

0

0

9 C 1 4 V1501

Handheld Programmer Keystrokes $

B

STR

1

SHFT

L ANDST

D

SHFT

R ORN

O INST#

GX OUT

SHFT

D

5-126

3

3

ENT D

B

3

T MLR

1

L ANDST B

1

E C

F

5

A

4 2 0

A

0

A

0

ENT

ENT A

0

ENT

DL205 User Manual, 4th Edition, Rev. D

0

1

0

1

0

0

1

1

0

0

0

1

0

C

V1500