The text of a manual · part 4 of 11
DL305 Handheld Programmer, pages 31 to 40
Pages 31 to 40 of 107
The original document is the PDF (2.6 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 Koyo D3-HP
Page 31
2--10
Entering RLL Programs
Entering RLL Programs
Entering RLL Programs
Joining Series Branches in Parallel
Quite often it is necessary to join several groups of series elements in parallel. The OR STR instruction allows you to do this quite easily. The following example shows a simple network consisting of series elements joined in parallel. 001
002
003
004
Page 32
2--11
Entering RLL Programs
Enter the first contact STR
SHF
1
ENT
Data Display before ENT is pressed
001 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
Enter the second contact AND
SHF
2
ENT
002 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Entering RLL Programs
0 AND 1 OR 2 STR 3 NOT
Enter the third contact SHF
3
ENT
003 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Enter the fourth contact AND
SHF
4
ENT
004 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Join the branches OR
STR
ENT ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Entering RLL Programs
STR
Page 33
2--12
Entering RLL Programs
The AND STR instruction joins one or more branches in series. The following Joining Parallel Branches in Series example shows a simple network with parallel and series branches. 001
002
Entering RLL Programs
003
Enter the first contact STR
SHF
1
ENT
Data Display before ENT is pressed
001 ADDRESS/DATA ON/OFF
RUN BATT
Entering RLL Programs
PWR CPU
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
Enter the second contact STR
SHF
2
ENT
002 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Enter the third contact OR
SHF
3
ENT
003 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Join the elements AND
STR
ENT ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Page 34
2--13
Entering RLL Programs Combination Networks
You can combine the various types of series and parallel branches to solve most any application problem. It is doubtful that you will ever exceed them, but there are limits when you build complex networks. This is because the DL305 CPUs use a “stack” to evaluate the boolean elements. If the stack exceeds eight levels, an error code E03 will be displayed on the Handheld when the CPU is switched to Run mode. (See the DL305 User Manual for additional information.) The following example shows a simple combination network. 000
À
Á
003
 004
006
Ä
À. Start the network STR
SHF
0
ENT
050 Å OUT
à 005
Entering RLL Programs
001
002
Data Display before ENT is pressed
ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
OR
SHF
1
ENT
001 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
Á. Enter branch 2. STR
SHF
2
ENT
002 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Entering RLL Programs
000
Page 35
2--14
Entering RLL Programs
000
Entering RLL Programs
001
À
002
Á
003
 004
006
Ä
050 Å OUT
à 005
Â. Start branch 3, add join with branch 2 STR
SHF
3
003
ENT
ADDRESS/DATA ON/OFF
RUN BATT
Entering RLL Programs
PWR CPU
AND
NOT
SHF
4
ENT
004 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
OR
STR
ENT ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
Ã. Add branch 4 AND
SHF
5
ENT
005
ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Page 36
Entering RLL Programs
2--15
Ä. Add branch 5, join with branches 1--4 SHF
6
ENT
006 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
AND
STR
ENT ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
Entering RLL Programs
NOT
Entering RLL Programs
OR
Å. Add branch 6 OUT
SHF
5
0
ENT
050 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Page 37
2--16
Entering RLL Programs
Entering Timers and Counters
To enter a timer, you also have to enter a preset value. One important thing to remember is that with the DL305, the timers and counters share the same memory area. The range is from 600 -- 677, but if you use 600 as a timer, you cannot use it as a counter. 001
TMR
CT 600
Timer Number
K100
Entering RLL Programs
Timer Preset Enter the contact STR
SHF
1
001
ENT
ADDRESS/DATA ON/OFF
RUN BATT
Entering RLL Programs
PWR CPU
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
Enter the Timer TMR
SHF
6
0
0
600 ADDRESS/DATA
ENT
ON/OFF
RUN BATT PWR CPU
Enter the Timer preset SHF
1
2
3
.
. 1234
ADDRESS/DATA
4
ON/OFF
RUN BATT PWR CPU
NOTE: With timer preset values you must use a decimal point to enter a fourth digit. When the timer (or counter) reaches the preset value, a coil is turned on. You can use this coil as an contact in other parts of the program. See Page 2--5 for the keystrokes required to enter a timer or counter contact.
REV A
Page 38
2--17
Entering RLL Programs
Counters are very similar to timers, but they have enable / reset legs that allow you to reset the counter. The following example shows how to enter the additional input line. Notice that you enter both contacts before you complete the counter. 001
CNT
CT601
Counter Number
K50
002
Counter Preset
STR
SHF
1
Data Display before ENT is pressed
001
ENT
ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
Enter the enable / reset leg STR
SHF
2
002
ENT
ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Enter the counter CNT
SHF
6
0
1
601 ADDRESS/DATA
ENT
ON/OFF
RUN BATT PWR CPU
Enter the preset SHF
5
0
050
ENT
ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
REV A
Entering RLL Programs
0 AND 1 OR 2 STR 3 NOT
Entering RLL Programs
Enter the first contact
Page 39
2--18
Entering RLL Programs
Entering Master Control Relays
The Master Control Set (MCS) and Master Control Reset (MCR) instructions allow you to quickly enable (or disable) sections of the RLL program. This provides program control flexibility. (See the DL305 User Manual for more details.) The following example shows how the MCS and MCR instructions operate. 000
When contact 000 is on, logic under the first MCS will be executed.
MCS
050 OUT
001
Entering RLL Programs
002
MCR
MCS
When contact 002 is on, logic under the second MCS will be 003 executed.
MCR
Entering RLL Programs
010
The MCR instructions note the end of the Master Control area. (They will be entered in adjacent addresses since they are nested.)
Enter the contact STR
SHF
0
Data Display before ENT is pressed ENT
000 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
Enter the first MCS instruction MCS
ENT ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Enter the next contact STR
SHF
1
ENT
001 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Page 40
2--19
Entering RLL Programs
Enter the output OUT
SHF
5
Data Display before ENT is pressed 0
050
ENT
ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
0 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
Enter the next contact SHF
2
002
ENT
ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Entering RLL Programs
STR
Enter the second MCS instruction ENT ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Enter the first MCR instruction MCR
ENT ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Enter the second MCR instruction MCR
ENT ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Entering RLL Programs
MCS