The text of a manual · part 38 of 42
DL305 User Manual: Chapter 12: RLLPLUS Instruction Set, pages 314 to 319
Pages 314 to 319 of 359, from DL305 User Manual
The original document is the PDF (4.9 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 D3-08TD2, AutomationDirect D3-16TD2, Konnect-It D3-08TD2, Koyo D3-08TD2, Konnect-It D3-16TD2 and Koyo D3-16TD2
Page 314
12--17
RLL PLUS Instruction Set Comparative Boolean Instructions
The And If Greater Than or Equal To instruction connects a normally open comparative counter contact in series with another contact. The contact will be on if the specified counter CT aaa ≥ B bbbb.
And Not If Greater Than Counter (AND NOT CNT) DL330P Only
The And Not If Greater Than instruction connects a normally closed comparative counter contact in series with another contact. The contact will be on if the specified counter CT aaa < B bbbb. D3--330 Range
B bbbb
CT aaa
B bbbb
D3--340 Range
D3--330P Range
B aaa bbbb aaa bbbb aaa
Counters
CT
----
----
----
----
600--677 bbbb ----
Data registers
R
----
----
----
----
----
400--577
Constant
K
----
----
----
----
----
0--9999
In the following Or If Greater Than or Equal To example, when input contact 007 is on and CT602 ≥ the value in R404 the contact will turn on and output 014 will energize. DirectSOFT Display 007
Handheld Programmer Keystrokes CT602
R404
014 OUT
STR AND R
SHF CNT 4
7 SHF 0
ENT 6 4
0 ENT
OUT
SHF
1
4
ENT
2
ENT
In the following Or Not If Greater Than example, when input contact 003 is on and CT602 < the constant value 4620 the contact will turn on and output 020 energize. DirectSOFT Display 003
Handheld Programmer Keystrokes CT602
K4620
020 OUT
STR AND SHF
SHF NOT 4
3 CNT 6
ENT SHF 2
6 0
OUT
SHF
2
0
ENT
0 ENT
DL305 User Manual, Rev. D
2
ENT
RLLPLUS Instructions
Operand Data Type
CT aaa
Instruction Set
And If Greater Than or Equal To Counter (AND CNT) DL330P Only
Page 315
12--18
RLL PLUS Instruction Set Timer, Counter, and Shift Register Instructions
RLLPLUS Instructions
Instruction Set
Timer, Counter, and Shift Register Instructions Timer (TMR) DL330P Only
The Timer instruction used in the DL330P CPU provides a single input timer with a 0.1 second increment (0--999.9 seconds) in the normal operating mode, or a 0.01 second increment (0--99.99 seconds) in the fast timer mode with relay 770 on. The timer will time up to the maximum value (999.9 or 99.99) as long as the input logic remains on, once the input logic turns off the timer will reset to 0. There is no timer bit associated with this timer. Comparative boolean instructions must be used to monitor the current value of this timer. Operand Data Type
Time
TMR
D3--330 Range
D3--340 Range aaa aaa aaa
----
----
600--677
T aaa
D3--330P Range
In the following Timer example when input contact 000 is on timer 600 will time up. When input contact 000 goes off the timer will reset to zero. The comparative instruction will monitor the current value of the timer and energize when the current value of the timer is greater than or equal to the constant K30. Handheld Programmer Keystrokes
DirectSOFT Display
000
T600
TMR K30
T600 014 OUT
STR TMR STR SHF
SHF SHF TMR 3
0 6 SHF 0
ENT 0 6 ENT
0 0
OUT
SHF
1
4
ENT
ENT 0
ENT
Timing Diagram
0
1
2
3
4
5
6
7
0
10
20
30
40
50
60
8 seconds
000
014 Current Value
DL305 User Manual, Rev. D
0
1/10 seconds
Page 316
12--19
RLL PLUS Instruction Set Timer, Counter, and Shift Register Instructions
The Counter instruction used in the DL330P CPU provides a single input counter with a counting range of 0--9999. The counter will count up to 9999 and stop. The Reset Counter instruction must be used to reset this counter. There is no counter bit associated with this counter, so comparative boolean instructions must be used to monitor the current value of this counter. Operand Data Type
D3--330 Range
D3--340 Range
D3--330P Range aaa aaa aaa
----
----
600--677
CNT
C aaa
In the following Counter example when input contact 000 transitions from off to on counter 600 will increment by one. When input contact 001 is on the Reset Counter instruction will reset the counter to 0. The comparative instruction will monitor the current value of the counter and energize when the current value of the counter ² the constant K2. DirectSOFT Display
Handheld Programmer Keystrokes
000
001
C600
STR CNT STR RST
SHF SHF SHF CNT
0 6 1 SHF
ENT 0 ENT 6
RST
STR SHF
CNT 2
SHF ENT
6
014
OUT
SHF
1
4
ENT
CNT
C600
C600
K2
0
ENT
0
0
ENT
0
2
ENT
OUT
0
1
2
3
4
5
6
7
8
0
014 Current Value
1
2
3
4
0
RST CT
DL305 User Manual, Rev. D
RLLPLUS Instructions
Counter
COUNT
Instruction Set
Counter (CNT) DL330P Only
Page 317
Instruction Set
12--20
RLL PLUS Instruction Set Timer, Counter, and Shift Register Instructions
Reset Counter (RST) DL330P Only
The Reset Counter instruction used in the DL330P CPU provides a reset for the counter instruction. One counter or a range of counters can be reset.
Operand Data Type
RLLPLUS Instructions
Counters
Optional memory range C aaa C bbb RST
D3--330 Range
D3--340 Range
D3--330P Range aaa bbbb aaa bbbb aaa bbbb
----
----
----
----
600--677
600--677
In the following Reset Counter example when input contact 001 is on the Reset Counter instruction will reset counter 600. DirectSOFT Display
000
001
Handheld Programmer Keystrokes CNT
C600
C600 RST
DL305 User Manual, Rev. D
STR CNT STR RST
SHF SHF SHF CNT
0 6 1 SHF
ENT 0 ENT 6
0
ENT
0
0
ENT
Page 318
12--21
RLL PLUS Instruction Set Timer, Counter, and Shift Register Instructions
The Shift Register instruction shifts data through a predefined number of control relays. There are 77 control relays which can be used for internal control relays or shift register bits. There is no limit to the number of shift registers which can be used in a program, however the total number of bits used cannot exceed 77. The Shift Register has three input contacts. S Data, determines the value (1 or 0) that will enter the register S Clock, shifts the bits one position on each low to high transition S Reset, resets the Shift Register to all zeros.
DATA
Instruction Set
Shift Register (SR) DL330P Only
SR From aaa
CLOCK To bbb RESET
RLLPLUS Instructions
With each off to on transition of the clock input, the bits which make up the shift register block are shifted by one bit position and the status of the data input is placed into the starting bit position of the shift register. The direction of the shift depends on the entry in the From and To fields. From 160 to 167 would define a shift right block of eight bits to be shifted from bit left to right. From 167 to 160 would define a shift left block of eight bits, but would shift from right to left. The maximum size of the shift register block is limited to 77 bits. There is no minimum block size. Operand Data Type
Shift Register Bits
D3--330 Range
D3--340 Range
D3--330P Range aaa bbbb aaa bbbb aaa bbbb
----
----
----
----
160--174 200--277
160--174 200--277
DL305 User Manual, Rev. D
Page 319
Instruction Set
12--22
RLL PLUS Instruction Set Timer, Counter, and Shift Register Instructions In the following example, when the clock input transitions from low to high the value in the Data input is placed in the first bit position of the shift register and the successive successive bits are shifted to the right. When the Reset input transitions from low to high the entire shift register is set to zeros. DirectSOFT Display 000
Data Input
001
SR From
160
To
167
Clock Input
002
RLLPLUS Instructions
Handheld Programmer Keystrokes
Reset Input
Inputs on Successive Scans Data
Clock
Reset
1
1
0
0
1
0
0
1
0
1
1
0
0
1
0
0
0
1
DL305 User Manual, Rev. D
STR STR STR SET SHF
SHF SHF SHF RST 1
0 1 2 SHF 6
6 ENT
0 determines the direction of the shift
Shift Register Bits 160
ENT ENT ENT 1 7
167
ENT