17 17 Example Program Step 14: Assigning a Nickname to the Preset Output If you decide to assign a nickname to V2000, you will need to document that this address will hold the preset for the timeout counter CT0 . Use a nickname that describes the function. Move the cursor to highlight the OUT box for the V2000. Select Tools from the upper menu bar. Next select the Documentation Editor or press CTRL + D. The dialog box shown below will appear. It will have V2000 in the box labeled Element. Immediately to the right is the Nickname Box. Type in the nickname, in this case use the name CT0 Preset. 18 Example Program After typing in the nickname information, Close the Documentation Editor when you are finished. Click on Close when finished. The nickname will appear inside the OUT box above V2000. You are now ready to create the second rung of ladder logic. 19 19 Example Program Step 15: Adding an Internal Relay to Start the Timer In this next rung youwill start a timer, have it timeout at a certain preset value, and then reset itself. Choose to use C0 as the start relay; and of course, T0 is the timer “done” bit for the TMR T0 timer. Insert the “start relay” C0 first. Use a shortcut this time to create the normally open contact on the rung. You may recall on the first rung, the normally open contact icon was selected on the tool palette in order to create the contact. This time, move the cursor to the point where the contact is to be placed and press the F2 key. This opens the input box shown below and you can fill in the information as before. The shortcut keys are much faster than the icon selection method as you become more familiar with DirectSOFT. Move the cursor to the point of insertion. Use F2 to bring up the element dialog box. 20 Example Program Step 16: Assigning a Nickname to the Start Contact Next, document that C0 is the “start switch”. You could pull down the Documentation Editor from Tools on the horizontal menu bar to enter this information as a nickname. However, for learning purposes, use the hot key equivalent–CTRL + D. This will bring up the Documentation Editor without having to use the pull-down sub-menu of Tools. If your cursor was on C0 when you used the CTRL + D combination, the browser should have the C0 in the Element column. Type Start Switch in the Nickname column. Close the Documentation Editor, returning to the rung. The nickname should be above the element C0. 21 21 Example Program Step 17: Next, move the cursor further to the right on the rung to the point where you want to Adding a Normally place the normally closed contact for the timer “done” bit (T0). Use shortcut key F3 to bring up the dialog box for a normally closed contact. Type in T0. Finish by selecting Closed Contact the check mark. Bring up the Documentation Editor again by using the CTRL + D combination. Enter Ten Second Timer in the Nickname column. Close the Editor when finished. Step 18: Adding a Nickname to the Normally Closed Contact 22 Example Program After the Documentation Editor closes, you will return to the rung where the words Ten Second Timer will be above the normally closed T0 timeout relay. Step 19: Move the cursor to the end of the rung to enter the timer TMR T0. Since a timer is a Inserting the Timer box command, you can use the shortcut key F7 to bring up the box instruction dialog of the Instruction Browser. Once you have opened the dialog box shown below, Instruction move the cursor in the Box Class window to Timer/Counter/SR , move the cursor in the Boxes window to TMR, and click on OK. 23 23 Example Program The element box shown below will appear. This is the element input window for the timer. The first thing to do is allocate a particular timer. This example uses internal timer TMR T0, therefore type in T0. The indicator light of the box should turn green to tell you this is a valid entry. Notice also the nickname assigned earlier to the timeout relay T0 appears above the first entry window. A second window also requires you fill in a preset value for the timer. Use the Tab Key or click with the mouse to move to the second field. The preset must be entered in tenths of a second. Therefore, K100 would be one hundred tenths of a second (100/10), or 10 seconds. When you type in T0, the nickname is automatically added. Enter 10ths of a second Click on the check mark to accept your entries. DirectSoft returns you to the rung of ladder logic for further programming.
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project