The text of a manual · part 17 of 40
DL05 Micro PLC User Manual, Volume 1 of 2: Chapter 5: Standard RLL and Intelligent Box Instructions, pages 144 to 153
Pages 144 to 153 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 144
Chapter 5: Standard RLL - Boolean Instructions
And Positive Differential (ANDPD) DS5 Implied The And Positive Differential instruction logically ands a HPP
Used contact in series 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
And Negative Differential (ANDND) DS5 Implied HPP
Used
The And Negative Differential instruction logically ands a contact in series 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, Y5 will energize for one CPU scan whenever X1 is on and X2 transitions from Off to On. DirectSOFT 5
Handheld Programmer Keystrokes
DirectSOFT32 X1
X2
$
B
Y5
STR
OUT
Q OR
1 SHFT
CV F
GX OUT
ENT D
P
5
C 3
2
ENT
ENT
In the following example, Y5 will energize for one CPU scan whenever X1 is on and X2 transitions from On to Off. DirectSOFT 5
Handheld Programmer Keystrokes
DirectSOFT32 X1
X2
Y5 OUT
B
$ STR Q OR GX OUT
1 SHFT
N TMR F 5
ENT C
D 3 ENT
DL05 Micro PLC User Manual, 6th Edition, Rev. A
2
ENT
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–21
Page 145
Chapter 5: Standard RLL - Boolean Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Set (SET) DS5
Used
HPP
Used
Optional memory range
The Set instruction sets or turns on an image register point/memory location or a consecutive range of image register points/memory locations. Once the point/location is set it will remain on until it is reset using the Reset instruction. It is not necessary for the input controlling the Set instruction to remain on.
A aaa aaa SET
Reset (RST) DS5
Used
HPP
Used
5–22
The Reset instruction resets or turns off an image register point/memory location or a range of image registers points/memory locations. Once the point/location is reset it is not necessary for the input to remain on.
Optional Memory . range
A aaa aaa RST
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 when X1 is on, Y2 through Y5 will energize.
DirectSOFT 5 DirectSOFT32 X1
Handheld Programmer Keystrokes Y2
$
Y5
B STR
SET
X SET
ENT
1 C
F 2
ENT
5
In the following example when X1 is on, Y2 through Y5 will be reset or de–energized. DirectSOFT 5 DirectSOFT32 X2
Handheld Programmer Keystrokes Y2
Y5 RST
DL05 Micro PLC User Manual, 6th Edition, Rev. A
$
B STR
S RST
1
ENT F
C 2
5
ENT
Page 146
Chapter 5: Standard RLL - Boolean Instructions
Set Bit-of-Word (SETB) DS5
Used
HPP
Used
The Set Bit-of-Word instruction sets or turns on a bit in a V-memory location. Once the bit is set it will remain on until it is reset using the Reset Bit-of-Word instruction. It is not necessary for the input controlling the Set Bit-of-Word instruction to remain on.
Aaaa.bb SET
Reset Bit-of-Word (RSTB) DS5
Used
HPP
Used
A aaa.bb RST
The Reset Bit-of-Word instruction resets or turns off a bit in a V-memory location. Once the bit is reset it is not necessary for the input to remain on. Operand Data Type
DL05 Range
....................................A V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PB aaa bb
See memory map See memory map
BCD, 0 to 15 BCD, 0 to 15
In the following example when X1 turns on, bit 1 in V1400 is set to the on state. DirectSOFT 5 DirectSOFT32 X1
B1400.1 SET
Handheld Programmer Keystrokes STR
1
SET
SHFT
B
K
1
ENT V
1
4
0
0
ENT
In the following example when X2 turns on, bit 1 in V1400 is reset to the off state. DirectSOFT 5 DirectSOFT32 X2
B1400.1 RST
Handheld Programmer Keystrokes STR RST
2 SHFT
B
K
1
ENT V
1
4
0
0
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–23
Page 147
Chapter 5: Standard RLL - Boolean Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Pause (PAUSE) DS5
Used
HPP
Used
5–24
The Pause instruction disables the output update on a range of outputs. The ladder program will continue to run and update the image register. However, the outputs in the range specified in the Pause instruction will be turned off at the output points.
Y aaa aaa PAUSE
Operand Data Type
DL05 Range aaa
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y
0–377
In the following example, when X1 is ON, Y5-Y7 will be turned OFF. The execution of the ladder program will not be affected. DirectSOFT 5 DirectSOFT32 X1
Y5
Y7
PAUSE
Since the D2–HPP Handheld Programmer does not have a specific Pause key, you can use the corresponding instruction number for entry (#960), or type each letter of the command. Handheld Programmer Keystrokes $
B STR
O INST#
1 J
G 9
ENT A
6
0
ENT
ENT
D
F 3
5
ENT
In some cases, you may want certain output points in the specified pause range to operate normally. In that case, use Aux 58 to over-ride the Pause instruction.
DL05 Micro PLC User Manual, 6th Edition, Rev. A
Page 148
Chapter 5: Standard RLL - Comparative Boolean Instructions
Comparative Boolean DS5 HPP
DS5 HPP
1 Store If Equal (STRE) 2 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 3 Vaaa is equal toBbbb . 4 Store If Not Equal (STRNE) The Store If Not Equal instruction begins a new rung or additional branch in a rung with a normally closed 5 comparative contact. The contact will be on when Vaaa does not equal Bbbb. 6 Operand Data Type DL05 Range aaa bbb 7 8 In the following example, when the value in V-memory location V2000 = 4933, Y3 will 9 energize. 10 11 12 In the following example, when the value in V-memory location V2000 is not equal to 5060, 13 Y3 will energize. 14 A B C D Used Used
Used
V aaa
B bbb
V aaa
B bbb
Used
....................................B V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K
DirectSOFT 5
K4933
Y3
$
STR
OUT
SHFT
E
E
J
DirectSOFT 5
D
9
D
3
A
2
D
3
3
A
0
A
0
0
ENT
ENT
Handheld Programmer Keystrokes
DirectSOFT32
K5060
C
4
4
GX OUT
V2000
All (See page 3–28) All (See page 3–28) 0–9999
Handheld Programmer Keystrokes
DirectSOFT32 V2000
All (See page 3–28) All (See page 3–28) ––
Y3
SP STRN
OUT
SHFT
E
F
A
5
GX OUT
C
4
G
0
D
3
A
2
A
6
0
A
0
A
0
0
ENT
ENT
DL05 Micro PLC User Manual, 6th Edition, Rev. A
5–25
Page 149
Chapter 5: Standard RLL - Comparative Boolean Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
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 is equal to Bbbb.
V aaa
B bbb
V aaa
B bbb
Or If Not Equal (ORNE) DS5 Implied HPP
5–26
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
DL05 Range
....................................B V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K aaa bbb
All (See page 3–28) All (See page 3–28) ––
All (See page 3–28) All (See page 3–28) 0–9999
In the following example, when the value in V-memory location V2000 = 4500 or V2002 = 2345 , Y3 will energize. DirectSOFT 5 DirectSOFT32 K4500
V2000
Handheld Programmer Keystrokes Y3 OUT
SHFT
E
F
A
$ STR E 4
5
Q
K2345
V2002
E
D
E
OR C 2
A 0
C
A 2
F 4
A 0
0
C
A 0
0
2
ENT
5
D
A 0
ENT
4
3
GX OUT
2
0
SHFT
A
C 4
ENT
3
In the following example, when the value in V-memory location V2000 = 3916 or V2002 is not equal to 050, Y3 will energize. DirectSOFT 5
Handheld Programmer Keystrokes
DirectSOFT32 V2000
K3916
Y3 OUT
V2002
K2500
$ STR D
SHFT
E
J
B
3
9
R ORN
SHFT
E
C
F
A
2
DL05 Micro PLC User Manual, 6th Edition, Rev. A
A 2
G 1
6
0 D 3
0 ENT
A 0
A
A 2
A
A 0
0
ENT C
4
5
GX OUT
C 4
ENT
0
C 0
2
Page 150
Chapter 5: Standard RLL - Comparative Boolean Instructions
And If Equal (ANDE) 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 is equal to Bbbb.
And If Not Equal (ANDNE) The And If Not Equal instruction connects a DS5 Implied normally closed comparative contact in series with HPP Used another contact. The contact will be on when Vaaa does not equal Bbbb Operand Data Type
V aaa
B bbb
V aaa
B bbb
DL05 Range
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K aaa bbb
All (See page 3–28) All (See page 3–28) ––
All (See page 3–28) All (See page 3–28) 0–9999
In the following example, when the value in V-memory location V2000 = 5000 and V2002 = 2345, Y3 will energize.
DirectSOFT 5 V2000
Handheld Programmer Keystrokes K5000
V2002
K2345
Y3
$ STR
OUT
F
SHFT
E
A
A 0
SHFT
E
C
D
E
0
C
A
F 4
A 0
A 0
2
0
C 0
2
ENT
5
D
A 0
ENT
4
3
2
A 2
A 0
5 V AND
GX OUT
C 4
ENT
3
In the following example, when the value in V-memory location V2000 = 2550 and V2002 does not equal 050, Y3 will energize. DirectSOFT 5 V2000
Handheld Programmer Keystrokes K5000
V2002
K2345
Y3 OUT
$ STR F
SHFT
E
A
A
5
SHFT
E
C
D
E
2
A 0
4 D 3
A 2
F 5
A 0
A 0
0
ENT C
4
3
A 2
0
0
V AND
GX OUT
C 4
A 0
C 0
ENT
ENT
DL05 Micro PLC User Manual, 6th 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 151
Chapter 5: Standard RLL - Comparative Boolean Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Store (STR) DS5
Used
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) DS5
Used
HPP
Used
5–28
The Comparative Store Not instruction begins a new rung or additional branch in a rung with a normally closed comparative contact. The contact will be on when Aaaa is less than Bbbb. Operand Data Type
A aaa
B bbb
A aaa
B bbb
DL05 Range
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT aaa bbb
All (See page 3–28) All (See page 3–28) –– 0–177 0–177
All (See page 3–28) All (See page 3–28) 0–9999
In the following example, when the value in V-memory location V2000 욷 1000, Y3 will energize. DirectSOFT 5
Handheld Programmer Keystrokes
DirectSOFT32 V2000
K1000
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
DL05 Micro PLC User Manual, 6th Edition, Rev. A
0 D 3
5 ENT
A 2 0
A 0
ENT
A 0
0
Page 152
Chapter 5: Standard RLL - Comparative Boolean Instructions
Or (OR) DS5 Implied The Comparative Or instruction connects a normally HPP
Used 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
Used
The Comparative Or Not instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when Aaaa is less than Bbbb. Operand Data Type
DL05 Range
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT aaa bbb
All (See page 3–28) All (See page 3–28) –– 0–177 0–177
All (See page 3–28) All (See page 3–28) 0–9999
In the following example, when the value in V-memory location V2000 = 6045 or V2002 욷 2345, Y3 will energize. DirectSOFT 5
Handheld Programmer Keystrokes
DirectSOFT32 V2000
K6045
SHFT
E
A
E
$
Y3
STR
OUT
G 6
V2002
0
Q
K2345
OR D
C 2
C 4 5 V AND
C
E
F
ENT
4
A 0
0
ENT
4
A
A 2
5
D
A 0
SHFT
3
GX OUT
A 2
F
0
C 0
2
ENT
3
In the following example when the value in V-memory location V2000 = 1000 or V2002 < 050, 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
GX OUT
C 4
A 2
A 0
0 V AND
C
A
A
ENT
0 D 3
0
A 0
0
ENT
SHFT
5
A 0
A
A 2
0
C 0
2
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–29
Page 153
Chapter 5: Standard RLL - Comparative Boolean Instructions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
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) DS5 Implied HPP
5–30
Used
The Comparative And Not instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when Aaaa is less than Bbbb. Operand Data Type
A aaa
B bbb
A aaa
B bbb
DL05 Range
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A/B V-memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CT aaa bbb
All (See page 3–28) All (See page 3–28) –– 0–177 0–177
All (See page 3–28) All (See page 3–28) 0–9999
In the following example, when the value in 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
A 2
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
C 4
0
C 0
2
ENT
3
In the following example, when the value in V-memory location V2000 = 7000 and V2002 < 050, 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
DL05 Micro PLC User Manual, 6th Edition, Rev. A
A 2
A 0
0 V AND
C
A
A
ENT
0 D 3
0 ENT
A 0
A 0
0
ENT
SHFT
5
GX OUT
C 4
A 2
A 0
C 0
2