Lecture video
Video unavailable here? Watch on YouTube. Captions and playback speed are available in the player.
Study Count Products Without Counting Them Twice | PLC 04. Use the accompanying model, numerical example and practical task to connect the topic to a measurable engineering result. Notes are original supplemental material, not a transcript.
Learning Objectives
- Explain the role of timers, edges and product counting in the engineering system.
- Calculate the worked quantity with consistent units.
- Design a measurement that can reveal an implementation failure.
Study guide
Original companion notes. These notes support the topic of this lesson. They are not a transcript or a claim about the exact contents, hardware settings or examples in the video.
Lesson focus: Count Products Without Counting Them Twice | PLC 04
Define the input, measured output, units and pass/fail condition before running the experiment.
Timers, edges and product counting
A count should represent a physical event, not the number of PLC scans during which a sensor remains high. Detect a rising edge and define how closely spaced valid events may occur. A timer measures elapsed duration under a stated enable/reset behavior.
Model, units and assumptions
Input is a Boolean sampled signal. Pulses shorter than the acquisition interval may be missed; mechanical or optical chatter can create several edges unless the signal is conditioned appropriately.
Worked engineering example
A product blocks a sensor for 120 ms while a PLC scans every 10 ms. Counting high scans could produce about 12 counts for one product; counting one rising edge produces one, provided the pulse is captured.
Practical task and evidence
Apply the following procedure to the topic of this lesson: Count Products Without Counting Them Twice | PLC 04.
- Simulate one long pulse, two distinct pulses and a bouncing transition.
- Record scan interval and the shortest valid pulse width.
- Use hardware counters or suitable input capture when normal scanning is insufficient.
Submit: a diagram or interface table, a short timestamped dataset, the calculation with units, and a paragraph explaining the largest observed limitation.
Check your understanding
Question. A pulse stays high for five scans. How many events does a correct rising-edge counter add?
Show worked answer
One, assuming a previous low state and no intervening falling edge.
Extension. Change one assumption in the model and explain which measurement would reveal that it no longer holds.
Summary
Suggested Reading & Resources
- ReadingCODESYS Structured Text referenceOpen ↗
Primary documentation or original technical reference; check the version used in your lab.