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

The text of a manual · part 25 of 68

DL405 User Manual: Chapter 5: Standard RLL Instructions, pages 203 to 212

Pages 203 to 212 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 203

5--31

Standard RLL Instructions Comparative Boolean Instructions

The Comparative And instruction connects a normally open comparative contact in series with another contact. The contact will be on when Aaaa ² Bbbb.

And (AND)

430 440 450 IMP

DS

HPP

The Comparative And Not instruction connects a normally open comparative contact in series with another contact. The contact will be on when Aaaa < Bbbb.

And Not (ANDN)

430 440 450 IMP

DS

HPP Operand Data Type

DL430 Range

A aaa

B bbb

A aaa

B bbb

DL440 Range

DL450 Range

A/B aaa bbb aaa bbb aaa bbb

V--memory

V

All (See p. 3--40)

All (See p. 3--40)

All (See p. 3--41)

All (See p. 3--41)

All (See p. 3--42)

All (See p. 3--42)

Pointer

P

----

----

All (See p. 3--41)

All (See p. 3--41)

All (See p. 3--42)

All (See p. 3--42)

Constant

K

----

0--FFFF

----

0--FFFF

----

0--FFFF

Timer

T

0--177

0--377

0--377

Counter

CT

0--177

0--177

0--377

In the following example, when the value in V-memory location V1400 = 5000, and V1402 ² 2345, Y3 will energize. DirectSOFT V1400

K5000

V1402

K2345

Y3 OUT

Handheld Programmer Keystrokes STR

SHFT

E

SHFT

V

K(CON)

5

0

0

0

AND

V

1

4

0

K(CON)

2

3

4

5

OUT

Y(OUT)

3

1

4

0

0

2

In the following example, when the value in V-memory location V1400 = 7000 and V1402 < 2500, Y3 will energize. DirectSOFT V1400

K7000

V1402

K2500

Y3

Handheld Programmer Keystrokes STR

SHFT

E

SHFT

V

K(CON)

7

0

0

0

AND

NOT

V

1

4

K(CON)

2

5

0

0

OUT

Y(OUT)

3

1

4

0

2

0

0

DL405 User Manual, 4th Edition

Standard RLL Instructions

OUT

Page 204

5--32

Standard RLL Instructions Immediate Instructions

Immediate Instructions Store Immediate (STRI)

430 440 450

DS

HPP

Store Not Immediate (STRNI)

430 440 450

DS

HPP

The Store Immediate instruction begins a new rung or additional branch in a rung. The status of the contact will be the same as the status of the associated input point on the module at the time the instruction is executed. The image register is not updated.

X aaa

The Store Not Immediate instruction begins a new rung or additional branch in a rung. The status of the contact will be opposite the status of the associated input point on the module at the time the instruction is executed. The image register is not updated.

X aaa

Operand Data Type

Inputs

X

DL430 Range

DL440 Range aaa aaa

DL450 Range aaa

0--477

0--477

0--1777

In the following example, when X1 is on, Y2 will energize. DirectSOFT Y2

X1

OUT

Handheld Programmer Keystrokes STR

SHFT

I

OUT

Y(OUT)

2

SHFT

X(IN)

1

In the following example when X1 is off, Y2 will energize. DirectSOFT Y2

X1

OUT

Standard RLL Instructions

Handheld Programmer Keystrokes

DL405 User Manual, 4th Edition

STR

NOT

SHFT

OUT

Y(OUT)

2

I

SHFT

X(IN)

1

Page 205

Standard RLL Instructions Immediate Instructions

Or Immediate (ORI)

430 440 450 IMP

DS

HPP

Or Not Immediate (ORNI)

430 440 450 IMP

DS

HPP

The Or Immediate connects two contacts in parallel. The status of the contact will be the same as the status of the associated input point on the module at the time the instruction is executed. The image register is not updated.

X aaa

The Or Not Immediate connects two contacts in parallel. The status of the contact will be opposite the status of the associated input point on the module at the time the instruction is executed. The image register is not updated.

Operand Data Type

Inputs

X

5--33

X aaa

DL430 Range

DL440 Range

DL450 Range aaa aaa aaa

