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

The text of a manual · part 33 of 68

DL405 User Manual: Chapter 5: Standard RLL Instructions, pages 283 to 292

Pages 283 to 292 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 283

5--111

Standard RLL Instructions Math Instructions

Multiply Top of Stack is a 16 bit instruction that multiplies a 4-digit BCD value in the first level of the accumulator stack by a 4-digit BCD value in the accumulator. The result resides in the accumulator. The value in the first level of the accumulator stack is is removed and all stack values are moved up one level.

Multiply Top of Stack (MULS)

430 440 450

DS

HPP

MULS

Discrete Bit Flags

Description

SP63

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

SP70

On anytime the value in the accumulator is negative.

SP75

On when a BCD instruction is executed and a NON--BCD number was encountered.

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 is loaded into the accumulator using the Load Double instruction, pushing the value previously loaded in the accumulator onto the accumulator stack. The BCD value in the first level of the accumulator stack is multiplied by the BCD value in the accumulator using the Multiply Stack instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. DirectSOFT

V1400

X1

Load the value in V1400 into the accumulator

LD V1400

5

0

0

0

5

0

0

0

The unused accumulator bits are set to zero Acc. 0

0

0

0

V1420 Load the value in V1420 into the accumulator

LD V1420

0

0

0

The unused accumulator bits are set to zero

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

MULS

2

Acc. 0

0

0

0

0

2

0

0

Acc. 0

1

0

0

0

0

0

0

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 V1500

0

1

Handheld Programmer Keystrokes X(IN)

1

LD

V

1

4

LD

V

1

4

MUL

SHFT

S

SHFT

OUT

SHFT

D

SHFT

0

0

2

0

V

1

5

0

0

0

0

0

V1500

0

0

0

0

0

5

0

0

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

0

DL405 User Manual, 4th Edition

Standard RLL Instructions

STR

0

V1501

Level 1

Page 284

5--112

Standard RLL Instructions Math Instructions

Divide Top of Stack is a 32 bit instruction that divides the 8-digit BCD value in the accumulator by a 4-digit BCD value in the first level of the accumulator stack. The result resides in the accumulator and the remainder resides in the first level of the accumulator stack.

Divide by Top of Stack (DIVS)

430 440 450

DS

HPP

DIVS

Discrete Bit Flags

Description

SP53

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

SP63

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

SP70

On anytime the value in the accumulator is negative.

SP75

On when a BCD instruction is executed and a NON--BCD number was encountered.

NOTE: Status flags are valid only until another instruction uses the same flag. In the following example, when X1 is on, the Load instruction loads the value in V1400 into the accumulator. The value in V1420 is loaded into the accumulator using the Load Double instruction, pushing the value previously loaded in the accumulator onto the accumulator stack. The BCD value in the accumulator is divided by the BCD value in the first level of the accumulator stack using the Divide Stack instruction. The Out Double instruction copies the value in the accumulator to V1500 and V1501. DirectSOFT

Accumulator stack after 1st LDD

V1400

X1

Load the value in V1400 into the accumulator

LD V1400

0

0

0

0

0

V1421 0

Load the value in V1420 and V1421 into the accumulator

V1420

2

0

The unused accumulator bits are set to zero Acc. 0

LDD

0

Acc. 0

0

0

5

5

0

2

0

V1420 0

0

0

0

0

0

0

0

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 Divide the value in the accumulator by the value in the first level of the accumulator stack

DIVS

Acc. 0

Copy the value in the accumulator to V1500 and V1501

OUTD V1500

0

0

0

0

0

V1501

2

2

5

5

0

0

0

0

V1500

0

0

Level 1

0

0

0

0

0

0

2

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

Standard RLL Instructions

Handheld Programmer Keystrokes STR

X(IN)

1

LD

V

1

The remainder resides in the first stack location 4

LD

SHFT

D

SHFT

DIV

SHFT

S

SHFT

