The text of a manual · part 3 of 11
DL305 Handheld Programmer, pages 21 to 30
Pages 21 to 30 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 21
Getting Started
Before you enter a new program, you should always clear the CPU memory. Only a few keystrokes are required. Use these keystrokes CLR
SHF
3
4
CLR
8
ADDRESS/DATA
DEL
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
Press NXT to clear memory or Press CLR to abort the operation NXT
0000 .... ADDRESS/DATA
ON/OFF
RUN BATT PWR CPU
You’ve got the Basics!
Now that you understand how to use the display and how to perform some basic CPU operations, you’re ready to enter a program. Chapter 2 provides the keystrokes for entering many of the instructions you’ll use in any type of program. If you plan on using RLL PLUS programs, you’ll also want to look at Chapter 3 for information on the the extra instructions for RLL PLUS. Also, with RLL PLUS, some of the basic instructions, like timers and counters, are used differently.
Getting Started
Clearing an Existing Program
1--15
Page 22
Entering RLL Programs In This Chapter. . . ., Entering Simple Ladder Programs, Checking for Program Errors
12
Page 23
2--2
Entering RLL Programs
Entering Simple Ladder Programs Purpose of the Examples
Entering RLL Programs
Entering RLL Programs
Handheld Key Sequences The Basics
This section includes many examples that are intended to help you become familiar with the keystrokes required to enter the most basic DL305 instructions. Once you are familiar with the basic keystrokes, you should use the DL305 User Manual as a reference for the remaining instructions. The Handheld buffers all keystrokes until you press the ENT key. Then, it automatically checks the instruction to make sure that is has been entered correctly. If the instruction is entered incorrectly an error message will be displayed. See Chapter 6 for a complete listing of error messages. There are a few basic instructions that you must become familiar with to enter programs with the Handheld. S STR -- Stores a normally open element and indicates the beginning of a rung or network. S AND -- Joins one element (such as a contact) in series with another element or group of elements. S AND STR -- Joins a group of elements in series with another group of elements. S OR -- Joins a one element in parallel with a previous element or group of elements. S ORSTR -- Joins parallel branches (each branch must begin with a STR instruction) S OUT -- Each rung must have at least one output (Y, C, or box instruction) S NOT -- used with other instructions to utilize normally closed elements. S All programs must contain an END statement (automatically provided). The following diagram shows a typical network and how each of these elements are used. 000
STR
STR
STR
001
ORSTR
AND 004
050
Output
OUT 002 AND 003
005
ANDSTR
OR END Statement END
Page 24
2--3
Entering RLL Programs Starting at Address 0
If you’re entering a complete program, you should always start at Address 0. The following example shows the keystrokes required to start at address 0000. (The remaining examples will not show this step, but it is required.) Start at address 0 SHF
NXT
Address Display
0000 .... 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
Entering RLL Programs
Once you’re at address 0, you can start entering a program. After you start entering the program, the Handheld automatically increments to the next address after you enter an instruction. You can toggle from the address display to the data display by pressing the NXT key. You can toggle from the data display to the address display by pressing the CLR key. For example, if you start at address 0000 and press NXT, the display changes and shows the instruction type located at address 0000. The following example shows what the display would look like. Start at address 0, change to data display instead of address display
End ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Entering an END Statement
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
The example keystrokes shown throughout this chapter will indicate which display method is being used. This will make the examples easier to follow. If you prefer a different display you now have the means to change it. All DL305 programs must have an END statement as the last statement in the program. Whenever you clear the CPU memory, the CPU assumes that all memory locations contain an END statement. This means that you do not have to enter an END statement. Just enter your program starting at address 0. You should be aware that if an END statement precedes your ladder logic, the program will not be executed.
Entering RLL Programs
NXT
Page 25
2--4
Entering RLL Programs
Entering Simple Rungs
You use the STR instruction to start rungs that contain both contacts and coils. The following example shows how to enter a single contact and a single output coil. Remember, with the DL305 CPUs, you do not have to enter an END statement with the Handheld Programmer. In the following example, notice that when you enter the output and move to the next address, the END statement is already there. 001
050 OUT
Entering RLL Programs
END
Enter the contact STR
SHF
1
Data display before ENT is pressed
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 MCS 1 MCR 2 SET 3 RST
4 ADR 5 SHF 6 DATA 7 REG
Enter the output OUT
SHF
5
0
ENT
050 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Check the next address NXT
END Statement
End ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
0 AND 1 OR 2 STR 3 NOT
4 OUT 5 TMR 6 CNT 7 SR
The example shows an input contact and an output coil. Control relays are entered exactly the same as the I/O points.
Page 26
2--5
Entering RLL Programs Entering Normally Closed Elements
Normally closed elements are entered by using the STR and NOT instructions. The following example shows a simple rung with a normally closed contact. 001
050 OUT
Enter the contact STR
NOT
SHF
Data Display before ENT is pressed 1
ENT
001 ADDRESS/DATA RUN BATT PWR CPU
Enter the output OUT
SHF
5
0
ENT
050 ADDRESS/DATA ON/OFF
RUN BATT
Entering Timer/Counter Contacts
T600
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
050 OUT
Enter the contact STR
TMR
SHF
0
0
ENT
Data Display before ENT is pressed 6
0
600 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Enter the output OUT
SHF
5
0
ENT
050 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
Entering RLL Programs
PWR CPU
4 OUT 5 TMR 6 CNT 7 SR
Entering RLL Programs
ON/OFF
0 AND 1 OR 2 STR 3 NOT
Page 27
2--6
Entering RLL Programs You may also need to enter timer and counter contacts or relational contacts based on counter values. These types of contacts are entered slightly differently than normal input contacts. The following example shows the keystrokes.
Entering RLL Programs
CT600
050
Counter Contact
OUT
CT600 K20
CT600 R400
=
=
Compared to a constant
Compared to register value
To enter a Timer/Counter contact STR
CNT
0
ENT
SHF
6
0
Data Display before ENT is pressed
600 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
To enter a Timer/Counter comparative contact with ... STR
SHF
6
0
0
600
ADDRESS/DATA
ENT
ON/OFF
RUN BATT PWR CPU a constant value SHF
2
0
020
ENT
ADDRESS/DATA ON/OFF
PWR CPU or a data register R
4
0
RUN BATT
0
ENT r400 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
REV A
Page 28
2--7
Entering RLL Programs Entering Series Elements
You must program the first element in a rung with a STR instruction, since it is the beginning of the network. The rung can contain more than one element joined together in series by AND instruction(s). The following example shows how to enter two series contacts and a single output coil. 001
002
050 OUT
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
Enter the second contact AND
SHF
2
002
ENT
ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Enter the output OUT
SHF
5
0
ENT
050 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Entering RLL Programs
0 AND 1 OR 2 STR 3 NOT
Entering RLL Programs
Enter the first contact
Page 29
2--8
Entering RLL Programs
Entering Parallel Elements
You must program each element with a STR instruction. The elements are joined in parallel by OR instruction(s). The following example shows how to enter two parallel contacts and a single output coil. 001
050 OUT
Entering RLL Programs
Entering RLL Programs
002
Page 30
2--9
Entering RLL Programs
Enter the first contact STR
SHF
1
Data Display before ENT is pressed
001
ENT
ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
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 OR
SHF
2
002
ENT
ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Enter the output OUT
SHF
5
0
ENT
050 ADDRESS/DATA ON/OFF
RUN BATT PWR CPU
Entering RLL Programs
4 OUT 5 TMR 6 CNT 7 SR
Entering RLL Programs
0 AND 1 OR 2 STR 3 NOT