Section 3 Sec3
User Manual: Section 3 DirectSOFT Quick Start
Open the PDF directly: View PDF .
Page Count: 5
Download | |
Open PDF In Browser | View PDF |
6 Example Program Building an Example Program What You Will Learn The pages that follow will explain how to do the following: D create a project D use the tool palette to enter instructions and build a ladder program D use “hot keys” to work faster D enter nicknames and add comments D setup an internal timer D setup a self-resetting internal counter D cut and paste rungs of logic D save your program to disk D communicate with your PLC D load your program into PLC memory D monitor your program with the Data View NOTE: The following program is given only to illustrate how some of the key features of the software operate. This is not intended to teach you how to write ladder logic. Example Ladder Logic Example This example has four basic tasks: 1. Load a value into memory of your PLC that can be used as a preset for a timer. 2. Setup a self-resetting timer. 3. Use a counter to count the number of times the timer reaches the preset value and resets. 4. Use Comparative Boolean relays to turn ON an internal coil when the counter current value equals 5, and turn ON a second internal coil when the counter current value equals 6. The ladder logic shown below is the same program for the DL105/DL205/DL405 and DL305 families. As you work through the DirectSOFT screens to enter this program in the pages that follow, the DL105/DL205/DL405 will be shown. If you have a DL305 family PLC, substitute the proper elements and memory locations. For example instead of entering SP0, you would enter C374. SP0 DL105, DL205 or DL405 C374 LD K10 DL305 DOUT R400 OUT V2000 C0 T0 T0 CT0 TMR T0 K100 CNT CT0 V2000 CTA0 K6 = C160 T600 T600 CT601 TMR T600 K100 CNT CT601 R400 C374 SP0 CTA0 K5 = DSTR K10 C1 OUT C2 OUT END CT601 K5 = CT601 K6 = C161 OUT C162 OUT END 77 Example Program Step 1: Enter the Programming Mode When you click on the DirectSOFT icon from the DirectSOFT Windows Group, a screen similar to the one shown below appears. You will notice a programming icon in the upper left-hand corner. Click on this icon to enter your new project. Click here to start programming You should now see the New Project window. You can name your project using any Step 2: Start a New Project combination of 8 characters (no spaces). Use “EXAMPLE1” for this example. Move the selection bar to the PLC Family and CPU Type. For this example, use a PLC belonging to the DL105/DL205/DL405 families. Click on OK after you have made your Family and Type selections. If you have a DL305 type PLC, be sure and select it instead from the choices. Keep in mind the available mnemonics, processing rules and even the tool bar characteristics are tailored to the Family and Type selections that you make. New Project Window Type in a name for your project Select the PLC Family.. Select the CPU Type.. ..then click on OK 8 Example Program After clicking OK to enter your project name, PLC family and CPU type, you will see the skeleton ladder logic template. You are in the View Only Mode at this point. In this mode, the cursor is always hollow and all you can do is browse. View Only Mode (cursor is hollow) Step 3: Switch to the Edit Mode You will want to use the Edit Mode for entering programs. This is accomplished by holding down the control key and simultaneously pressing the letter E key (CTRL + E). You could also click Edit on the top menu bar and then selected Edit Mode. DirectSoft indicates the Edit Mode is active when the cursor becomes solid and a Tool Palette appears in the lower right portion of the screen. In order to facilitate clear printing reproduction in this manual, you will also at this time turn off the default 3-D Token for the ladder logic. You do this by clicking on View and then Options. This is followed by clicking on the box labeled 3-D Token. This removes the X in the box. To exit and record your selections, click on OK. Edit Mode (cursor is solid) Tool Bar Deselect this feature to turn off the 3-D ladder view look. 99 Example Program The Tool Palette Step 4: Using the Tool Palette to Enter the First Element The Tool Palette can be very helpful, especially in the beginning while learning to program in DirectSOFT. Later, you may prefer to use the faster Hot Keys instead of clicking on the tool buttons themselves. The Hot Keys are shown below each element symbol on the icon button. The expanded list is provided in the main DirectSOFT User Manual. The Tool Palette shown below may not be exactly like the one you have on your computer screen. The tool palette shown depends on which CPU your PLC is using. In this example, you will be using only the elements common to all CPUs, therefore this will not be a problem. Normally Open Contact Normally Closed Contact Normally Open Immediate Contact Normally Closed Immediate Contact Equal-To Contact Not-Equal-To Contact Greater-Than or Equal-To Contact Less Than Contact Display Contact Setup (Instruction Browser) Display Coil Setup (Instruction Browser) Display Box Setup (Instruction Browser) Element Browser Wire Connection to Output Wire Connection to Stage Use the Tool Palette to enter the first instruction of the program. First move the cursor to the desired location of the first element. A normally open contact needs to be placed in the selected position to load the preset on the first scan. To do this, click on the button that shows the normally open symbol. This will open a small input window for setting up the contact. Move cursor to where you want the instruction positioned. Click here to open input window for Normally Open Contact 10 Example Program Step 5: Using the SP0 Relay in Our Program. Use contact SP0 as the first element to load a preset into the PLC memory. SP0 is used because you only need this rung to execute once, i.e. the first scan. Notice the green/red indicator in the box. It will display the validation of each input. For example, if you typed the letter O instead of the digit 0, the indicator would turn red and stay red until you correct your mistake. Enter SP0 to have a contact that will close on the first scan only Notice the Error Indicator will glow green if you enter a valid contact Click on the check mark (3) in the upper part of the input box when you have finished typing in the element and have the green light. At that point, the instruction will be entered. Notice the yellow vertical bar that appears next to the rung. Since this is not a color manual, you see a light gray vertical bar in the screen example shown below. The yellow bar indicates you have entered an Instruction or instructions, but that you have not compiled the rung yet by selecting Accept from the Edit menu. Rungs that have already been accepted into compiled memory will have a green bar instead. Without being compiled, you will not see the icons for Save to Disk or Save to PLC enabled. This means in order to save your program anywhere you will have to Accept your editing first. For example, if you wanted to stop working with DirectSOFT right now, you would first want to accept all the edited rungs so that you could save the revised program to disk. The Save to Disk icon is not available because you have not accepted your editing yet Yellow color coded bar indicates the rung has not been accepted yet
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.2 Linearized : No Page Count : 5 Create Date : 1998:06:19 13:55:24 Producer : Acrobat Distiller 3.0 for WindowsEXIF Metadata provided by EXIF.tools