The text of a manual · part 25 of 36
DL305 User Manual, pages 237 to 246
Pages 237 to 246 of 356
The original document is the PDF (3.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 GE DL330 / D3-330, Fanuc DL330 / D3-330 and GE Fanuc DL330 / D3-330
Page 237
RLL PLUS Programming Basics
10–37
This diagram shows how a portion of the program would look when viewed as a Stage Diagram in DirectSOFT. Wait forStart ISG S0
Check for a Part J
SG S1
Clamp the part J
SG S2
J
SG S6
Clamp S
Press the part J
Check for Stop J
SG S150
J
ISG S0
R
SG S140
SG S140
SG S3
RLLPLUS Programming Basics
Page 238
Page 239
Instruction Set
In This Chapter. . . .
111
Ċ 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 240
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.
Page 241
Instruction Set
Instruction
Page
Instruction
Page
INV
AND
11–10
MCR
11–50
AND (Comparative)
11–21
MCS
11–50
AND NOT
11–10
(F71)
AND NOT (Comparative)
11–21
AND NOT T/C
11–11, 11–12
AND STR
11–13
AND T/C
11–11, 11–12
MUL
(F84)
(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
BCD
(F86)
11–48
OR STR
11–13
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
SHFL
(F82)
11–42
SHFR
(F80)
11–43
SR
11–24
STR
11–4
STR (Comparative)
11–19
DOUT2
(F62)
11–27
DOUT3
(F63)
11–28
DOUT5
(F65)
11–29
STR NOT
11–4
DSTR
(F50)
11–25
STR NOT (Comparative)
11–19
DSTR1
(F51)
11–26
STR NOT T/C
11–5, 11–6
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
NOTE: See Chapter 12 for RLL PLUS instructions.
11–5, 11–6 (F72)
11–36 11–22
(F953)
11–54
Instruction Set
11–34
ADD
11–3
Page 242
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
STR OUT
NOT SHF
SHF 1
0 0
ENT ENT
Page 243
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
0
ENT
Page 244
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
STR OUT
NOT SHF
CNT 1
SHF 5
6 ENT
0
2
ENT
Page 245
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
001
STR OR OUT
SHF NOT SHF
0 SHF 1
ENT 1 0
ENT ENT
Page 246
Instruction Set
11–8
Instruction Set Boolean Instructions
Or Timer (OR TMR) DL330/340 Only
Or Not Timer (OR NOT 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
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
STR OR OUT
SHF NOT SHF
0 TMR 1
ENT SHF 0
6 ENT
0
0
ENT