ExamRobotic

  Open the simulator

Worksheet: PLC timers and counters

Name:Class:Date:

Material: the free PLC timer and counter simulator at examrobotic.com (examrobotic.com/en/tools/plc-timer-counter-simulator). Time: about 40 minutes.

Aim: tell TON, TOF, TP and TONR apart by their timing diagrams, understand that a counter counts edges and choose the right block for each application.

1. Timers

  1. TON with PT = 3 s. Hold IN for 2 s and let go. Does Q turn on? What happens to ET when you let go?
  2. TON with PT = 3 s. Hold IN for 6 s. At what second does Q turn on, and when does it turn off?
  3. TOF with PT = 3 s. Give IN a short tap. How long is Q on?
  4. TP with PT = 3 s. Give IN a very short tap, then hold IN for 8 s. How long does Q last each time?
  5. TONR with PT = 5 s. Hold IN for 2 s, let go, and repeat twice more. When does Q turn on? What is needed to start again?

2. Draw the timing diagram

Input IN is 1 from 0 to 2 s and from 4 to 10 s. Draw Q for each block with PT = 3 s. Then check it in the simulator.

BlockQ (from 0 to 14 s)
TON 
TOF 
TP 

3. Counters

  1. CTU with PV = 5. Press CU five times. On which press does Q turn on? If you hold CU down for a long time, how much does CV go up?
  2. CTD with PV = 4. Before touching anything, what is Q? Why? Press LD and count until Q turns on.

4. Which block would you use?

  1. A fan must keep running for 2 minutes after the motor it cools stops.
  2. A part only counts as present if the sensor sees it for at least 0.5 s without a break.
  3. A solenoid valve must blow air for 300 ms every time a part arrives.
  4. Flag pump maintenance every 500 running hours.
  5. Close a box once 12 parts have gone in.

Answers (for the teacher)

  1. No. ET rises to 2 s and goes back to 0 when IN is released.
  2. Q turns on at 3 s and off when IN is released, at 6 s.
  3. Q lasts as long as the tap plus 3 s.
  4. 3 s both times: the pulse does not depend on how long IN lasts.
  5. At 5 s accumulated, that is, during the third press (after 1 s of it). Only R resets ET.

Timing diagram: TON: Q is 1 from 7 to 10 s (the first 2 s pulse never reaches PT). TOF: Q is 1 from 0 to 13 s (the gap from 2 to 4 s is shorter than PT, and after 10 s it stays on 3 s more). TP: Q is 1 from 0 to 3 s and from 4 to 7 s.

  1. On the fifth. It only goes up by 1: a counter counts edges, not time.
  2. Q = 1, because CV is 0 at start-up. After LD, CV = 4 and 4 presses of CD are needed.
  3. TOF.
  4. TON (filter).
  5. TP.
  6. TONR (or an hour counter built with a TONR).
  7. CTU with PV = 12 (or a CTD loaded with 12).