0--477

0--477

0--1777

In the following example, when X1 or X2 is on, Y5 will energize. DirectSOFT Y5

X1

OUT X2

Handheld Programmer Keystrokes STR

X(IN)

1

OR

SHFT

I

OUT

Y(OUT)

5

SHFT

X(IN)

2

In the following example, when X1 is on or X2 is off, Y5 will energize. DirectSOFT Y5

X1

OUT

Handheld Programmer Keystrokes STR

X(IN)

1

OR

NOT

SHFT

OUT

Y(OUT)

5

I

SHFT

X(IN)

2

DL405 User Manual, 4th Edition

Standard RLL Instructions

X2

Page 206

5--34

Standard RLL Instructions Immediate Instructions

The And Immediate connects two contacts in series. The status of the contact will be the same as the status of the associated input point on the module at the time the instruction is executed. The image register is not updated.

X aaa

And Not Immediate The And Not Immediate connects two contacts in series. The status of the contact (ANDNI) will be opposite the status of the associated input point on the module at the 430 440 450 time the instruction is executed. The image IMP register is not updated. HPP

X aaa

And Immediate (ANDI)

430 440 450 IMP

DS

HPP

DS

Operand Data Type

DL430 Range

Inputs

X

DL440 Range

DL450 Range aaa aaa aaa

0--477

0--477

0--1777

In the following example, when X1 and X2 is on, Y5 will energize. DirectSOFT X1

Y5

X2

OUT

Handheld Programmer Keystrokes STR

X(IN)

1

AND

SHFT

I

OUT

Y(OUT)

5

SHFT

X(IN)

2

In the following example, when X1 is on and X2 is off, Y5 will energize. DirectSOFT X1

Y5

X2

OUT

Standard RLL Instructions

Handheld Programmer Keystrokes

DL405 User Manual, 4th Edition

STR

X(IN)

1

AND

NOT

SHFT

OUT

Y(OUT)

5

I

SHFT

X(IN)

2

Page 207

Standard RLL Instructions Immediate Instructions

Out Immediate (OUTI)

430 440 450

DS

HPP

Or Out Immediate (OROUTI)

430 440 450

DS

HPP

The Out Immediate instruction reflects the status of the rung (on/off) and outputs the discrete (on/off) status to the specified module output point and the image register at the time the instruction is executed. If multiple Out Immediate instructions referencing the same discrete point are used it is possible for the module output status to change multiple times in a CPU scan. See Or Out Immediate.

Y aaa OUTI

The Or Out Immediate instruction has been designed to use more than 1 rung of discrete logic to control a single output. Multiple Or Out Immediate instructions referencing the same output coil may be used, since all contacts controlling the output are ored together. If the status of any rung is on at the time the instruction is executed, the output will also be on. Operand Data Type

Outputs

Y

5--35

Y aaa OROUTI

DL430 Range

DL440 Range aaa aaa

DL450 Range aaa

0--477

0--477

0--1777

In the following example, when X1 is on, output point Y2 on the output module will turn on. DirectSOFT Y2

X1

OUTI

Handheld Programmer Keystrokes STR

X(IN)

1

OUT

SHFT

I

SHFT

Y(OUT)

2

In the following example, when X1 or X4 is on, Y2 will energize. DirectSOFT Y2

X1

OR OUTI

OR OUTI

Handheld Programmer Keystrokes STR

X(IN)

1

OR

OUT

SHFT

STR

X(IN)

4

OR

OUT

SHFT

I

SHFT

Y(OUT)

2

I

SHFT

Y(OUT)

2

DL405 User Manual, 4th Edition

Standard RLL Instructions

Y2

X4

Page 208

5--36

Standard RLL Instructions Immediate Instructions

Set Immediate (SETI)

430 440 450

DS

HPP

Reset Immediate (RSTI)

430 440 450

DS

HPP

The Set Immediate instruction immediately sets or turns on an output or a range of outputs and the corresponding output module(s) at the time the instruction is executed. The image register is not updated. Once the outputs are set it is not necessary for the input to remain on. The Reset Immediate instruction can be used to reset the outputs.

