The text of a manual · part 25 of 60
DL205 PLC User Manual, Volume 1 of 2, pages 241 to 250
Pages 241 to 250 of 598
The original document is the PDF (12 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 D2-04TD1, AutomationDirect D2-08TD2, AutomationDirect D2-16ND3-2, AutomationDirect D2-32ND3, Konnect-It D2-04TD1, Koyo D2-04TD1, Konnect-It D2-08TD2, Koyo D2-08TD2, and 5 more models
Page 241
Chapter 5: Standard RLL Instructions
Out (OUT)
230 240 250-1 260
1 2 3 Operand Data Type DL230 Range DL240 Range DL250-1 Range DL260 Range 4 A aaa aaa aaa aaa 5 6 7 In the following Out example, when input X1 is on, output Y2 and Y5 will energize. 8 9 10 11 In the following Out example, the program contains two Out instructions using the same location (Y10). The physical output of Y10 is ultimately controlled by the last rung of logic referencing Y10. X1 will override the Y10 output being controlled by X0. To avoid this 12 situation, multiple outputs using the same location should not be used in programming. If you need to have an output controlled by multiple inputs, see the OROUT instruction on 13 page 5–19. 14 A B C D The Out instruction reflects the status of the rung (on/off) and 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.
Inputs Outputs Control Relays Global Global
DS HPP
Used Used
X Y C GX GY
0–177 0–177 0–377 -
Aaaa OUT
0–477 0–477 0–377 -
0–777 0–777 0–1777 -
0–1777 0–1777 0–3777 0–3777 0–3777
Handheld Programmer Keystrokes
DirectSOFT X1
Y2
OUT Y5
OUT
X0
$
STR
B
GX OUT
C
GX OUT
F
1 2
5
ENT ENT ENT
Y10
OUT
X1
Y10
OUT
DL205 User Manual, 4th Edition, Rev. D
5-17
Page 242
Chapter 5: Standard RLL Instructions
1 2
3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Out Bit-of-Word (OUTB) 230 240 250-1 260
DS HPP
5-18
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. Operand Data Type
DL250-1 Range
V-memory bb aaa bb memory map B See page 3-55
BCD, 0 to 15
See memory map page 3-56 See memory map page 3-56
BCD, 0 to 15 memory map PB See page 3-55
Pointer
DL260 Range aaa
A
Used Used
Aaaa.bb OUT
BCD
BCD
In the following Out Bit-of-Word example, when input X1 is on, bit 3 of V1400 and bit 6 of V1401 will turn on. DirectSOFT X1
B1400.3 OUT B1401.6
Handheld Programmer Keystrokes
STR
1
OUT
SHFT K
3
OUT
SHFT
B
K
6
OUT ENT
B
V
1
4
0
0
V
1
4
0
1
ENT
ENT
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 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 programming. location must not be used in programming. X0
B1400.3 OUT
X1
B1400.3 OUT
DL205 User Manual, 4th Edition, Rev. D
Page 243
Chapter 5: Standard RLL Instructions
Or Out (OROUT)
230 240 250-1 260
1 2 3 Operand Data Type DL230 Range DL240 Range DL250-1 Range DL260 Range A aaa aaa aaa aaa 4 5 6 In the following example, when X1 or X4 is on, Y2 will energize. 7 8 9 10 11 Not (NOT) 12 The Not instruction inverts the status of the rung at the point of the instruction. 13 In the following example, when X1 is off, Y2 will energize. This is because the Not instruction 14 inverts the status of the rung at the Not instruction. A B C D 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 OR’d together. If the status of any rung is on, the output will also be on.
Inputs Outputs Control Relays Global Global
DS HPP
Used Used
X Y C GX GY
0–177 0-177 0–377 -
0–477 0-477 0–377 -
Y2
$
OR OUT
$
Y2
230 240 250-1 260 DS HPP
Used Used
0–1777 0-1777 0–3777 0–3777 0–3777
F
3
E
D
F
3
1
5
4
5
ENT ENT
ENT
C
ENT
C
2
ENT
ENT ENT
2
ENT
Handheld Programmer Keystrokes
DirectSOFT X1
D
STR
O INST#
OR OUT
B
STR
O INST#
X4
0–777 0-777 0–1777 -
Handheld Programmer Keystrokes
DirectSOFT X1
A aaa OR OUT
Y2
OUT
$
B
STR
SHFT
GX OUT
N TMR
1
ENT
O INST#
T MLR
C
ENT
2
DL205 User Manual, 4th Edition, Rev. D
ENT
5-19
Page 244
Chapter 5: Standard RLL Instructions
1
2
3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Positive Differential (PD) 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.
230 240 250-1 260
Operand Data Type
Inputs Outputs Control Relays
DS HPP
5-20
A aaa PD
DL230 Range DL240 Range DL250-1 Range DL260 Range A aaa aaa aaa aaa
X Y C
0–177 0–177 0–377
0–477 0–477 0–377
0–777 0–777 0–1777
0–1777 0–1777 0–3777
In the following example, every time X1 makes an off to on transition, C0 will energize for one scan. Used Used Handheld Programmer Keystrokes
DirectSOFT X1
C0 PD
$
B
STR
SHFT
P
CV
1
SHFT
ENT D
3
A
0
ENT
NOTE: To generate a “one–shot” pulse on an on–to–off transition, place a NOT instruction immediately before the PD instruction. The DL250–1 and DL260 CPUs support the STRND instruction.
DL205 User Manual, 4th Edition, Rev. D
Page 245
Chapter 5: Standard RLL Instructions
Store Positive Differential (STRPD)
1 2 3 symbol inside the contact represents the transition). This function is sometimes called a “oneshot.” ‘This contact will also close on a program-to-run transition if it is within a retentive range 4 and on before the PLC mode transition. Store Negative Differential (STRND) 5 The Store Negative Differential instruction begins a new rung or an additional branch in a rung with a 6 contact. The contact closes for one CPU scan when the state of the associated image register point makes an on-to-off transition. Thereafter, the contact 7 remains open until the next on-to-off transition (the symbol inside the contact represents the transition). 8 Operand Data Type DL250-1 Range DL260 Range 9 aaa aaa 10 11 12 In the following example, each time X1 is makes an off-to-on transition, Y4 will energize for one scan. 13 14 A B In the following example, each time X1 makes an on-to-off transition, Y4 will energize for one scan. C D
Store Positive Differential instruction begins a 230 The new rung or an additional branch in a rung with a 240 contact. The contact closes for one CPU scan when 250-1 the state of the associated image register point makes off-to-on transition. Thereafter, the contact 260 an remains open until the next off-to-on transition (the
230 240 250-1 260
Aaaa
Inputs Outputs Control Relays Stage Timer Counter Global Global
DS HPP
Aaaa
A X Y C S T CT GX GY
0–777 0–777 0–1777 0–1777 0–377 0–177 – –
0–1777 0–1777 0–3777 0–1777 0–377 0–377 0–3777 0–3777
Used Used
Handheld Programmer Keystrokes
DirectSOFT
X1
Y4
OUT
STR
SHFT
GX OUT
P
CV
E
4
D
3
B
1
ENT
ENT
Handheld Programmer Keystrokes
DirectSOFT
X1
$
Y4
OUT
$
STR
GX OUT
SHFT
N TMR E
4
D
3
B
1
ENT
ENT
DL205 User Manual, 4th Edition, Rev. D
5-21
Page 246
Chapter 5: Standard RLL Instructions
Or Positive Differential (ORPD)
The Or Positive Differential instruction logically ORs a 1 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 off-to-on transition, closing it for one CPU 2 scan. Thereafter, it remains open until another off-to-on transition. 3 Or Negative Differential (ORND) 4 The Or Negative Differential instruction logically ORs a contact in parallel with another contact in a rung. The status of the contact will be open until the associated image register 5 point makes an on-to-off transition, closing it for one CPU scan. Thereafter, it remains open until another on-to-off 6 transition. Operand Data Type DL250-1 Range DL260 Range 7 A aaa aaa 8 9 10 11 In the following example, Y5 will energize whenever X1 is on, or for one CPU scan when X2 transitions from off to on. 12 13 14 A In the following example, Y5 will energize whenever X1 is on, or for one CPU scan when X2 B transitions from on to off. C D 230
Aaaa
240
250-1 260
230
Aaaa
240
250-1 260
Inputs Outputs Control Relays Stage Timer Counter Global Global
X Y C S T CT GX GY
0–777 0–777 0–1777 0–1777 0–377 0–177 – –
0–1777 0–1777 0–3777 0–1777 0–377 0–377 0–3777 0–3777
DS Implied HPP Used
Handheld Programmer Keystrokes
DirectSOFT X1
Y5
OUT
X2
Q
OR
SHFT
P
1
CV
F
5
ENT
D
3
C
2
ENT
ENT
Handheld Programmer Keystrokes
Y5
OUT
X2
5-22
B
STR
GX OUT
DirectSOFT X1
$
DL205 User Manual, 4th Edition, Rev. D
$
B
STR
Q
OR
GX OUT
SHFT
1
N TMR F
5
ENT
D
3
ENT
C
2
ENT
Page 247
Chapter 5: Standard RLL Instructions
And Positive Differential (ANDPD)
1 2 3 And Negative Differential (ANDND) 4 The And Negative Differential instruction logically ANDs a normally open contact in series with another contact 5-23in a rung. The status of the contact will 5 be open until the associated image register point makes an on-to-off transition, closing it for one CPU scan.
6 Thereafter, it remains open until another on-to-off transition.
Operand Data Type DL250-1 Range DL260 Range 7 A aaa aaa 8 9 10 11 In the following example, Y5 will energize for one CPU scan whenever X1 is on and X2 transitions from off to on. 12 13 14 A In the following example, Y5 will energize for one CPU scan whenever X1 is on and X2 B transitions from on to off. C D The And Positive Differential instruction logically ANDs
230 a normally open contact in series with another contact 240 in a rung. The status of the contact will be open until associated image register point makes an off-to-on 250-1 the transition, closing it for one CPU scan. Thereafter, it 260 remains open until another off-to-on transition.
Aaaa
Aaaa
230 240
250-1 260
Inputs Outputs Control Relays Stage Timer Counter Global Global
X Y C S T CT GX GY
0–777 0–777 0–1777 0–1777 0–377 0–177 – –
0–1777 0–1777 0–3777 0–1777 0–377 0–377 0–3777 0–3777
DS Implied HPP Used
Handheld Programmer Keystrokes
DirectSOFT X1
X2
Y5
OUT
$
B
STR
V
AND
SHFT
1
CV
F
GX OUT
5
ENT
D
3
C
2
ENT
ENT
Handheld Programmer Keystrokes
DirectSOFT X1
P
X2
Y5
OUT
$
B
STR
V
AND
GX OUT
SHFT
1
N TMR F
5
ENT
D
3
C
2
ENT
ENT
DL205 User Manual, 4th Edition, Rev. D
5-23
Page 248
Chapter 5: Standard RLL Instructions
Set (SET)
Optional memory range A aaa aaa SET
The Set instruction sets or turns on an image register 1 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 2 the Reset instruction. It is not necessary for the input controlling the Set instruction to remain on. 3 Reset (RST) 4 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 5 reset, it is not necessary for the input to remain on.
6 Operand Data Type DL230 Range DL240 Range DL250-1 Range DL260 Range aaa aaa aaa aaa 7 8 9 10 11 NOTE: You cannot set inputs (Xs) that are assigned to input modules In the following example, when X1 is on, Y2 through Y5 will energize. 12 13 14 A In the following example, when X2 is on, Y2 through Y5 will be reset or de–energized. B C D 230 240
250-1 260
Optional Memory range . A aaa aaa RST
230 240
250-1 260
A Inputs X 0–177 0–477 Outputs Y 0-177 0-477 Control Relays C 0–377 0–377 Stage S 0-377 0-777 Timer* T 0-77 0-177 Counter * CT 0-77 0-177 Global GX Global GY * Timer and counter operand data types are not valid using the Set instruction
DS HPP
0–1777 0-1777 0–3777 0-1777 0-377 0-377 0–3777 0–3777
Used Used
Handheld Programmer Keystrokes
DirectSOFT X1
Y2
Y5
SET
X2
$
STR
X SET
B
C
1
ENT
F
2
5
ENT
Handheld Programmer Keystrokes
DirectSOFT
Y2
Y5
RST
5-24
0–777 0-777 0–1777 0-1777 0-377 0-177 -
DL205 User Manual, 4th Edition, Rev. D
$
STR
S RST
C C
2 2
ENT
F
5
ENT
Page 249
Chapter 5: Standard RLL Instructions
Set Bit-of-Word (SETB)
Aaaa.bb SET
230 The Set Bit-of-Word instruction sets or turns on a bit in a V-memory Once the bit is set, it will remain on until it is reset using 240 location. the Reset Bit-of-Word instruction. It is not necessary for the input 250-1 controlling the Set Bit-of-Word instruction to remain on. 260 Reset Bit-of-Word (RSTB) 230 240 250-1 260
Operand Data Type
DL250-1 Range
Used Used
DL260 Range
A aaa aaa bb bb B See memory map BCD, 0 to 15 See memory map BCD, 0 to 15 PB See memory map BCD See memory map BCD
V-memory Pointer
DS HPP
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.
In the following example, when X1 turns on, bit 1 in V1400 is set to the on state. DirectSOFT 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 X2
B1400.1 RST
Handheld Programmer Keystrokes STR RST
2 SHFT
B
K
1
ENT V
1
4
0
0
ENT
DL205 User Manual, 4th Edition, Rev. D
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5-25
Page 250
Chapter 5: Standard RLL Instructions
1
2
3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Pause (PAUSE) 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.
230 240 250-1 260
Operand Data Type
DL230 Range DL240 Range DL250-1 Range DL260 Range
Outputs
DS HPP
5-26
Y aaa aaa PAUSE
Y aaa aaa aaa aaa
0-177
0-477
0-777
0-1777
In the following example, when X1 is ON, Y5–Y7 will be turned OFF. The execution of the ladder program will not be affected. Used Used
DirectSOFT 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#
J
9
G
1 6
ENT A
0
ENT
ENT
F
5
H
7
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 override the Pause instruction.
DL205 User Manual, 4th Edition, Rev. D