The text of a manual · part 16 of 40
DL05 Micro PLC User Manual, Volume 1 of 2: Chapter 5: Standard RLL and Intelligent Box Instructions, pages 134 to 143
Pages 134 to 143 of 379, from DL05 Micro PLC User Manual, Volume 1 of 2
The original document is the PDF (5.8 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 D0-05AA
Page 134
Chapter 5: Standard RLL - Boolean Instructions
Or (OR) DS5 Implied HPP
Used
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.
Aaaa
Or Not (ORN) DS5 Implied The Or Not instruction logically ors a normally closed HPP
Used 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. Operand Data Type
Aaaa
DL05 Range aaa
....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT Special Relay . . . . . . . . . . . . . . . . . . . . . . . . . . SP
0–377 0–377 0–777 0–377 0–177 0–177 0–777
In the following Or example, when input X1 or X2 is on, output Y5 will energize. DirectSOFT 5 Direct SOFT32 X1
Handheld Programmer Keystrokes Y5
B
$ STR
OUT
1 C
Q OR
X2
GX OUT
2 F 5
ENT ENT ENT
In the following Or Not example, when input X1 is on or X2 is off, output Y5 will energize. DirectSOFT 5 Direct SOFT32 X1
Handheld Programmer Keystrokes Y5 OUT
X2
$
B STR
1
R ORN
C
GX OUT
F
2 5
ENT ENT ENT
DL05 Micro PLC User Manual, 6th Edition, Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 5–11
Page 135
Chapter 5: Standard RLL - Boolean Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Or Bit-of-Word (ORB) DS5 Implied HPP
Used
The Or Bit-of-Word instruction logically ors a normally open contact in parallel with another contact in a rung. Status of the contact will be the same state as the bit referenced in the associated memory location.
Aaaa.bb
Or Not Bit-of-Word (ORNB) DS5 Implied HPP
Used
The Or Not Bit-of-Word instruction logically ors a normally closed contact in parallel with another contact in a rung. Status of the contact will be opposite the state of the bit referenced in the associated memory location. Operand Data Type
DL05 Range
..................................... V-memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A B PB aaa bb
See memory map See memory map
BCD, 0 to 15 BCD, 0 to 15
In the following Or Bit-of-Word example, when input X1 or bit 7 of V1400 is on, output Y7 will energize. DirectSOFT 5 DirectSOFT32 X1
Y7 OUT
B1400.7 Handheld Programmer Keystrokes STR OR
1
ENT
SHFT
B
K
7
ENT
7
ENT
OUT
V
1
4
0
0
In the following Or Bit-of-Word example, when input X1 is on or bit 7 of V1400 is off, output Y7 will energize. DirectSOFT 5
DirectSOFT32 X1
Y7 OUT
B1400.7 Handheld Programmer Keystrokes STR ORN
OUT
5–12
Aaaa.bb
1
ENT
SHFT
B
K
7
ENT
7
ENT
V
DL05 Micro PLC User Manual, 6th Edition, Rev. A
1
4
0
0
Page 136
Chapter 5: Standard RLL - Boolean Instructions
And (AND) DS5 Implied The And instruction logically ands a normally open HPP
Used
Aaaa 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 (ANDN) DS5 Implied HPP
Used
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.
Aaaa
Operand Data Type
DL05 Range
....................................A aaa
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT Special Relay . . . . . . . . . . . . . . . . . . . . . . . . . . SP
0–377 0–377 0–777 0–377 0–177 0–177 0–777
In the following And example, when input X1 and X2 are on output Y5 will energize.
DirectSOFT 5 Direct SOFT32 X1
Handheld Programmer Keystrokes X2
Y5 OUT
$
B STR
1
V AND
C
GX OUT
F
2 5
ENT ENT ENT
In the following And Not example, when input X1 is on and X2 is off output Y5 will energize. DirectSOFT 5 Direct SOFT32 X1
Handheld Programmer Keystrokes X2
Y5 OUT
$
B STR
1
W ANDN
C
GX OUT
F
2 5
ENT ENT ENT
DL05 Micro PLC User Manual, 6th Edition, Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 5–13
Page 137
Chapter 5: Standard RLL - Boolean Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
And Bit-of-Word (ANDB) DS5 Implied The And Bit-of-Word instruction logically ands a HPP
Used
Aaaa.bb normally open contact in series with another contact in a rung. The status of the contact will be the same state as the bit referenced in the associated memory location.
And Not Bit-of-Word (ANDNB) DS5 Implied HPP
Used
The And Not Bit-of-Word 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 bit referenced in the associated memory location. Operand Data Type
DL05 Range
..................................... V-memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A B PB aaa bb
See memory map See memory map
BCD, 0 to 15 BCD, 0 to 15
In the following And Bit-of-Word example, when input X1 and bit 4 of V1400 is on output Y5 will energize. DirectSOFT 5 X1
B1400.4
Y5 OUT
Handheld Programmer Keystrokes STR AND
1
ENT
SHFT
B
K
4
ENT
5
ENT
OUT
V
1
4
0
0
In the following And Not Bit-of-Word example, when input X1 is on and bit 4 of V1400 is off output Y5 will energize. DirectSOFT 5 X1
Y5
B1400.4
OUT
Handheld Programmer Keystrokes STR ANDN
OUT
5–14
Aaaa.bb
1
ENT
SHFT
B
K
4
ENT
V
5
ENT
DL05 Micro PLC User Manual, 6th Edition, Rev. A
1
4
0
0
Page 138
Chapter 5: Standard RLL - Boolean Instructions
And Store (AND STR)
1 2 3 Or Store (OR STR) The Or Store instruction logically ors two branches of a rung in parallel. Both branches 4 must begin with the Store instruction. 5 In the following And Store example, the branch consisting of contacts X2, X3, and X4 have been anded with the branch consisting of contact 6 X1. 7 8 9 10 11 12 In the following Or Store example, the branch consisting of X1 and X2 have been ored with the branch consisting of X3 and X4. 13 14 A B C D
DS5 Implied HPP
Used
The And Store instruction logically ands two branches of a rung in series. Both branches must begin with the Store instruction.
OUT
2
1
1
DS5 Implied HPP
OUT
Used
2
DirectSOFT 5 Direct SOFT32 X1
Handheld Programmer Keystrokes
X3
X2
Y5
$
B
STR
OUT
1
$
C
STR
X4
2
V AND
D
Q
E
3
OR
L ANDST
4
X1
ENT ENT
F
5
ENT
Handheld Programmer Keystrokes
X2
Y5
$
X4
B
STR
OUT
X3
ENT
ENT
GX OUT
DirectSOFT 5 Direct SOFT32
ENT
1
V AND
C
$
D
2
STR
3
V AND
M ORST GX OUT
E
4
ENT ENT ENT ENT
ENT
F
5
ENT
DL05 Micro PLC User Manual, 6th Edition, Rev. A
5–15
Page 139
Chapter 5: Standard RLL - Boolean Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Out (OUT) DS5
Used
HPP
Used
Aaaa The Out instruction reflects the status of the rung (on/off ) and OUT outputs the discrete (on/off ) state to the specified image register point or memory location. Multiple Out instructions referencing the same discrete location should not be used since only the last Out instruction in the program will control the physical output point. Instead, use the next instruction, the Or Out.
Operand Data Type
DL05 Range aaa
....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C
0–377 0–377 0–777
In the following Out example, when input X1 is on, output Y2 and Y5 will energize. DirectSOFT 5 Direct SOFT32
Handheld Programmer Keystrokes
X1
Y2
$
B STR
OUT Y5 OUT
1
GX OUT
C
GX OUT
F
2 5
ENT ENT ENT
Or Out (OROUT) DS5
Used
HPP
Used
5–16
The Or Out instruction allows more than one rung of discrete logic to control a single output. Multiple Or Out instructions referencing the same output coil may be used, since all contacts controlling the output are logically ORed together. If the status of any rung is on, the output will also be on. Operand Data Type
A aaa OR OUT
DL05 Range
....................................A aaa
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C
0–177 0–177 0–777
In the following example, when X1 or X4 is on, Y2 will energize. DirectSOFT 5 Direct SOFT32 X1
Handheld Programmer Keystrokes Y2
$
B STR
OR OUT
O INST#
1 D
F 3
5 E
$ STR X4
Y2 OR OUT
O INST#
4 D
F 3
DL05 Micro PLC User Manual, 6th Edition, Rev. A
5
ENT ENT
ENT
C
ENT
C
2
ENT
ENT ENT
2
ENT
Page 140
Chapter 5: Standard RLL - Boolean Instructions
Out Bit-of-Word (OUTB) DS5
Used
HPP
Used
1 2 3 Operand Data Type DL05 Range 4 aaa bb 5 In the following Out Bit-of-Word example, when input X1 is on, bit 3 of V1400 and bit 6 of 6 V1401 will turn on. 7 8 9 10 11 12 The following Out Bit-of-Word example contains two Out Bit-of-Word instructions using the same bit in the same memory word. The final state bit 3 of V1400 is ultimately controlled 13 by the last rung of logic referencing it. X1 will override the logic state controlled by X0. To avoid this situation, multiple outputs using the same location must not be used in 14 programming. A B C D The Out Bit-of-Word instruction reflects the status of the rung (on/off ) and outputs the discrete (on/off ) state to the specified bit in the referenced memory location. Multiple Out Bit-of-Word instructions referencing the same bit of the same word generally should not be used since only the last Out instruction in the program will control the status of the bit.
....................................A V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PB
Aaaa.bb OUT
See memory map See memory map
BCD, 0 to 15 BCD, 0 to 15
DirectSOFT 5
X1
B1400.3 OUT
B1401.6 OUT
Handheld Programmer Keystrokes STR
OUT
OUT
1
SHFT
B
K
3
SHFT
B
K
6
ENT
V
1
4
0
0
V
1
4
0
1
ENT
ENT location must not be used in programming. X0
B1400.3 OUT
X1
B1400.3 OUT
DL05 Micro PLC User Manual, 6th Edition, Rev. A
5–17
Page 141
Chapter 5: Standard RLL - Boolean Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Not (NOT) DS5
Used
HPP
Used
The Not instruction inverts the status of the rung at the point of the instruction. In the following example when X1 is off, Y2 will energize. This is because the Not instruction inverts the status of the rung at the Not instruction. DirectSOFT 5 DirectSOFT32
Handheld Programmer Keystrokes
X1
$
Y2
B STR
ENT
1
OUT
N TMR
SHFT GX OUT
O INST#
T MLR
C
ENT
2
ENT
NOTE: DirectSOFT Release 1.1i and later supports the use of the NOT instruction. The above example rung is merely intended to show the visual representation of the NOT instruction. The rung cannot be created or displayed in DirectSOFT versions earlier than 1.1i.
Positive Differential (PD) DS5
Used
HPP
Used
5–18
The Positive Differential instruction is typically known as a one shot. When the input logic produces an off to on transition, the output will energize for one CPU scan.
A aaa PD
Operand Data Type
DL05 Range aaa
....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C
0–377 0–377 0–777
In the following example, every time X1 makes an off to on transition, C0 will energize for one scan. DirectSOFT 5 DirectSOFT32 X1
Handheld Programmer Keystrokes C0
$
B STR
PD SHFT
DL05 Micro PLC User Manual, 6th Edition, Rev. A
1 P CV
SHFT
ENT D
A 3
0
Page 142
Chapter 5: Standard RLL - Boolean Instructions
Store Positive Differential (STRPD) DS5
Used
HPP
Used
DS5
Used
HPP
Used
1 2 3 4 5 Store Negative Differential (STRND) 6 The Store Negative Differential instruction begins a new rung or an additional branch in a rung with a 7 normally closed contact. The contact closes for one CPU scan when the state of the associated image register point makes an On-to-Off transition. 8 Thereafter, the contact remains open until the next On-to-Off transition (the symbol inside the contact 9 represents the transition). Operand Data Type DL05 Range 10 aaa 11 12 13 In the following example, each time X1 is makes an Off-to-On transition, Y4 will energize for one scan. 14 A B In the following example, each time X1 is makes an On-to-Off transition, Y4 will energize for one scan. C D The Store Positive Differential instruction begins a new rung or an additional branch in a rung with a normally open contact. The contact closes for one CPU scan when the state of the associated image register point makes an Off-to-On transition. Thereafter, the contact remains open until the next Off-to-On transition (the symbol inside the contact represents the transition). This function is sometimes called a “one-shot”. This contact will also close on a program-to-run transition if it is within a retentative range and on before the PLC mode transition.
Aaaa
Aaaa
....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT
0–377 0–377 0–777 0–377 0–177 0–177
DirectSOFT 5
Handheld Programmer Keystrokes
DirectSOFT32 X1
Y4
OUT
DirectSOFT 5
STR
SHFT
GX OUT
D
P
CV
E
4
B
3
1
ENT
ENT
Handheld Programmer Keystrokes
DirectSOFT32 X1
$
Y4
OUT
$
STR
GX OUT
SHFT
N TMR E 4
B
D
3
1
ENT
ENT
DL05 Micro PLC User Manual, 6th Edition, Rev. A
5–19
Page 143
Chapter 5: Standard RLL - Boolean Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Or Positive Differential (ORPD) DS5 Implied The Or Positive Differential instruction logically ors a contact HPP
Used in parallel with another contact in a rung. The status of the contact will be open until the associated image register point makes an Off-to-On transition, closing it for one CPU scan. Thereafter, it remains open until another Off-to-On transition.
Aaaa
Or Negative Differential (ORND) DS5 Implied The Or Negative Differential instruction logically ors a HPP
5–20
Used contact in parallel with another contact in a rung. The status of the contact will be open until the associated image register point makes an On-to-Off transition, closing it for one CPU scan. Thereafter, it remains open until another On-to-Off transition.
Aaaa
DL05 Range
Operand Data Type aaa
....................................A Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . C Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT
0–377 0–377 0–777 0–377 0–177 0–177
In the following example, Y 5 will energize whenever X1 is on, or for one CPU scan when X2 transitions from Off to On. DirectSOFT 5 DirectSOFT32 X1
Handheld Programmer Keystrokes $
B
Y5
STR
OUT
Q OR
X2
ENT
1 SHFT
P CV
3
F
GX OUT
C
D
2
ENT
ENT
5
In the following example, Y 5 will energize whenever X1 is on, or for one CPU scan when X2 transitions from On to Off. DirectSOFT 5
Handheld Programmer Keystrokes
DirectSOFT32 X1
Y5 OUT
B
$ STR Q OR
X2
GX OUT
DL05 Micro PLC User Manual, 6th Edition, Rev. A
1 SHFT
N TMR F 5
ENT D
C 3
ENT
2
ENT