The text of a manual · part 36 of 42
DL305 User Manual: Chapter 12: RLLPLUS Instruction Set, pages 298 to 305
Pages 298 to 305 of 359, from DL305 User Manual
The original document is the PDF (4.9 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 D3-08TD2, AutomationDirect D3-16TD2, Konnect-It D3-08TD2, Koyo D3-08TD2, Konnect-It D3-16TD2 and Koyo D3-16TD2
Page 298
RLL PLUS Instruction Set
1 12
In This Chapter. . . ., Introduction, Stage Instructions, Comparative Boolean Instructions, Timer, Counter, and Shift Register Instructions
Page 299
12--2
RLL PLUS Instruction Set Stage Instructions
Instruction Set
Introduction This chapter provides information concerning the instructions used with RLL PLUS CPUs. If you are not familiar with RLL PLUS programming concepts, you should read Chapter 10 first. Chapter 10 will help you understand the basic concepts. 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 ISG is the mnemonic for Initial Stage. Each instruction definition will show in parentheses the keystrokes used to enter the instruction.
RLLPLUS Instructions
NOTE: Don’t assume that the instructions in this chapter are the only ones you can use with your RLL PLUS CPU. There are many others that are discussed in Chapter 11 that you can use as well. If you are using a RLL PLUS CPU, such as the DL330P, then you should always consult this chapter before you use one of the instructions shown in Chapter 11. There may be differences in the way the instruction operates in an RLL PLUS CPU. This chapter provides a description of several instructions that are similar, but slightly different from their RLL CPU counterparts. For example, you’ll notice that a Counter instruction has two input lines in a RLL CPU but only one input line in an RLL PLUS CPU.
There are two ways to quickly find the instruction you need. S
If you know the instruction category (Stage, 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.
Instruction
Page
Instruction
Page
AND CNT
12--17
ORN TMR
12--14
AND SG
12--9
RST
12--10
AND TMR
12--16
RST (counter)
12--20
ANDN CNT
12--17
RST SG
12--11
ANDN SG
12--9
SET
12--10
ANDN TMR
12--16
SET SG
12--11
CNT
12--19
SG
12--3
ISG
12--3
SR
12--21
JMP
12--5
STR CNT
12--13
NJMP
12--5
STR TMR
12--12
OR CNT
12--15
STR SG
12--7
OR SG
12--8
STRN CNT
12--13
OR TMR
12--14
STRN SG
12--7
ORN CNT
12--15
STRN TMR
12--12
ORN SG
12--8
TMR
12--18
DL305 User Manual, Rev. D
Page 300
RLL PLUS Instruction Set Stage Instructions
12--3
Stage Instructions
Stage (SG) DL330P Only
The Stage instruction creates segments of a RLL PLUS program. Stages are activated by transitional logic, a jump or set stage executed from an active stage. Stages are de--activated one scan after transitional logic, a jump, or a reset stage instruction is executed. Data Type
Stages
SG
D3--330 Range
D3--340 Range aaaa aaaa aaaa
----
----
0--177
ISG
S aaa
SG
S aaa
D3--330P Range
DL305 User Manual, Rev. D
RLLPLUS Instructions
The Initial Stage instruction is normally used as the first segment of a RLL PLUS program. Initial stages are activated when the CPU enters the run mode, this creates a starting point in the program. The Initial Stage can be made inactive by either jumping from it or resetting it. Multiple Initial Stages are allowed in a program.
Instruction Set
Initial Stage (ISG) DL330P Only
Page 301
12--4
RLL PLUS Instruction Set Stage Instructions
Instruction Set
The following example is a simple RLL PLUS program. This program utilizes the Initial Stage, Stage, and Jump instructions to create a structured program. DirectSOFT Display
ISG
Handheld Programmer Keystrokes
S0
000
010 OUT
001
S2 SET
RLLPLUS Instructions
005
S1 JMP
SG
S1
002
011 OUT
SG
S2
006
012 OUT
007
S1
S0 JMP
DL305 User Manual, Rev. D
ISG STR
SHF SHF
0 0
ENT ENT
OUT STR SET
SHF SHF SG
1 1 SHF
0 ENT 2
STR JMP SG STR
SHF SG SHF SHF
5 1 1 2
ENT ENT ENT ENT
OUT SG STR
SHF SHF SHF
1 2 6
1 ENT ENT
ENT
OUT STR AND JMP
SHF SHF SG SG
1 7 1 0
2 ENT ENT ENT
ENT
ENT ENT
Page 302
RLL PLUS Instruction Set Stage Instructions
Not Jump (NOT JMP) DL330P Only
The Not Jump instruction allows the program to transition from an active stage which contains the jump instruction to another which is specified in the instruction. The jump will occur when the input logic is false. The active stage that contains the Not Jump will be de--activated 1 scan after the Not Jump instruction is executed. Data Type
Stages
SG
SG aaa JMP
SG aaa NJMP
RLLPLUS Instructions
The Jump instruction allows the program to transition from an active stage which contains the jump instruction to another which is specified in the instruction. The jump will occur when the input logic is true. The active stage that contains the Jump will be de--activated 1 scan after the Jump instruction is executed.
Instruction Set
Jump (JMP) DL330P Only
12--5
D3--330 Range
D3--340 Range aaaa aaaa
D3--330P Range aaaa
----
----
0--177
DL305 User Manual, Rev. D
Page 303
12--6
RLL PLUS Instruction Set Stage Instructions
Instruction Set
The following example is a simple RLL PLUS program. This program utilizes the Initial Stage, Stage, Jump, and Not Jump instructions to create a structured program. DirectSOFT Display
Handheld Programmer Keystrokes
ISG
ISG STR
SG SHF
SHF 0
0 ENT
ENT
OUT STR JMP
SHF SHF SG
1 1 SHF
0 ENT 1
ENT
JMP SG STR
NOT SHF SHF
SG 1 002
SHF ENT ENT
2
OUT STR JMP
SHF SHF SG
1 3 SHF
1 ENT 2
ENT
SG STR OUT STR
SHF SHF SHF SHF
2 4 1 5
ENT ENT 2 ENT
JMP
SG
SHF
0
S0
000
010 OUT
001
S1 JMP
RLLPLUS Instructions
S2 NJMP
SG
S1
002
011 OUT
003
S2 JMP
SG
S2
004
012 OUT
005
S0 JMP
DL305 User Manual, Rev. D
ENT
ENT
ENT ENT
ENT
Page 304
RLL PLUS Instruction Set Stage Instructions
The Store instruction begins a new rung or additional branch in a rung with a normally open stage contact. Status of the contact will be the same state as the associated Stage memory location.
Store Not Stage (STR NOT SG) DL330P Only
The Store Not instruction begins a new rung or additional branch in a rung with a normally closed stage contact. Status of the contact will be opposite the state of the associated stage memory location.
Stages
SG
SG aaa
D3--330 Range
D3--340 Range aaaa aaaa aaaa
----
----
0--177
RLLPLUS Instructions
Data Type
SG aaa
Instruction Set
Store Stage (STR SG) DL330P Only
12--7
D3--330P Range
In the following Store example, when stage contact 000 is on, output 010 will energize. DirectSOFT Display SG 000
Handheld Programmer Keystrokes 010 OUT
STR OUT
SG SHF
SHF 1
0 0
ENT ENT
In the following Store Not example, when stage contact 000 is off output 010 will energize. DirectSOFT Display SG 000
Handheld Programmer Keystrokes 010 OUT
STR OUT
NOT SHF
SG 1
SHF 0
0 ENT
ENT
DL305 User Manual, Rev. D
Page 305
RLLPLUS Instructions
Instruction Set
12--8
RLL PLUS Instruction Set Stage Instructions
Or Stage (OR SG) DL330P Only
The Or instruction logically ors a normally open stage contact in parallel with another contact in a rung. The status of the contact will be the same state as the associated stage memory location.
Or Not Stage (OR NOT SG) DL330P Only
The Or Not instruction logically ors a normally closed stage contact in parallel with another contact in a rung. The status of the contact will be opposite the state of the associated stage memory location. Data Type
Stages
SG
SG aaa
SG aaa
D3--330 Range
D3--340 Range
D3--330P Range aaaa aaaa aaaa
----
----
0--177
In the following Or example, when input 000 or stage contact 001 is on output 010 will energize. DirectSOFT Display 000
Handheld Programmer Keystrokes 010 OUT
STR OR OUT
SHF SG SHF
0 SHF 1
ENT 1 0
ENT ENT
SG 001
In the following Or Not example, when input 000 is on or stage contact 001 is off output 010 will energize. DirectSOFT Display
000
Handheld Programmer Keystrokes 010 OUT
SG 001
DL305 User Manual, Rev. D
STR OR OUT
SHF NOT SHF
0 SG 1
ENT SHF 0
1 ENT
ENT