Y aaa aaa SETI

The Reset Immediate instruction immediately resets, or turns off an output or a range of outputs and the output module(s) at the time the instruction is executed. The image register is not updated. Once the outputs are reset it is not necessary for the input to remain on. Operand Data Type

Outputs

Y aaa aaa RSTI

DL430 Range

DL440 Range

DL450 Range aaa aaa aaa

0--477

0--477

0--1777

Y

In the following example, when X1 is on, Y5 through Y22 will be set (on) for the corresponding output module(s). DirectSOFT X1

Y5

Y22 SETI

Handheld Programmer Keystrokes STR

X(IN)

1

SET

SHFT

I

SHFT

Y(OUT)

5

Y(OUT)

2

2

In the following example, when X1 is on, Y5 through Y22 will be reset (off) for the corresponding output module(s). DirectSOFT X1

Y22

Y5

Standard RLL Instructions

RSTI

Handheld Programmer Keystrokes

DL405 User Manual, 4th Edition

STR

X(IN)

1

RST

SHFT

I

SHFT

Y(OUT)

5

Y(OUT)

2

2

Page 209

5--37

Standard RLL Instructions Immediate Instructions

The Load Immediate instruction loads a 16-bit V-memory value into the accumulator. The valid address range includes all input point addresses on the local base. The value reflects the current status of the input points at the time the instruction is executed. This instruction may be used instead of the LDIF instruction which requires you to specify the number of input points.

Load Immediate (LDI)

430 440 450

DS

HPP

Operand Data Type

LDI V aaa

DL450 Range aaaaa

Inputs

V

40400 -- 40477

In the following example, when C0 is on, the binary pattern of X10--X17 will be loaded into the accumulator using the Load Immediate instruction. The Out Immediate instruction could be used to copy the 16 bits in the accumulator to output points, such as Y40--Y57. This technique is useful to quickly copy an input pattern to output points (without waiting on a full CPU scan to occur). DirectSOFT C0

Location

LDI

X17 X16 X15 X14 X13 X12 X11 X10 X7

V40400

V40400 Load the inputs from X0 to X17 into the accumulator, immediately.

X6

X5

X4

X3

X2

X1

X0

ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON

Unused accumulator bits are set to zero

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

0

1

0

1

1

0

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

1

1

0

1

0

1

0

OUTI V40502 Output the value in the accumulator to output points Y40 to Y57.

Location

Y57 Y56 Y55 Y54 Y53 Y52 Y51 Y50 Y47 Y46 Y45 Y44 Y43 Y42 Y41 Y40

V40502

ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON

Handheld Programmer Keystrokes STR

C(CR)

0

LD

SHFT

I

SHFT

V

4

0

4

0

0

OUT

SHFT

I

SHFT

V

4

0

5

4

0

Standard RLL Instructions

DL405 User Manual, 4th Edition

Page 210

5--38

Standard RLL Instructions Immediate Instructions

The Load Immediate Formatted instruction loads a 1--32 bit binary value into the accumulator. The value reflects the current status of the input module(s) at the time the instruction is executed. Accumulator bits that are not used by the instruction are set to zero.

Load Immediate Formatted (LDIF)

430 440 450

DS

HPP

Operand Data Type

X aaa

LDIF K bbb

DL440 Range

DL450 Range aaa bbb aaa bbb

Inputs

X

0--477

----

0--1777

----

Constant

K

----

1--32

----

1--32

In the following example, when C0 is on, the binary pattern of X10--X17 will be loaded into the accumulator using the Load Immediate Formatted instruction. The Out Immediate Formatted instruction could be used to copy the specified number of bits in the accumulator to the specified outputs on the output module, such as Y30--Y37. This technique is useful to quickly copy an input pattern to outputs (without waiting for the CPU scan). DirectSOFT C0

LDIF

X10 K8

Load the value of 8 consecutive location into the accumulator starting with X10

Constant K8

X17 X16 X15 X14 X13 X12 X11 X10 ON OFF ON ON OFF ON OFF ON

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

8

7

6 5

4 3

2

1

0

0

0

1

0

1

1

0

1

Acc.

OUTIF

