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 41

DL305 User Manual: Chapter 11: Instruction Set, pages 240 to 249

Pages 240 to 249 of 357, from DL305 User Manual

The original document is the PDF (3.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 PLC Direct D3-08TD1, PLC Direct D3-16NA, Koyo D3-08TD1 and Koyo D3-16NA

Page 240

Instruction Set

111

In This Chapter. . . ., Boolean Instructions, Comparative Boolean Instructions, Timer, Counter, and Shift Register Instructions, Accumulator Load and Output Instructions, Accumulator Logic Instructions, Math Instructions, Bit Operation Instructions, Number Conversion Instructions, Program Control Instructions, Network Instructions, Message Instructions

Page 241

11--2

Instruction Set

Instruction Set

Introduction The DL305 CPUs offer a wide variety of instructions to perform many different types of operations. This chapter shows you how to use these individual instructions. The following table provides a quick reference listing of the instruction mnemonic and the page(s) defining the instruction. (The mnemonics are very similar to the instruction names and should be easy to become familiar with in a short time.) For example STR NOT (Comparative) is the mnemonic for Store Not Equal. Each instruction definition will show in parentheses the keystrokes used to enter the instruction. There are two ways to quickly find the instruction you need. S If you know the instruction category (Boolean, Comparative Boolean, etc.) just use the header at the top of the page to find the pages that discuss the instructions in that category. S If you know the individual instruction mnemonic, use the following table to find the page that discusses the instruction. The DL330 and DL340 instructions sets are very similar. However, the DL330P instruction set has several differences. Some of the instructions in this chapter will be labeled “DL330/DL340 Only.” There may be an equivalent instruction for the DL330P CPU, but it may also work slightly differently. The DL330P instructions that operate differently from these instructions are discussed in Chapter 12. Make sure you review the instructions carefully to make sure you can use the instruction with your CPU.

DL305 User Manual, Rev. D

Page 242

Instruction Set

Instruction

Page

Instruction

Page

INV

AND

11--10

MCR

11--50

AND (Comparative)

11--21

MCS

11--50

AND NOT

11--10

AND NOT (Comparative)

11--21

AND NOT T/C

11--11, 11--12

AND STR

11--13

AND T/C

11--11, 11--12

(F71)

(F84)

MUL

(F73)

11--49

11--38

OR

11--7

OR (Comparative)

11--20

OR NOT

11--7

OR NOT (Comparative)

11--20

OR NOT T/C

11--8, 11--9

OR STR

11--13

BCD

(F86)

11--48

BIN

(F85)

11--47

OR T/C

11--8, 11--9

CMP

(F70)

11--32

OUT

11--15

11--23

RST

11--16

11--30

RX

11--16

CNT DAND

(F75)

(F952)

11--52

DECO

(F82)

11--46

SET

DIV

(F74)

11--40

SET OUT

11--17

SET OUT RST

11--18

DOR

(F76)

11--31

DOUT

(F60)

11--25

DOUT1

(F61)

11--26

DOUT2

(F62)

11--27

DOUT3

(F63)

11--28

DOUT5

(F65)

11--29

DSTR

(F50)

11--25

DSTR1

(F51)

11--26

DSTR2

(F52)

11--27

STR T/C

DSTR3

(F53)

11--28

SUB

DSTR5

(F55)

11--29

TMR

ENCO

(F83)

11--44

WX

FAULT

(F20)

11--56

SHFL

(F82)

11--42

SHFR

(F80)

11--43

SR

11--24

STR

11--4

STR (Comparative)

11--19

STR NOT

11--4

STR NOT (Comparative)

11--19

STR NOT T/C

11--5, 11--6 11--5, 11--6 (F72)

11--36 11--22

(F953)

11--54

NOTE: See Chapter 12 for RLL PLUS instructions.

DL305 User Manual, Rev. D

Instruction Set

11--34

ADD

11--3

Page 243

11--4

Instruction Set Boolean Instructions

Instruction Set

Boolean Instructions Store (STR)

The Store instruction begins a new rung or additional branch in a rung with a normally open contact. Status of the contact will be the same state as the associated image register point or memory location.

Store Not (STR NOT)

The Store Not instruction begins a new rung or additional branch in a rung with a normally closed contact. Status of the contact will be opposite the state of the associated image register point or memory location. Data Type aaa aaa

D3--330 Range

D3--340 Range

D3--330P Range aaa aaa aaa

Inputs / Outputs

000--167 700--767

000--177 700--767

000--167 700--767

Control Relays

160--373

160--373 1000--1067

160--174 200--77

Special Control Relays

374--377 770--777

374--377 770--777 1074--1077

175--177 770--777

Shift Register Bits

400--577

400--577

----

In the following Store example, when input 000 is on, output 010 will energize. DirectSOFT Display 000

Handheld Programmer Keystrokes 010 OUT

STR OUT

SHF SHF

0 1

ENT 0

ENT

In the following Store Not example, when input 000 is off output 010 will energize. DirectSOFT Display 000

Handheld Programmer Keystrokes 010 OUT

DL305 User Manual, Rev. D

STR OUT

NOT SHF

SHF 1

0 0

ENT ENT

Page 244

11--5

Instruction Set Boolean Instructions

The Store Timer instruction begins a new rung or additional branch in a rung with a normally open timer contact. The timer contact T aaa will be on when the timer current value is ² the preset value of the associated timer.

Store Not Timer (STR NOT TMR) DL330/340 Only

The Store Not Timer instruction begins a new rung or additional branch in a rung with a normally closed timer contact. The timer contact T aaa will be on when the timer current value is < the preset value of the associated timer. Data Type

Timer

T

T aaa

Instruction Set

Store Timer (STR TMR) DL330/340 Only

T aaa

D3--330 Range

D3--340 Range

D3--330P Range* aaa aaa aaa

600--677

600--677

----

* See Chapter12 for similar RLL PLUS instructions In the following Store Timer example, when the current value in timer 600 is ² the preset value output 017 will energize. DirectSOFT Display T600

Handheld Programmer Keystrokes 017 OUT

STR OUT

TMR SHF

SHF 1

6 7

0 ENT

0

ENT

In the following Store Not Timer example, when the current value in timer 600 is < the preset value output 017 will energize. DirectSOFT Display T600

Handheld Programmer Keystrokes 017 OUT

STR OUT

NOT SHF

TMR 1

SHF 7

6 ENT

0

DL305 User Manual, Rev. D

0

ENT

Page 245

Instruction Set

11--6

Instruction Set Boolean Instructions

Store Counter (STR CNT) DL330/340 Only

The Store Counter instruction begins a new rung or additional branch in a rung with a normally open counter contact. The counter contact C aaa will be on when the counter current value ² the preset value of the associated counter.

Store Not Counter (STR NOT CNT) DL330/340 Only

The Store Not Counter instruction begins a new rung or additional branch in a rung with a normally closed counter contact. The counter contact C aaa will be on when the counter current value is < the preset value of the associated counter. Data Type

Counter

C

C aaa

C aaa

D3--330 Range

D3--340 Range

D3--330P Range* aaa aaa aaa

600--677

600--677

----

* See Chapter 12 for similar RLL PLUS instructions In the following Store Counter example, when the current value in counter 602 is ² the preset value output 015 will energize. DirectSOFT Display C 602

Handheld Programmer Keystrokes 015 OUT

STR OUT

CNT SHF

SHF 1

6 5

0 ENT

2

ENT

In the following Store Not Counter example, when the current value in counter 602 is < the preset value output 015 will energize. DirectSOFT Display C602

Handheld Programmer Keystrokes 015 OUT

DL305 User Manual, Rev. D

STR OUT

NOT SHF

CNT 1

SHF 5

6 ENT

0

2

ENT

Page 246

Instruction Set Boolean Instructions

Or Not (OR NOT)

The Or instruction logically ors a normally open contact in parallel with another contact in a rung. The status of the contact will be the same state as the associated image register point or memory location.

aaa

The Or Not instruction logically ors a normally closed contact in parallel with another contact in a rung. The status of the contact will be opposite the state of the associated image register point or memory location.

aaa

Data Type

D3--330 Range

D3--340 Range aaa aaa aaa

Inputs / Outputs

000--167 700--767

000--177 700--767

000--167 700--767

Control Relays

160--373

160--373 1000--1067

160--174 200--77

Special Control Relays

374--377 770--777

374--377 770--777 1074--1077

175--177 770--777

Shift Register Bits

400--577

400--577

----

Instruction Set

Or (OR)

11--7

D3--330P Range

In the following Or example, when input 000 or 001 is on output 010 will energize. DirectSOFT Display 000

Handheld Programmer Keystrokes 010 OUT

STR OR OUT

SHF SHF SHF

0 1 1

ENT ENT 0

ENT

001

In the following Or Not example, when input 000 is on or 001 is off output 010 will energize. DirectSOFT Display

000

Handheld Programmer Keystrokes 010 OUT

STR OR OUT

SHF NOT SHF

0 SHF 1

ENT 1 0

ENT ENT

001

DL305 User Manual, Rev. D

Page 247

Instruction Set

11--8

Instruction Set Boolean Instructions

Or Timer (OR TMR) DL330/340 Only

The Or Timer instruction logically ors a normally open timer contact in parallel with another contact in a rung. The timer contact T aaa will be on when the timer current value is ² the preset value of the associated timer.

T aaa

Or Not Timer (OR NOT TMR) DL330/340 Only

The Or Not Timer instruction logically ors a normally closed timer contact in parallel with another contact in a rung. The timer contact T aaa will be on when the timer current value is < the preset value of the associated timer.

T aaa

Data Type

Timer

T

D3--330 Range

D3--340 Range

D3--330P Range* aaa aaa aaa

600--677

600--677

----

* See Chapter 12 for similar RLL PLUS instructions In the following Or Timer example, when input 000 is on or the current value in T600 is ² the preset value output 010 will energize. DirectSOFT Display 000

Handheld Programmer Keystrokes 010 OUT

STR OR OUT

SHF TMR SHF

0 SHF 1

ENT 6 0

0 ENT

0

ENT

T600

In the following Or Not Timer example, when input 000 is on or the current value in T600 is < the preset value output 010 will energize. DirectSOFT Display

000

Handheld Programmer Keystrokes 010 OUT

T600

DL305 User Manual, Rev. D

STR OR OUT

SHF NOT SHF

0 TMR 1

ENT SHF 0

6 ENT

0

0

ENT

Page 248

11--9

Instruction Set Boolean Instructions

The Or Counter instruction logically ors a normally open counter contact in parallel with another contact in a rung. The counter contact C aaa will be on when the counter current value is ² the preset value of the associated counter.

Or Not Counter (OR NOT CNT) DL330/340 Only

The Or Not Counter instruction logically ors a normally closed counter contact in parallel with another contact in a rung. The counter contact C aaa will be on when the counter current value is < the preset value of the associated counter. Data Type

Counter

C

Instruction Set

Or Counter (OR CNT) DL330/340 Only

C aaa

C aaa

D3--330 Range

D3--340 Range

D3--330P Range* aaa aaa aaa

600--677

600--677

----

* See Chapter 12 for similar RLL PLUS instructions In the following Or Counter example, when input 007 is on or the current value in C610 is ² the preset value output 025 will energize. DirectSOFT Display 007

Handheld Programmer Keystrokes 025 OUT

STR OR OUT

SHF CNT SHF

7 SHF 2

ENT 6 5

1 ENT

0

ENT

C610

In the following Or Not Counter example, when input location 007 is on or the current value in C610 is < the preset value output 025 will energize. DirectSOFT Display

007

Handheld Programmer Keystrokes 025 OUT

STR OR OUT

SHF NOT SHF

7 CNT 2

ENT SHF 5

6 ENT

1

C610

DL305 User Manual, Rev. D

0

ENT

Page 249

Instruction Set

11--10

Instruction Set Boolean Instructions

And (AND)

The And instruction logically ands a normally open contact in series with another contact in a rung. The status of the contact will be the same state as the associated image register point or memory location.

And Not (AND NOT)

The And Not instruction logically ands a normally closed contact in series with another contact in a rung. The status of the contact will be opposite the state of the associated image register point or memory location. Data Type aaa aaa

D3--330 Range

D3--340 Range aaa aaa

D3--330P Range aaa

Inputs / Outputs

000--167 700--767

000--177 700--767

000--167 700--767

Control Relays

160--373

160--373 1000--1067

160--174 200--77

Special Control Relays

374--377 770--777

374--377 770--777 1074--1077

175--177 770--777

Shift Register Bits

400--577

400--577

----

In the following And example, when input 000 and 001 is on output 010 will energize. DirectSOFT Display 000

Handheld Programmer Keystrokes 001

010 OUT

STR AND OUT

SHF SHF SHF

0 1 1

ENT ENT 0

ENT

In the following And Not example, when input 000 is on and 001 is off output 010 will energize. DirectSOFT Display 000

Handheld Programmer Keystrokes 001

010 OUT

DL305 User Manual, Rev. D

STR AND OUT

SHF NOT SHF

0 SHF 1

ENT 1 0

ENT ENT