OUT

SHFT

D

SHFT

DL405 User Manual, 4th Edition

0 V

V

0 1

1

4

5

2

0

0

0

Level 1

0

0

0

0

0

0

0

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

Page 285

5--113

Standard RLL Instructions Math Instructions

Add Binary Top of Stack instruction is a 32 bit instruction that adds the binary value in the accumulator with the binary value in 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 and all stack values are moved up one level.

Add Binary Top of Stack (ADDBS)

430 440 450

DS

HPP

ADDBS

Discrete Bit Flags

Description

SP63

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

SP66

On when the 16 bit addition instruction results in a carry.

SP67

On when the 32 bit addition instruction results in a carry.

SP70

On anytime the value in the accumulator is negative.

SP73 on when a signed addition or subtraction results in a incorrect sign bit.

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 added with the binary value in the accumulator using the Add Stack instruction. The value in the accumulator is copied to V1500 and V1501 using the Out Double instruction. DirectSOFT X1

V1400

V1401 0

0

3

A

5

0

C

6

Acc. 0

0

3

A

5

0

C

6

Load the value in V1400 and V1401 into the accumulator

LDD V1400

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

1

LD

SHFT

D

SHFT

V

LD

SHFT

D

SHFT

V

ADD

SHFT

B

S

SHFT

OUT

SHFT

D

SHFT

V

1

5

F

7

B

0

5

F

Acc. 0

0

5

2

0

1

2

5

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

5

4

0

0

1

4

2

0

1

5

0

0

2

0

1

2

V1500

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

DL405 User Manual, 4th Edition

Standard RLL Instructions

1

0

1

Handheld Programmer Keystrokes X(IN)

B

0

V1501

STR

7

Acc. 0

Copy the value in the accumulator to V1500 and V1501

OUTD

0

V1420

Accumulator stack after 1st LDD

Page 286

5--114

Standard RLL Instructions Math Instructions

Subtract Binary Top of Stack is a 32 bit instruction that subtracts the binary value in the first level of the accumulator stack from the binary value in the accumulator. The result resides in the accumulator. The value in the first level of the accumulator stack is removed and all stack locations are moved up one level.

Subtract Binary Top of Stack (SUBBS)

430 440 450

DS

HPP

SUBBS

Discrete Bit Flags

Description

SP63

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

SP64

On when the 16 bit subtraction instruction results in a borrow.

SP65

On when the 32 bit subtraction instruction results in a borrow.

SP70

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. DirectSOFT X1

V1400

V1401 0

0

1

A

2

0

5

B

Acc. 0

0

1

A

2

0

5

B

Load the value in V1400 and V1401 into the accumulator

LDD V1400

V1420

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

A

5

0

C

6

0

3

A

5

0

C

6

Acc. 0

0

2

0

3

0

6

B

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

2

V1501

Handheld Programmer Keystrokes

Standard RLL Instructions

3

Acc. 0

Copy the value in the accumulator to V1500 and V1501

OUTD

0

Accumulator stack after 1st LDD

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

STR

X(IN)

1

LD

SHFT

D

SHFT

V

1

4

0

0

Level 7

X

X

X

X

X

X

X

X

LD

SHFT

D

SHFT

V

1

4

2

0

Level 8

X

X

X

X

X

X

X

X

SUB

SHFT

B

S

SHFT

OUT

SHFT

D

SHFT

V

1

5

0

0

DL405 User Manual, 4th Edition

Page 287

5--115

Standard RLL Instructions Math Instructions

Multiply Binary Top of Stack is a 16 bit instruction that multiplies the 16 bit binary value in the first level of the accumulator stack by the 16 bit binary value in the accumulator. The result resides in the accumulator and can be 32 bits (8 digits max.). The value in the first level of the accumulator stack is removed and all stack locations are moved up one level.

Multiply Binary Top of Stack (MULBS)

430 440 450

DS

HPP