Location X10

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

Y30 K8

Copy the value of the lower 8 bits of the accumulator to Y30 --Y37

Location

Constant

Y37 Y36 Y35 Y34 Y33 Y32 Y31 Y30

Y30

K8

ON OFF ON ON OFF ON OFF ON

Handheld Programmer Keystrokes C(CR)

0

LD

SHFT

I

F

SHFT

X(IN)

1

0

K(CON)

8

OUT

SHFT

I

F

SHFT

Y(OUT)

3

0

K(CON)

8

Standard RLL Instructions

STR

DL405 User Manual, 4th Edition

Page 211

5--39

Standard RLL Instructions Immediate Instructions

The Out Immediate instruction outputs a 16-bit binary value from the accumulator to a V-memory address at the time the instruction is executed. The valid address range includes all output point addresses on the local base. This instruction may be used instead of the OUTIF instruction which requires you to specify the number of input points.

Out Immediate (OUTI)

430 440 450

DS

HPP

Operand Data Type

OUTI V aaaaa

DL450 Range aaaaa

Inputs

V

40400 -- 40477

In the following example, when C0 is on, the binary pattern of X10--X17 will be loaded into the accumulator using the Load Immediate instruction. The Out Immediate instruction could be used to copy the 16 bits in the accumulator to output points, such as Y40--Y57. This technique is useful to quickly copy an input pattern to outputs (without waiting for the CPU scan). DirectSOFT C0

Location

LDI

X17 X16 X15 X14 X13 X12 X11 X10 X7

V40400

V40400 Load the inputs from X0 to X17 into the accumulator, immediately.

X6

X5

X4

X3

X2

X1

X0

ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON

Unused accumulator bits are set to zero

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

0

1

0

1

1

0

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

1

1

0

1

0

1

0

OUTI V40542 Output the value in the accumulator to output points Y40 to Y57.

Location

Y57 Y56 Y55 Y54 Y53 Y52 Y51 Y50 Y47 Y46 Y45 Y44 Y43 Y42 Y41 Y40

V40542

ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON

Handheld Programmer Keystrokes STR

C(CR)

0

LD

SHFT

I

SHFT

V

4

0

4

0

0

OUT

SHFT

I

SHFT

V

4

0

5

4

0

Standard RLL Instructions

DL405 User Manual, 4th Edition

Page 212

5--40

Standard RLL Instructions Immediate Instructions

The Out Immediate Formatted instruction outputs a 1--32 bit binary value from the accumulator to specified output points at the time the instruction is executed. Accumulator bits that are not used by the instruction are set to zero.

Out Immediate Formatted (OUTIF)

430 440 450

DS

HPP

Operand Data Type

Y aaa OUTIF K bbb

DL440 Range

DL450 Range aaa bbb aaa bbb

Output

Y

0--477

----

0--1777

----

Constant

K

----

1--32

----

1--32

In the following example when C0 is on,the binary pattern for X10 --X17 is loaded into the accumulator using the Load Immediate Formatted instruction. The binary pattern in the accumulator is written to Y30--Y37 using the Out Immediate Formatted instruction. This technique is useful to quickly copy an input pattern to outputs (without waiting for the CPU scan). DirectSOFT C0

LDIF

X10 K8

Load the value of 8 consecutive location into the accumulator starting with X10

Constant K8

X17 X16 X15 X14 X13 X12 X11 X10 ON OFF ON ON OFF ON OFF ON

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

8

7

6 5

4 3

2

1

0

0

0

1

0

1

1

0

1

Acc.

OUTIF

Location X10

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

Y30 K8

Copy the value in the lower 8 bits of the accumulator to Y30 --Y37

Location

Constant

Y37 Y36 Y35 Y34 Y33 Y32 Y31 Y30

Y30

K8

ON OFF ON ON OFF ON OFF ON

Handheld Programmer Keystrokes C(CR)

0

LD

SHFT

I

F

SHFT

X(IN)

1

0

K(CON)

8

OUT

SHFT

I

F

SHFT

Y(OUT)

3

0

K(CON)

8

Standard RLL Instructions

STR

DL405 User Manual, 4th Edition