The text of a manual · part 28 of 61
DL205 PLC User Manual, Volume 1 of 2: Chapter 5: RLL and Intelligent Box Instructions, pages 253 to 262
Pages 253 to 262 of 592, from DL205 PLC User Manual, Volume 1 of 2
The original document is the PDF (13 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 PLC Direct D2-08ND3 and Koyo D2-08ND3
Page 253
Chapter 5: Standard RLL Instructions - Boolean
Or (OR)
230 240 250-1 260
The Comparative Or instruction connects a normally open comparative contact in parallel with another contact. The contact will be on when Aaaa is equal to or greater than Bbbb.
240 250-1 260
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.
A aaa
B bbb
A aaa
B bbb
Or Not (ORN)
230
Operand Data Type A/B V-memory
Pointer Constant
DL230 Range
DL240 Range
DL250-1 Range
DL260 Range aaa aaa aaa aaa bbb bbb bbb bbb
All. (See All. (See All. (See All. (See All. (See All. (See All. (See All. (See V memory map memory map memory map memory map memory map memory map memory map memory map page 3-53) page 3-53) page 3-54) page 3-54) page 3-55) page 3-55) page 3-56) page 3-56) All V-memory. All V-memory. All V-memory. (See memory (See memory (See memory P – – – – – map page map page map page 3-54) 3-55) 3-56) K – 0-FFFF – 0-FFFF – 0-FFFF – 0-FFFF
In the following example, when the value in V-memory location V2000 = 6045 or V2002 욷 2345, Y3 will energize. In the following example when the value in V-memory location V2000 = 1000 or V2002 < 2500, Y3 will energize. DS Implied HPP Used DirectSOFT V2000
Handheld Programmer Keystrokes K6045
Y3 OUT
$ STR G
SHFT
E
A
E
6 V2002
0
Q
K2345
OR C
D 2
DirectSOFT
5 V AND
C
E
F
ENT
4 3
5
A 0
0
ENT
4
D
K1000
Y3
STR
OUT
B
SHFT
E
A
A
1 V2002
F
A 0
A 2
A 0
C 0
2
ENT
Handheld Programmer Keystrokes $
V2000
A 2
SHFT
3
GX OUT
C 4
K2500
0
R ORN C
F 2
GX OUT
C
A
A 0
0 V AND
C
A
A
ENT
0 D 3
0
A 0
0
ENT
SHFT
5
A 0
2
4
A 2
A 0
C 0
2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
ENT
DL205 User Manual, 4th Edition, Rev. A
5–31
Page 254
Chapter 5: Standard RLL Instructions - Boolean
And (AND)
The Comparative And instruction connects a normally 1 open comparative contact in series with another contact. The contact will be on when Aaaa is equal to 2 or greater than Bbbb.
Not (ANDN) 3 And The Comparative And Not instruction connects a normally open comparative contact in series with another contact. The contact will be on when Aaaa < Bbbb. 4
5 Operand DL230 Range DL240 Range DL250-1 Range DL260 Range Data Type A/B aaa bbb aaa bbb aaa bbb aaa bbb 6 7 8 9 In the following example, when the value in V-memory location V2000 = 5000, and V2002 욷 2345, Y3 will energize. 10 In the following example, when the value in V-memory location V2000 = 7000 and V2002 < 2500, Y3 will energize. 11 12 13 14 A B C D 230
A aaa
B bbb
A aaa
B bbb
240
250-1 260
230 240
250-1 260
V-memory
Pointer
Constant
All (See All (See All (See All (See All (See All (See All (See All (See V memory map memory map memory map memory map memory map memory map memory map memory map page 3-53) page 3-53) page 3-54) page 3-54) page 3-55) page 3-55) page 3-56) page 3-56) All V-memory All V-memory All V-memory (See memory (See memory (See memory P map page map page map page 3-54) 3-55) 3-56) K 0-FFFF 0-FFFF 0-FFFF 0-FFFF
DS Implied HPP Used
DirectSOFT V2000
Handheld Programmer Keystrokes
K5000
V2002
K2345
Y3
$
STR
OUT
F
SHFT
E
A
A
5
0
V AND C
D
2
DirectSOFT V2000
A
0
V AND
C
E
F
ENT
A
2
5
D
A
0
0
ENT
0
4
A
0
A
0
C
0
2
ENT
3
Handheld Programmer Keystrokes
K7000
V2002
K2500
Y3
OUT
$
STR
H
SHFT
E
A
A
7
C
F
2
GX OUT
DL205 User Manual, 4th Edition, Rev. A
C
4
0
W ANDN
5–32
A
2
SHFT
3
GX OUT
C
4
A
2
A
0
SHFT
V AND
C
A
A
ENT
0
D 3
0
ENT
A
0
0
ENT
0
5
A
0
A
2
A
0
C
0
2
Page 255
Chapter 5: Standard RLL Instructions - Immediate
Immediate Instructions Store Immediate (STRI)
230 240 250-1 260
The Store Immediate instruction begins a new rung or additional branch in a rung. The status of the contact will be the same as the status of the associated input point at the time the instruction is executed. The image register is not updated.
X aaa
Store Not Immediate (STRNI)
240 250-1 260 230
X aaa
The Store Not Immediate instruction begins a new rung or additional branch in a rung. The status of the contact will be opposite the status of the associated input point at the time the instruction is executed. The image register is not updated. Operand Data Type
Inputs
DL230 Range DL240 Range DL250-1 Range DL260 Range X aaa aaa aaa aaa
0–177
0–477
0–777
0–1777
In the following example when X1 is on, Y2 will energize. DS Implied HPP Used DirectSOFT
Handheld Programmer Keystrokes
X1
$
Y2
STR
SHFT
I
B 1
8
ENT
OUT GX OUT
C 2
ENT
In the following example when X1 is off, Y2 will energize. DirectSOFT X1
Handheld Programmer Keystrokes Y2 OUT
SP STRN GX OUT
SHFT
I
B 1
8 C 2
ENT
DL205 User Manual, 4th Edition, Rev. A
ENT
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–33
Page 256
Chapter 5: Standard RLL Instructions - Immediate
Or Immediate (ORI)
The Or Immediate connects two contacts in parallel. The 1 status of the contact will be the same as the status of the associated input point at the time the instruction is executed. 2 The image register is not updated.
Immediate (ORNI) 3 Or Not The Or Not Immediate connects two contacts in parallel. The status of the contact will be opposite the status of the associated input point at the time the instruction is executed. 4
The image register is not updated.
5 Operand Data Type DL230 Range DL240 Range DL250-1 Range DL260 Range aaa aaa aaa aaa 6 In the following example, when X1 or X2 is on, Y5 will energize. 7 8 9 10 11 12 In the following example, when X1 is on or X2 is off, Y5 will energize. 13 14 A B C D 230 240
X aaa
250-1 260
230 240
X aaa
250-1 260
Inputs
X
0–177
0–477
0–777
0–1777
DS Implied HPP Used
DirectSOFT
X1
Handheld Programmer Keystrokes
Y5
$
B
1
STR
OUT
Q
OR
X2
SHFT
GX OUT
Y5
OUT
X2
F
5
$
B
STR
R ORN GX OUT
5–34
C
8
2
ENT
ENT
Handheld Programmer Keystrokes
DirectSOFT
X1
ENT
I
DL205 User Manual, 4th Edition, Rev. A
1
SHFT
ENT
I
C
8
F
5
2
ENT
ENT
Page 257
Chapter 5: Standard RLL Instructions - Immediate
And Immediate (ANDI)
240 250-1 260
The And Immediate connects two contacts in series. The status of the contact will be the same as the status of the associated input point at the time the instruction is executed. The image register is not updated.
240 250-1 260
The And Not Immediate connects two contacts in series. The status of the contact will be opposite the status of the associated input point at the time the instruction is executed. The image register is not updated.
230
X aaa
And Not Immediate (ANDNI)
230
Operand Data Type Inputs
X aaa
DL230 Range DL240 Range DL250-1 Range DL260 Range X aaa aaa aaa aaa
0–177
0–477
0–777
0–1777
In the following example, when X1 and X2 are on, Y5 will energize. DS Implied HPP Used DirectSOFT X1
Handheld Programmer Keystrokes X2
Y5 OUT
$
B 1
STR V AND
SHFT
GX OUT
ENT
I
C 8
F 5
2
ENT
ENT
In the following example, when X1 is on and X2 is off, Y5 will energize.
DirectSOFT X1
Handheld Programmer Keystrokes X2
Y5 OUT
$
B 1
STR W ANDN GX OUT
SHFT
ENT
I
C 8
F 5
2 ENT
DL205 User Manual, 4th Edition, Rev. A
ENT
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–35
Page 258
Chapter 5: Standard RLL Instructions - Immediate
Out Immediate (OUTI)
The Out Immediate instruction reflects the status of the 1 rung (on/off ) and outputs the discrete (on/off ) status to the specified module output point and the image register 2 at the time the instruction is executed. If multiple Out
Immediate instructions referencing the same discrete point are used it is possible for the module output status 3 to change multiple times in a CPU scan. See Or Out Immediate. 4 Or Out Immediate (OROUTI) The Or Out Immediate instruction has been designed to 5 use more than one rung of discrete logic to control a single output. Multiple Or Out Immediate instructions 6 referencing the same output coil may be used, since all contacts controlling the output are ored together. If the status of any rung is on at the time the instruction is 7 executed, the output will also be on. Operand Data Type DL230 Range DL240 Range DL250-1 Range DL260 Range 8 aaa aaa aaa aaa 9 In the following example, when X1 is on, output point Y2 on the output module will turn on. For instruction entry on the Handheld Programmer, you can use the instruction number 10 (#350) as shown, or type each letter of the command. 11 12 13 14 In the following example, when X1 or X4 is on, Y2 will energize. A B C D 230
Y aaa OUTI
240
250-1 260
230
Y aaa OROUTI
240
250-1 260
Outputs
DS HPP
Y
0–177
0–477
0–777
Used Used
DirectSOFT
X1
Handheld Programmer Keystrokes
Y2
OUTI
$
B
STR
O INST#
D
G
3
X1
ENT
0
ENT
ENT
Handheld Programmer Keystrokes
Y2
OR OUTI
X4
A
6
2
DirectSOFT
ENT
1
C
$
B
1
STR
O INST#
D
F
3
C
Y2
OR OUTI
2
$
D
F
3
2
0
ENT
ENT
ENT
ENT
ENT
4
C
DL205 User Manual, 4th Edition, Rev. A
A
E
O INST#
ENT
5
STR
5–36
0–1777
ENT
A
5
ENT
0
Page 259
Chapter 5: Standard RLL Instructions - Immediate
Out Immediate Formatted (OUTIF)
230 240 250-1 260
1 2 3 Operand Data Type DL260 Range aaa bbb 4 5 In the following example when C0 is on,the binary pattern for X10 –X17 is loaded into the accumulator using the Load Immediate Formatted instruction. The binary pattern in the accumulator is written to Y30–Y37 using the Out Immediate Formatted instruction. This 6 technique is useful to quickly copy an input pattern to outputs (without waiting for the CPU scan). 7 8 9 10 11 12 13 14 A B C D The Out Immediate Formatted instruction outputs a 1 to 32 bit binary value from the accumulator to specified output points at the time the instruction is executed. Accumulator bits that are not used by the instruction are set to zero.
Outputs Constant
DS HPP
Used Used
DirectSOFT CO
Y K
LDIF
0–1777 –
X10
K8
Load the value of 8 consecutive locations into the accumulator, starting with X10.
– 1–32
Location
Constant
X17 X16 X15 X14 X13 X12 X11 X10
X10
K8
ON OFF ON ON OFF ON OFF ON
Unused accumulator bits are set to zero
Acc.
OUTIF
Y aaa OUTIF K bbb
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
8
7 6 5
4 3
2
1
0
0
0
1 0
1
1 0
1
0
0
0 0
0
0
0
0 0
0
0
0
0 0
0
0
0
0
0 0
0
0
1
0
Y30
K8
Copy the value in the lower 8 bits of the accumulator to Y30-Y37
Location
Constant
Y37 Y36 Y35 Y34 Y33 Y32 Y31 Y30
Y30
K8
ON OFF ON ON OFF ON OFF ON
Handheld Programmer Keystrokes $
STR
NEXT
NEXT
NEXT
I
F
SHFT
L ANDST
D
GX OUT
SHFT
I
3
8
F
8
NEXT
0 1
A
3
ENT
A
B
5
D
5
A
I
0
8
I
0
8
ENT
ENT
DL205 User Manual, 4th Edition, Rev. A
5–37
Page 260
Chapter 5: Standard RLL Instructions - Immediate
Set Immediate (SETI)
The Set Immediate instruction immediately sets, or 1 turns on an output or a range of outputs in the image register and the corresponding output point(s) at the 2 time the instruction is executed. Once the outputs are set it is not necessary for the input to remain on. The Reset Immediate instruction can be used to reset the 3 outputs. Reset Immediate (RSTI) 4 The Reset Immediate instruction immediately resets, or turns off an output or a range of outputs in the 5 image register and the output point(s) at the time the instruction is executed. Once the outputs are reset it is 6 not necessary for the input to remain on. 7 Operand Data Type DL230 Range DL240 Range DL250-1 Range DL260 Range aaa aaa aaa aaa 8 9 In the following example, when X1 is on, Y2 through Y5 will be set on in the image register and on the corresponding output points. 10 11 12 13 In the following example, when X1 is on, Y5 through Y22 will be reset (off ) in the image 14 register and on the corresponding output module(s). A B C D 230 240
Y aaa aaa SETI
250-1 260
230
Y aaa aaa RSTI
240
250-1 260
Outputs
DS HPP
Y
0–177
0–477
0–777
0–1777
Used Used
DirectSOFT
X1
Handheld Programmer Keystrokes
Y2
$
Y5
B
STR
SETI
ENT
1
X SET
SHFT
I
C
8
F
2
ENT
5
DirectSOFT
Handheld Programmer Keystrokes
X1
Y5
Y22
RSTI
$
B
STR
S RST
5–38
DL205 User Manual, 4th Edition, Rev. A
1
SHFT
I
ENT
F
8
C
5
C
2
2
ENT
Page 261
Chapter 5: Standard RLL Instructions - Immediate
Load Immediate (LDI)
230 240 250-1 260
1 V aaa 2 3 Operand Data Type DL260 Range 4 aaaaa 5 In the following example, when C0 is on, the binary pattern of X0–X17 will be loaded into the accumulator using the Load Immediate instruction. The Out Immediate instruction could be used to copy the 16 bits in the accumulator to output points, such as Y40–Y57. This 6 technique is useful to quickly copy an input pattern to output points (without waiting for a full CPU scan to occur). 7 8 9 10 11 12 13 14 A B C D The Load Immediate instruction loads a 16-bit V-memory value into the accumulator. The valid address range includes all input point addresses on the local base. The value reflects the current status of the input points at the time the instruction is executed. This instruction may be used instead of the LDIF instruction which requires you to specify the number of input points.
Inputs V-memory
DS HPP
Used Used
DirectSOFT C0
V
Location
LDI
Load the inputs from X0 to X17 into the accumulator, immediately
40400–40477
X17 X16 X15 X14 X13 X12 X11 X10
V40400
V40400
LDI
X7
X6
X5
X4
X3
X2
X1
X0
ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON
Unused accumulator bits are set to zero
Acc.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
8
7 6 5
4 3
2
1
0
0
0
1 0
1
1 0
1
0
0
0 0
0
0
0
0 0
0
0
0
0 0
0
1
0
1
1 0
1
0
1
0
OUTI
V40502
Output the value in the accumulator to output points Y40 to Y57
Location
Y57 Y56 Y55 Y54 Y53 Y52 Y51 Y50 Y47 Y46 Y45 Y44 Y43 Y42 Y41 Y40 ON OFF ON ON OFF ON OFF OFF ON OFF ON ON OFF ON OFF ON
V40502
Handheld Programmer Keystrokes $
SHFT
C
SHFT
L ANDST
D
I
GX OUT
SHFT
I
STR
3
8
A
2
0
ENT
E
A
NEXT
E
E
0
4
8
A
4
A
F
0
A
0
4
A
5
0
C
0
2
ENT ENT
DL205 User Manual, 4th Edition, Rev. A
5–39
Page 262
Chapter 5: Standard RLL Instructions - Immediate
1
2
3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Load Immediate Formatted (LDIF) 230 240 250-1 260
The Load Immediate Formatted instruction loads a 1–32 bit binary value into the accumulator. The value reflects the current status of the input module(s) at the time the instruction is executed. Accumulator bits that are not used by the instruction are set to zero. Operand Data Type
LDIF
K bbb
X aaa
DL260 Range
Intputs Constant
X K aaa bbb
0–1777 –
– 1–32
In the following example, when C0 is on, the binary pattern of X10–X17 will be loaded into the accumulator using the Load Immediate Formatted instruction. The Out Immediate Formatted instruction could be used to copy the specified number of bits in the accumulator to the specified outputs on the output module, such as Y30–Y37. This technique is useful to quickly copy an input pattern to outputs (without waiting for the CPU scan).
DS HPP
Used Used
DirectSOFT C0
5–40
LDIF
X10 K8
Load the value of 8 consecutive locations into the accumulator starting with X10
Constant K8
X17 X16 X15 X14 X13 X12 X11 X10 ON OFF ON ON OFF ON OFF ON
Unused accumulator bits are set to zero 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
8
7 6 5
4 3
2
1
0
0
0
1 0
1
1 0
1
Acc.
OUTIF
Location X10
0
0
0 0
0
0
0
0 0
0
0
0
0 0
0
0
0
0
0 0
0
0
1
0
Y30 K8
Copy the value of the lower 8 bits of the accumulator to Y30 - Y37
Location
Constant
Y37 Y36 Y35 Y34 Y33 Y32 Y31 Y30
Y30
K8
ON OFF ON ON OFF ON OFF ON
Handheld Programmer Keystrokes $ STR
SHFT
C I
SHFT
L ANDST
D
GX OUT
SHFT
I
A
ENT
F 8
3 F 8
0
2
B D
5
A 1
5 A 3
DL205 User Manual, 4th Edition, Rev. A
I 8
0 I
0
8
ENT
ENT