MULBS

Discrete Bit Flags

Description

SP63

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

SP70

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 Load instruction moves the value in V1400 into the accumulator. The value in V1420 is loaded into the accumulator using the Load 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 the accumulator to V1500 and V1501. DirectSOFT

V1400

X1

Load the value in V1400 into the accumulator

LD V1400

C

3

5

The unused accumulator bits are set to zero Acc. 0

0

0

0

C

3

5

0

V1420 Load the value in V1420 into the accumulator

LD V1420

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

MULBS

0

V1500

0

0

0

0

0

1

4

Acc. 0

0

0

F

4

2

4

0

0

0

Handheld Programmer Keystrokes

0

1

LD

V

1

4

0

0 0

LD

V

1

4

2

MUL

SHFT

B

S

SHFT

OUT

SHFT

D

SHFT

V

1

5

0

F

4

2

4

V1500

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

Standard RLL Instructions

X(IN)

4

Acc. 0

V1501

STR

1

The unused accumulator bits are set to zero

Copy the value in the accumulator to V1500 and V1501

OUTD

0

Accumulator stack after 1st LDD

0

0

DL405 User Manual, 4th Edition

Page 288

5--116

Standard RLL Instructions Math Instructions

Divide Binary by Top OF Stack (DIVBS)

430 440 450

DS

HPP

Divide Binary Top of Stack is a 32 bit instruction that divides the 32 bit binary value in the accumulator by the 16 bit binary value in the first level of the accumulator stack. The result resides in the accumulator and the remainder resides in the first level of the accumulator stack.

DIVBS

Discrete Bit Flags

Description

SP53

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

SP63

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

SP70

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 also, 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. DirectSOFT

Accumulator stack after 1st LDD

V1400

X1

Load the value in V1400 into the accumulator

LD V1400

The unused accumulator bits are set to zero Acc. 0

0

0

0

0

0

V1421 0

Load the value in V1420 and V1421 into the accumulator

LDD V1420

Acc. 0

0

0

0

0

0

0

1

1

4

4

V1420 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 Divide the binary value in the accumulator by the binary value in the first level of the accumulator stack

DIVBS

Acc. 0

Copy the value in the accumulator to V1500 and V1501

OUTD V1500

0

0

0

0

0

Standard RLL Instructions

V1501

0

0

0

0

9

9

C

C

V1500

4

4

Level 1

0

0

0

0

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

The remainder resides in the first stack location

Handheld Programmer Keystrokes STR

X(IN)

1

LD

V

1

4

0

0

LD

SHFT

D

SHFT

V

1

DIV

SHFT

B

S

SHFT

OUT

SHFT

D

SHFT

V

DL405 User Manual, 4th Edition

1

4

5

2

0

0

0

Level 1

0

0

0

0

0

0

0

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

Page 289

Standard RLL Instructions Math Instructions

Increment (INC)

430 440 450

DS

HPP

Decrement (DEC)

430 440 450

DS

HPP

The Increment instruction increments a BCD value in a specified V--memory location by “1” each time the instruction is executed.

INC A aaa

The Decrement instruction decrements a BCD value in a specified V--memory location by “1” each time the instruction is executed.

Operand Data Type

5--117

DEC A aaa

DL430 Range

DL440 Range

A aaa aaa

DL450 Range aaa

V--memory

V

All (See p. 3--40)

All (See p. 3--41)

All (See p. 3--42)

Pointer

P

All (See p. 3--40)

All (See p. 3--41)

All (See p. 3--42)

Discrete Bit Flags

Description

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

SP75 on when a BCD instruction is executed and a NON--BCD number was encountered.

NOTE: Status flags are valid only until another instruction uses the same flag. In the following increment example, when C5 is on the value in V1400 increases by one. DirectSOFT

V1400

C5

INC

8

9

8

9

3

5

V1400 Increment the value in V1400 by “1”.

V1400 3

6

