Section 4

Section 4
11
11
Example Program
Step 6:
Using the Box
Browser
You are now ready for the output element on this rung. Move the cursor to the end of
the rung to position where you want the element placed. Placing data in memory is a
two step operation. First, load the data in the CPUs accumulator and then output it
into memory. To accomplish this, two output elements will be placed on this rung.
Start by entering the box instruction Load Accumulator that will load data into the
accumulator. Once the cursor is positioned, click on the Box icon of the Tool
Palette.
Move the cursor
to the end of the
rung to position
the output
element..
..then select the
Box icon from
the tool palette
Step 7:
Scrolling the Box
Class Window
The box instruction to use for a DL105/DL205/DL405 is LD. This is found in the
Accumulator class of the box instruction set shown in the Box Setup of the
Instruction Browser that appears when you click on the Display Box Setup icon of
the tool palette. With Accumulator/Stack and LD selected, click on OK.
Use the Box Dialog to
select the instruction
Select the class in which
you find the instruction
Select OK when finished
with your selection
LD instruction
12
Example Program
Step 8:
Now you see an input window that is very similar to the one used for entering the SP0
relay. It is waiting for you to type in the number to load in the Accumulator (recall from
Entering a Preset
in the Accumulator the program that you are using this first rung to enter the preset for the timer).
Type in a
number here
In this case use the number 10 as the preset. You will enter K10 (where the K means
constant). Again the green/red indicator inside the box will prompt you on whether
or not you have made a valid entry. It glows green if it is correct. Click on (3) when
you have typed in K10 and you “have the green light”.
Click here when
you have finished
making your entry.
13
13
Example Program
Step 9:
Connecting
Elements in
Parallel
You are now ready to add a second box for this rung. It is going to be connected in
parallel,therefore, you will need to add a vertical connecting line. With the highlight
on the first box, hold down the control key and then press the down arrow (CTRL +
DOWN ARROW). This draws the connecting line you need. You could have also
performed the same thing from the upper menu bar by selecting: Edit/Wire/Down.
However, the arrow keys are faster.
Make sure the cursor is on the top element
before starting your vertical line.
Use CRL+Arrow
Down keys to add
a vertical line.
With the cursor at the end of the line that you have created, select the Box icon from
Step 10:
Inserting an Output the tool palette again. This time, choose the OUT box from the Box Tab of the
Instruction Browser. Select OK when you have highlighted the OUT function.
Box
14
Example Program
Step 11:
Entering the
Address to Hold
the Preset
Now you need to enter the address into which you are outputting the accumulator
data. Use V2000 in this example (V means “variable” memory).
When you have entered the V2000, click on the check mark (3). The new OUT
function block should now be in place as shown below.
15
15
Example Program
Step 12:
Enabling the
Documentation
Options
You could stop with this particular rung at this point and go onto the next rung of our
program. But in this example the idea is to make the program a little clearer to
anyone who may look at it later. To accomplish this, you are now going to learn how to
enter comments and nicknames for the program. Start by clicking on View from the
menu bar at the top. Then select Options. An options menu appears (see below).
Make sure nicknames and comments have been checked to ensure they will be
displayed on the screen once entered. Select the boxes next to Nicknames and
Comments to enable these options. Select OK when finished.
Step 13:
Entering a
Comment
First insert a comment above the rung. To do this, you can pull down the menu from
Tools, then select Comment Editor (Hotkey=CTRL + K). Either of these methods
will display the Edit Comments dialog box shown below.
16
Example Program
Now type in the comment you want and click on OK.
As a result, you end up with the comment shown above the rung like this:
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement