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

The text of a manual · part 19 of 53

DL06 Micro PLC User Manual, Volume 1 of 2, pages 180 to 189

Pages 180 to 189 of 524

The original document is the PDF (6.4 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 Direct Logic DL06 and Koyo DL06 D0-06DD1

Page 180

Chapter 5: Standard RLL Instructions - Comparative Boolean

Comparative Boolean

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

Store If Equal (STRE) DS5 Implied HPP

Used

The Store If Equal instruction begins a new rung or additional branch in a rung with a normally open comparative contact. The contact will be on when Vaaa equals Bbbb .

V aaa

B bbb

V aaa

B bbb

Store If Not Equal (STRNE) DS5 Implied HPP

5–26

Used

The Store If Not Equal instruction begins a new rung or additional branch in a rung with a normally closed comparative contact. The contact will be on when Vaaa does not equal Bbbb. Operand Data Type

DL06 Range

....................................B V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K aaa bbb

See memory map See memory map ––

See memory map See memory map 0–9999

In the following example, when the BCD value in V-memory location V2000 = 4933, Y3 will energize. DirectSOFT 5

Handheld Programmer Keystrokes

DirectSOFT32 V2000

K4933

Y3

$ STR

OUT

SHFT

E

E

J 4

GX OUT

C 4 D 9

D 3

A 2

D 3

3

A 0

A 0

0

ENT

ENT

In the following example, when the value in V-memory location V2000 =/ 5060, Y3 will energize. DirectSOFT 5 DirectSOFT32 V2000

K5060

Handheld Programmer Keystrokes Y3

SP STRN

OUT

SHFT

E

F

A 5

GX OUT

DL06 Micro PLC User Manual, 3rd Edition Rev. A

C 4 G 0

D 3

A 2

A 6

ENT

0

A 0

ENT

A 0

0

Page 181

Chapter 5: Standard RLL Instructions - Comparative Boolean

Or If Equal (ORE) DS5 Implied HPP

Used

The Or If Equal instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when Vaaa = Bbbb.

V aaa

B bbb

V aaa

B bbb

Or If Not Equal (ORNE) DS5 Implied HPP

Used

The Or If Not Equal instruction connects a normally closed comparative contact in parallel with another contact. The contact will be on when Vaaa does not equal Bbbb. Operand Data Type

DL06 Range

....................................B V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K aaa bbb

See memory map See memory map ––

See memory map See memory map 0–9999

In the following example, when the BCD value in V-memory location V2000 = 4500 or V2002 =/ 2500, Y3 will energize. DirectSOFT 5 DirectSOFT32 V2000

K4500

Handheld Programmer Keystrokes Y3 OUT

$

SHFT

E

F

A

STR E 4

V2002

5

Q

K2500

SHFT

C

D

E

A 0

C

A 2

F 4

A 0

0

A 0

C 2

0

ENT

5

D

A 0

ENT

4

3

2 GX OUT

A 2

0 E

OR

C 4

ENT

3

In the following example, when the BCD value in V-memory location V2000 = 3916 or V2002 050, Y3 will energize. DirectSOFT 5 DirectSOFT32 V2000

K3916

Handheld Programmer Keystrokes Y3 OUT

V2002

K2500

$ STR D

SHFT

E

J

B

3

9

R ORN

SHFT

E

C

F

A

2 GX OUT

C 4 G 1

6

0 D 3

0

0

A

A 2

A

A

A 0

0

ENT C

4

5

A 2

0

C 0

ENT

ENT

DL06 Micro PLC User Manual, 3rd Edition Rev. A

2

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

Page 182

Chapter 5: Standard RLL Instructions - Comparative Boolean

And If Equal (ANDE)

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

DS5 Implied HPP

Used

The And If Equal instruction connects a normally open comparative contact in series with another contact. The contact will be on when Vaaa = Bbbb.

V aaa

B bbb

V aaa

B bbb

And If Not Equal (ANDNE) DS5 Implied HPP

5–28

Used

The And If Not Equal instruction connects a normally closed comparative contact in series with another contact. The contact will be on when Vaaa does not equal Bbbb

Operand Data Type

DL06 Range

....................................B V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K aaa bbb

See memory map See memory map ––

See memory map See memory map 0–9999

In the following example, when the BCD value in V-memory location V2000 = 5000 and V2002 = 2345, Y3 will energize. DirectSOFT 5 DirectSOFT32 V2000

K5000

Handheld Programmer Keystrokes V2002

K2345

Y3 OUT

$ STR F

SHFT

E

A

A

5

0

V AND

SHFT

E

C

D

E

2

A 0

C

3

5

A 0

A

A 2

4 D

0

0

ENT

4 F

A

A 2

0

3

GX OUT

C 4

0

C 0

2

ENT

ENT

In the following example, when the BCD value in V-memory location V2000 = 5000 and V2002 =/ 2345, Y3 will energize. DirectSOFT 5 Handheld Programmer Keystrokes

DirectSOFT32 V2000

K5000

V2002

K2345

Y3 OUT

$ STR F

SHFT

E

A

A

5

0 SHFT

E

C

D

E

2

0

4 D 3

5 ENT

A 0

A

A 2

F

0

0

ENT C

4

3

DL06 Micro PLC User Manual, 3rd Edition Rev. A

A

A

A 2

0

V AND

GX OUT

C 4

ENT

0

C 0

2

Page 183

Chapter 5: Standard RLL Instructions - Comparative Boolean

Store (STR) DS5 Implied HPP

Used

The Comparative Store instruction begins a new rung or additional branch in a rung with a normally open comparative contact. The contact will be on when Aaaa is equal to or greater than Bbbb.

Store Not (STRN) The Comparative Store Not instruction begins a new rung or DS5 Implied additional branch in a rung with a normally closed comparative HPP Used contact. The contact will be on when Aaaa < Bbbb. Operand Data Type

A aaa

B bbb

A aaa

B bbb

DL06 Range

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TA Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CTA aaa bbb

See memory map See memory map –– 0–377 0–177

See memory map See memory map 0–9999

In the following example, when the BCD value in V-memory location V2000 욷 1000, Y3 will energize. DirectSOFT 5 DirectSOFT32 V2000

K1000

Handheld Programmer Keystrokes Y3

$ STR

OUT

B

SHFT

V AND

C

A

A

A

1 GX OUT

0 D 3

A 2

0

0

A 0

A 0

0

ENT

ENT

In the following example, when the value in V-memory location V2000 < 4050, Y3 will energize. DirectSOFT 5

Handheld Programmer Keystrokes

DirectSOFT32 V2000

K4050

Y3

SP STRN

OUT

E

SHFT

V AND

C

A

F

A

4 GX OUT

0 D 3

5

A 2 0

A 0

ENT

ENT

DL06 Micro PLC User Manual, 3rd Edition Rev. A

A 0

0

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

5–29

Page 184

Chapter 5: Standard RLL Instructions - Comparative Boolean

Or (OR)

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

DS5 Implied HPP

Used

The Comparative Or instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when Aaaa is equal to or greater than Bbbb.

A aaa

B bbb

A aaa

B bbb

Or Not (ORN) DS5 Implied HPP

5–30

Used

The Comparative Or Not instruction connects a normally closed comparative contact in parallel with another contact. The contact will be on when Aaaa < Bbbb. Operand Data Type

DL06 Range

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TA Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CTA aaa bbb

See memory map See memory map –– 0–377 0–177

See memory map See memory map 0–9999

In the following example, when theBCD value in V-memory location V2000 = 6045 or V2002 욷 2345, Y3 will energize. DirectSOFT 5

Handheld Programmer Keystrokes

DirectSOFT32 V2000

K6045

Y3 OUT

$ STR G

SHFT

E

A

E

6 V2002

0

Q

K2345

OR D

C 2

A 2

F 5

SHFT

V AND

C

E

F

ENT

4 D 3

5

A 0

A 0

0

ENT

4

3

GX OUT

C 4

A

A 2

0

C 0

2

ENT

In the following example when the BCD value in V-memory location V2000 = 1000 or V2002 < 2500, Y3 will energize. DirectSOFT 5

Handheld Programmer Keystrokes

DirectSOFT32

$ V2000

K1000

Y3

STR

OUT

B

SHFT

E

A

A

1 V2002

K2500

0

R ORN C

F 2

DL06 Micro PLC User Manual, 3rd Edition Rev. A

A 2

A 0

SHFT

V AND

C

A

A

ENT

0 D 3

0 ENT

A 0

A 0

0

ENT

0

5

GX OUT

C 4

A

A 2

0

C 0

2

Page 185

Chapter 5: Standard RLL Instructions - Comparative Boolean

And (AND) DS5 Implied HPP

Used

The Comparative And instruction connects a normally open comparative contact in series with another contact. The contact will be on when Aaaa is equal to or greater than Bbbb.

And Not (ANDN) The Comparative And Not instruction connects a normally DS5 Implied closed comparative contact in series with another contact. HPP Used The contact will be on when Aaaa < Bbbb. Operand Data Type

A aaa

B bbb

A aaa

B bbb

DL06 Range

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TA Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CTA aaa bbb

See memory map See memory map –– 0–377 0–177

See memory map See memory map 0–9999

In the following example, when the value in BCD V-memory location V2000 = 5000, and V2002 욷 2345, Y3 will energize. DirectSOFT 5

Handheld Programmer Keystrokes

DirectSOFT32 V2000

K5000

V2002

K2345

Y3

$ STR

OUT

F

SHFT

E

A

A

5

0

V AND C

D 2

C 4 A 0

SHFT

V AND

C

E

F

ENT

4

0

A

A 2

5

D

A

A 0

0

ENT

0

3

GX OUT

A 2

0

C 0

2

ENT

3

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

DirectSOFT32 V2000

K7000

Handheld Programmer Keystrokes V2002

K2500

Y3 OUT

$ STR H

SHFT

E

A

A

7

0

W ANDN C

F 2

GX OUT

5

C 4

A 2

A 0

SHFT

V AND

C

A

A

ENT

0

0 Y AND

0

0

ENT

0

SHFT

A

A 0

A

A 2

D 3

0

C 0

ENT

DL06 Micro PLC User Manual, 3rd Edition Rev. A

2

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

5–31

Page 186

Chapter 5: Standard RLL Instructions - Immediate Instructions

Immediate Instructions

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

Store Immediate (STRI) DS5 Implied HPP

Used

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 at the time the instruction is executed. The image register is not updated.

X aaa

Store Not Immediate (STRNI) DS5 Implied HPP

Used

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 at the time the instruction is executed. The image register is not updated.

X aaa

Operand Data Type

DL06 Range aaa

Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X

0–777

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

Handheld Programmer Keystrokes $

Y2

STR

I

SHFT

B 8

1

ENT

OUT GX OUT

C 2

ENT

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

Handheld Programmer Keystrokes Y2 OUT

SP STRN

SHFT

GX OUT

I

B 8

C 2

1 ENT

Or Immediate (ORI) DS5 Implied HPP

Used

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 at the time the instruction is executed. The image register is not updated.

X aaa

Or Not Immediate (ORNI) DS5 Implied HPP

5–32

Used

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

DL06 Micro PLC User Manual, 3rd Edition Rev. A

X aaa

ENT

Page 187

Chapter 5: Standard RLL Instructions - Immediate Instructions

Operand Data Type

DL06 Range aaa

Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X

0–777

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

Handheld Programmer Keystrokes Y5

X1

$

B STR

OUT

SHFT

OR

X2

ENT

1

Q GX OUT

C

I 8

2

F

ENT

ENT

5

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

DirectSOFT32 DirectSOFT 5 Y5

X1

B

$ STR

OUT

R ORN

X2

ENT

1 SHFT

C

I 8

2

F

GX OUT

ENT

ENT

5

And Immediate (ANDI) DS5 Implied HPP

Used

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 at the time the instruction is executed. The image register is not updated.

X aaa

And Not Immediate (ANDNI) DS5 Implied HPP

Used

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

X aaa

Operand Data Type

DL06 Range aaa

Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X

0–777

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

DirectSOFT32 X1

Handheld Programmer Keystrokes X2

Y5

B

$

OUT

STR V AND

ENT

1 SHFT

GX OUT

I

C 8

ENT

2

F

ENT

5

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

DirectSOFT32 X1

Handheld Programmer Keystrokes X2

Y5 OUT

$

B 1

STR W ANDN GX OUT

SHFT

ENT

I

C 8

F 5

2

ENT

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

ENT

DL06 Micro PLC User Manual, 3rd Edition Rev. A

5–33

Page 188

Chapter 5: Standard RLL Instructions - Immediate Instructions

Out Immediate (OUTI)

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

DS5

Used

HPP

Used

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

Or Out Immediate (OROUTI) DS5

Used

HPP

Used

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.

Y aaa OROUTI

Operand Data Type

DL06 Range aaa

Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y

0–777

In the following example, when X1 is on, output point Y2 on the output module will turn on. For instruction entry on the Handheld Programmer, you can use the instruction number (#350) as shown, or type each letter of the command. DirectSOFT 5 DirectSOFT32

Handheld Programmer Keystrokes Y2

X1

$

B STR

OUTI

O INST#

D

F 3

C 2

A 5

0

ENT

ENT

ENT

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

Handheld Programmer Keystrokes Y2 OR OUTI

X4

$

B

O INST#

D

F 3

C

Y2 OR OUTI

1

STR

2 $

A

4 D

F 3

C

DL06 Micro PLC User Manual, 3rd Edition Rev. A

0

ENT

ENT

ENT

ENT

ENT E

O INST#

ENT

5

STR

2

5–34

ENT

1

ENT A

5 ENT

0

Page 189

Chapter 5: Standard RLL Instructions - Immediate Instructions

Out Immediate Formatted (OUTIF) DS5

Used

HPP

Used

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.

Y aaa OUTIF K bbb

Operand Data Type

DL06 Range aaa

Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K

0-777 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 5 C0

LDIF

X10 K8

Load the value of 8 consecutive locations into the accumulator, starting with X10.

Constant

X17 X16 X15 X14 X13 X12 X11 X10

K8

ON OFF ON ON OFF ON OFF ON

Unused accumulator bits are set to zero

Acc.

OUTIF

Location X10

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

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

NEXT

NEXT

NEXT

I

F

SHFT

L ANDST

D

GX OUT

SHFT

I

3

8 F

8

NEXT

0 B

5 A 3

ENT I

A 1

D 5

A

0

8 I

0

8

ENT

ENT

DL06 Micro PLC User Manual, 3rd Edition Rev. A

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

5–35