Handheld Programmer Keystrokes STR

C(CR)

5

SHFT

I

N

C

SHFT

V

1

4

0

0

In the following decrement example, when C5 is on the value in V1400 is decreased by one. DirectSOFT C5

V1400 DEC

8

9

8

9

3

5

V1400 Decrement the value in V1400 by “1”.

3

4

Handheld Programmer Keystrokes STR

C(CR)

5

SHFT

D

E

C

SHFT

V

1

4

0

0

DL405 User Manual, 4th Edition

Standard RLL Instructions

V1400

Page 290

5--118

Standard RLL Instructions Math Instructions

Transcendental Functions The DL450 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 function operates on the full range of positive real numbers. The sine, cosine and tangent functions require numbers expressed in radians. You can work with angles expressed in degrees by first converting them to radians with the Radian (RAD) instruction, then performing the trig function. All transcendental functions utilize the following flag bits.

Sine Real (SINR)

430 440 450

DS

HPP

Cosine Real (COSR)

430 440 450

DS

HPP

Tangent Real (TANR)

Standard RLL Instructions

430 440 450

DS

HPP

Arc Sine Real (ASINR)

430 440 450

DS

HPP

Discrete Bit Flags

Description

SP63

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

SP70

On anytime the value in the accumulator is negative.

SP72

On anytime the value in the accumulator is a valid floating point number.

SP73 on when a signed addition or subtraction results in a incorrect sign bit.

SP75

On when a real number instruction is executed and a non-real number was encountered.

Math Function

Range of Argument

SP53

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

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

DL405 User Manual, 4th Edition

SINR

COSR

SINR

ASINR

Page 291

Standard RLL Instructions Math Instructions

Arc Cosine Real (ACOSR)

430 440 450

DS

HPP

Arc Tangent Real (ATANR)

430 440 450

DS

HPP

Square Root Real (SQRTR)

430 440 450

DS

HPP

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.

5--119

ACOSR

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.

ATANR

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.

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

Load the real number 45 into the accumulator.

45.000000

RADR

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

0.7358981

SINR

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

0.7071067

Copy the value in the accumulator to V2000 and V2001.

0.7071067

OUTD V2000

DL405 User Manual, 4th Edition

Standard RLL Instructions

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.

Page 292

5--120

Standard RLL Instructions Math Instructions

Increment Binary (INCB)

430 440 450

DS

HPP

Decrement Binary (DECB)

430 440 450

DS

HPP

The Increment Binary instruction increments a binary value in a specified V--memory location by “1” each time the instruction is executed.

INCB A aaa

The Decrement Binary instruction decrements a binary value in a specified V--memory location by “1” each time the instruction is executed.

Operand Data Type

DECB A aaa

DL430 Range

DL440 Range

A aaa aaa

DL450 Range aaa

V--memory

V

All (See p. 3--40)

All (See p. 3--40)

All (See p. 3--42)

Pointer

P

All (See p. 3--40)

All (See p. 3--41)

All (See p. 3--42)

Discrete Bit Flags

Description

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

NOTE: Status flags are valid only until another instruction uses the same flag. In the following increment binary example, when C5 is on the binary value in V1400 is increased by one. DirectSOFT

V1400

C5

INCB

4

A

4

A

3

C

V1400 Increment the binary value in V1400 by “1”.

V1400 3

D

Handheld Programmer Keystrokes STR

C(CR)

5

SHFT

I

N

C

B

SHFT

V

1

4

0

0

In the following decrement binary example, when C5 is on the value in V1400 is decreased by one. V1400

DirectSOFT C5

DECB

4

A

4

A

3

C

V1400

Standard RLL Instructions

Decrement the binary value in V1400 by “1”.

V1400 3

B

Handheld Programmer Keystrokes STR

C(CR)

5

SHFT

D

E

DL405 User Manual, 4th Edition

C

B

SHFT

V

1

4

0

0