Previous PageNext Page

TIMERS

TP - Pulse Timer
The TP (pulse timer) is a programmable one-shot timer with a variable turn-on time. When the input (IN) input is true, the timer begins timing and the output (Q) is energized. When the elapsed time (ET) is equal to the preset time (PT), the output (Q) de-energizes (goes false). When the input (IN) goes from true to false, the timer is only reset if the elapsed time (ET) is equal to the preset time (PT). If they are not equal, the reset will not occur until they are equal (and IN must still be false).
  1. We will now add the TP to our previously created ladder diagram.
  2. Place EZ LADDER® in the Edit mode (if in the Monitor mode).
  3. Using the Insert Function drop down menu on the tool bar, select TP or use the TP button on the tool bar.
  4. Place the cursor on Rung 5 near the center of the ladder diagram workspace and left-click to place the object. The Function Block properties dialog box will appear. Keep the name TP1 and leave the description blank (The name field allows you to set any name for the function while the description allows you to set a text description of what the function is used for). Click OK. The TP1 is now placed on rung 5.
  5. Select the DIRECT CONTACT button from the tool bar.
  6. Place the cursor on Rung 5 near the left power rail and left-click to place the contact. The Contact properties dialog box will appear. Using the drop down menu in the dialog box, selct GPI2 and click OK. This finishes the placement of the contact that is tied directly to hardware input GPI2 (also named GPI2).
  7. Select the DIRECT COIL button from the tool bar.
  8. Place the cursor on Rung 5 near the right power rail and left-click to place the coil. The Coil properties dialog box will appear. Using the drop down menu in the dialog box, selct GPO2 and click OK. This finishes the placement of the contact that is tied directly to hardware output GPO2 (also named GPO2).
  9. Select the HORIZONTAL LINK tool.
  10. Draw a link from the right side of the GPI2 contact to the IN of TP1.
  11. Draw a link from the Q output of TP1 to the left side of the GPO2 coil.
  12. We now need to insert variables to give the TP1 timer setpoints. Select the INST VARS button from the tool bar.
  13. Place the cursor on Rung 6 just left of the PT (preset time) input on TP1. Left-click to insert the variable. The Variables dialog box will appear (the only tab available will be the TIMER tab) since this is connecting to a timer.
  14. Select the already existing variable named PreTim1 from the list and then click OK. This sets the variable connected to the timer's preset time to 5 seconds.
  15. With the INST VARS button still selected, place the cursor on Rung 6 just right of the ET (elapsed time) output on TP1. Left-click to insert the variable. The Variables dialog box will appear (the only tab available will be the TIMER tab) since this is connecting to a timer.
  16. Click the ADD button to add a new timer variable. The Add timer dialog box will appear. Type ElTim3 for the Name and leave the time blocks empty. Click OK. This sets the variable connected to the timers elapsed time to this variable (which can be used to view the current timer value when running the program on the target).
  17. Save the ladder diagram from the File menu and selecting SAVE. It is a good idea to periodically save your ladder diagram when developing it.
  18. Compile the target using the COMPILE button from the tool bar. Ensure that the compile is successful and there are no errors. If there are errors they must be corrected. Your ladder diagram should look similar to this:


  19. We are now ready to run the program on the target. Switch to the Monitor mode by clicking the MON button from the tool bar.
  20. Connect to the target, by selecting the CONNECT button from the tool bar. A dialog box will appear stating the "builds" of the programs are different (because you have recompiled the program again). Click OK to continue.
  21. Download the ladder diagram to the target by selecting the DOWNLOAD button from the tool bar. If successful, the ladder diagram is now operating on the target. It should look similar to:


  22. Close the switch that is connected to Input 2 on the Development Board. GPI2 turns red indicating power flow and GPO2 turns red indicating power flow.
  23. Open the switch that is connected to Input 2 on the Development Board and the timer begins timing. When the elapsed Timer reaches the preset time of 5 seconds, the output GPO2 turns blue indicating no power flow (and Output 2 on the Development Board is off).

You have completed the TP exercise.

Note: The TON and TOF timer circuits are still functional in addtion to the TP timer circuit you just created.

  Previous PageNext Page