Course Code: BME054
Course: AKTU B.Tech 3rd Year, Semester V
Unit: Industrial Controllers
Branch: Mechanical Engineering
Unit IV Overview
Understand PLC hardware and scanning, choose suitable I/O, and develop clear ladder logic. Study contacts, coils, holding circuits and memory before applying timers, counters and structured program checking.
Topics Covered
| Syllabus area | Pages |
|---|---|
| PLC structure, types and cyclic operation | 2-5 |
| I/O, interfaces, selection and applications | 6-9 |
| Ladder contacts, coils and Boolean logic | 9-11 |
| Holding, memory and interlock logic | 11-13 |
| Timers, counters and combined logic | 13-16 |
| Programming method and answer checklist | 17 |
| Solved examples and applications | 17-20 |
| Exam questions with answers | 21-23 |
| Quick revision and glossary | 24-25 |
Learning Outcomes
-
1. Explain PLC structure, types and operation.
-
2. Distinguish scan time from system response.
-
3. Select compatible I/O and controller capacity.
-
4. Develop ladder logic with holding and memory.
-
5. Apply timers and edge-counting functions.
Included in These Notes
30 explained sections; 27 labelled diagrams and sketches; 10 realistic images; 20 solved calculations and cases; 24 short answers; 5 structured long answers; comparison tables and quick revision.
Study Approach
Understand. Separate physical signals, program data and output commands.
Compare. Identify hardware types and logical instruction behaviour.
Apply. Trace states, events, timings and reset conditions.
Core idea: a PLC repeatedly evaluates defined data and stored state. Clear tag meanings, correct interfaces and explicit timing/reset rules make its logic understandable.
1. Industrial controllers and the PLC concept
A programmable logic controller (PLC) is an industrial digital controller that reads field signals, executes a stored control program and updates commands to equipment. Its input/output interfaces and operating design suit industrial control tasks. A PLC is a controller, not the entire automation system.
Basic example. A package sensor supplies an input. The program checks whether the machine is enabled, then commands a conveyor contactor or valve through a suitable output interface. The motor or pneumatic supply provides the load energy; the PLC supplies information and a compatible command.
Why programmable? In relay-only control, changing the logic may require extensive changes to interconnections. In a PLC, much of the sequence is expressed in software. Field wiring, power interfaces, protective devices and the mechanical process still matter.
Scope of this unit. Learn hardware structure, controller types, scanning, I/O and selection before writing ladder programs. The same ladder contact may examine a sensor bit, a timer output or an internal memory bit. Its meaning comes from the addressed data and instruction.
2. Basic structure: CPU, memory and internal buses
The central processing unit (CPU) executes instructions and manages communication, diagnostics and data. The processor does not normally accept arbitrary field voltages at its logic pins; input modules condition field signals before the program uses them.
Memory stores the user program, configuration and operating data. Program storage differs from changing process values. Working values include input states, output commands, intermediate flags, timer data and counter data. The exact division into memory regions depends on the PLC family.
Internal buses or a backplane transfer data and power between compatible modules. A modular rack commonly includes a supply, CPU and several I/O modules. Expansion and remote stations require compatible communication and configuration rather than simply connecting any module physically.
Engineering interface. A programming computer is used to create, check, download and monitor the application. An HMI displays values and accepts operator requests. Neither is necessarily required to remain connected for an already commissioned PLC to execute its stored program.
3. Power supply, I/O modules and supporting equipment
A PLC power supply provides suitable operating power to controller electronics. Its input rating and output capacity must match the system. Field circuits may use a separate supply, and the presence of a PLC supply does not prove that every sensor and actuator receives compatible power.
Input modules receive on/off or measured signals and convert them into data. Output modules translate commands into suitable switching or analogue output signals. Isolation and filtering are module-specific; they do not make every terminal interchangeable or immune to all disturbances.
Supporting equipment includes terminal blocks, protective devices, contactors, drives, signal conditioners and communication devices. An output commanding a motor starter does not normally carry the motor main current. Read the load interface as a separate part of the system.
Status indication. Power, run, fault and channel LEDs assist diagnosis. A lit output LED commonly indicates the module command state; it does not independently prove that the load has power, the contactor has closed or the machine has moved.
4. Types of PLC: compact, modular and distributed
A compact or fixed PLC integrates the CPU and a defined set of I/O into one enclosure. It often suits a small machine. Some compact units accept expansion, so compact does not necessarily mean completely non-expandable.
A modular PLC allows a compatible choice of supply, CPU, I/O and communication modules. It offers flexibility for larger or specialised requirements but introduces configuration, space and cost considerations. Rack-based describes a common physical arrangement rather than a separate control principle.
Distributed I/O places interface stations near equipment and exchanges data with the controller over a network. It can reduce long field-wire runs, but network update times, diagnostic behaviour and failure responses become part of system performance.
Other classifications. Small, medium and large controllers are approximate capability groups, not universal I/O limits. Safety PLCs, motion-capable controllers and redundant systems address particular requirements. A standard PLC does not acquire those capabilities merely because a program contains a stop rung.
| Arrangement | Typical benefit | Main consideration |
|---|---|---|
| Compact | Simple small-machine package | Built-in I/O and expansion limits |
| Modular | Flexible compatible module choice | Configuration, rack space and cost |
| Distributed I/O | Interfaces close to field devices | Network and remote-station behaviour |
5. Working principle and process-image memory
A useful introductory model is sample inputs, execute program, update outputs, perform supporting tasks, repeat. This model explains why the PLC can respond repeatedly to changing conditions. It describes cyclic operation rather than a universal fixed order for every controller.
Process images are memory representations of input and output states used by cyclic logic. Ordinary instructions may use sampled input data instead of reading an electrical terminal at that instant. A changed field input can therefore wait until an appropriate input update becomes visible.
Program execution. The controller evaluates enabled tasks and instructions according to its defined execution model. Internal bits and output-image values can change during execution. Later instructions may see changes written by earlier instructions in the same execution.
Important qualification. Some controllers describe the cyclic boundary as output update followed by input update and program execution. Immediate I/O, interrupts, task scheduling and networked I/O can alter the simple model. State the model used in an examination answer rather than asserting one order for every PLC.
6. Scan cycle, scan time and watchdog supervision
The scan cycle is the repeating sequence of cyclic controller activities. Scan time is the duration of one such cycle under a stated definition. It includes more than the time needed to evaluate a single contact or rung.
Contributors. Input/output servicing, user-program execution, communication, diagnostics, background tasks and interrupts can contribute to measured cycle time. Program branches, instruction types and network activity can make the time vary. Average time and maximum observed time answer different questions.
Watchdog. A configured cycle-time monitor can detect execution that exceeds an allowed limit and invoke the controller-defined response. The limit is not a guarantee that a machine will complete a movement within that time; it supervises controller execution.
Exam calculation. For a declared non-overlapping model, add the stated input, logic, output and overhead times. Do not automatically add quantities that a problem says overlap. Timer presets, scan times and complete physical response times are distinct quantities.
7. Input-to-output response and short input pulses
A physical input change passes through sensor response, module filtering, data update, logic execution, output update and load response. Overall response time therefore includes more than the PLC program alone. Remote communication and actuator dynamics may add further delay.
Scan phase matters. A signal that changes just before sampling can be used sooner than one that changes just after sampling. For a simplified sample-execute-update cycle of duration T, an output may respond by the end of the current or following cycle, depending on when the input arrives.
Missed pulse. A pulse shorter than the interval between ordinary input samples can occur entirely between samples and be missed. Sampling is not guaranteed merely because the PLC scan is described as fast. Input filtering can also reject a short pulse.
Appropriate methods. Suitable high-speed counters, pulse-capture hardware or interrupt facilities can handle events beyond ordinary cyclic sampling when configured within their specifications. Faster code alone does not remove the limits of the sensor, input filter or interface.
8. I/O classification and symbolic addressing
Digital I/O represents discrete states such as presence, limit reached or command on/off. Analogue I/O represents a measured or commanded quantity over a range, such as pressure or speed demand. Numerical representation inside memory does not change the physical signal category.
Addressing. A physical point is associated with a channel and program address or tag. Common examples use I for input, Q or O for output and M for memory, but syntax differs by manufacturer. These notes use descriptive tags such as Start, Stop_OK and RunCmd.
Data types. A BOOL holds one logical state. Integer and real types hold numerical values; timer and counter blocks also contain state. A bit address and a word address are not interchangeable. Range, sign and scaling must be chosen deliberately.
I/O list. Before programming, record each device, signal type, normal condition, address/tag and function. Define whether a logical 1 means healthy, pressed, present or commanded. This prevents a normally-closed field switch from being confused with a negated software contact.
| Tag | Category | Defined meaning of 1 |
|---|---|---|
| Start | Digital input | Start button pressed |
| Stop_OK | Digital input | Normal stop circuit healthy |
| RunCmd | Internal BOOL | Run requested |
| MotorCmd | Digital output | Command to suitable starter interface |
9. Digital input modules and physical contact states
A digital input module interprets a compatible field signal as a binary state. Electrical voltage/current thresholds, common connections, polarity and filtering are specified by the module. A dry contact needs an appropriate field circuit; a sensor output must be compatible with its receiver.
Physical NO and NC. Normally open and normally closed describe a switch contact in its stated unactuated condition. For example, an NC stop switch can produce Stop_OK = 1 while healthy and 0 when pressed or when the defined circuit opens.
Software meaning. A non-negated ladder contact tests whether its bit is 1. A negated contact tests whether its bit is 0. Either instruction can examine a bit originating from an NO switch, NC switch or internal calculation. The symbol alone does not identify the field device.
Practical limits. Sourcing and sinking interfaces must form a compatible current path. Sensor supply, module type and reference/common matter. The conceptual diagrams here explain data flow, not terminal-by-terminal installation instructions.
10. Digital outputs: relay, transistor and triac
A relay output uses an electromechanical contact operated by the module. Suitable contacts can switch different specified load types, but ratings, wear, switching speed and electrical life matter. A relay output is not automatically rated for any available voltage or motor load.
A transistor output switches a compatible DC load electronically. It can suit faster repeated operation within its limits. Sinking/sourcing arrangement, leakage, short-circuit behaviour and load current must match the intended circuit.
A triac output is used for compatible AC switching. It has leakage, minimum-load and switching characteristics different from a relay contact. It is not a substitute for a DC transistor output. Choose by the actual module and load specifications.
Load interface. A PLC may command a contactor coil, driver input or valve coil through appropriate equipment. Inductive loads need suitable transient suppression. Output-state indication proves a command at most; downstream power and mechanical feedback require separate confirmation.
| Type | Typical load domain | Key limitation |
|---|---|---|
| Relay | Rated AC or DC contact loads | Contact wear and switching rate |
| Transistor | Compatible DC loads | Polarity, current and leakage |
| Triac | Compatible AC loads | Leakage and minimum load |
11. Analogue I/O, conversion and engineering-unit scaling
An analogue input converts a compatible voltage or current into a numerical representation. Common industrial signals include 0-10 V and 4-20 mA, but the selected channel must be configured for its actual signal. An analogue output performs the reverse command-interface role.
Scaling. For a stated linear range, engineering value = lower value + (raw – raw minimum) x engineering span / raw span. Specify endpoints and units. The meaning of raw counts, including underrange and fault codes, depends on the module.
Resolution and accuracy. A converter has finite increments. Under a defined n-bit ideal bin model, one increment is span/2^n. Instrument accuracy, noise, sensor error and calibration are separate issues; more bits alone do not guarantee a more accurate measurement.
Use in control. Convert to engineering units, check plausibility and use appropriate thresholds or hysteresis. A 4-20 mA live zero can help distinguish normal low measurement from certain abnormal currents, but diagnosis still depends on module and application behaviour.
12. Special-purpose I/O and communication interfaces
High-speed inputs and counters capture suitable pulses faster than ordinary cyclic logic can reliably sample. Encoder channels may use quadrature to determine direction. Frequency limits and input filtering remain hardware-dependent.
Special outputs include supported pulse-train or motion interfaces. They may command a drive rather than supplying motor current. Temperature modules, weighing modules and dedicated motion modules provide functions beyond a generic digital input.
Communication connects remote I/O, HMIs, drives and supervisory systems. A network transports data with its own update, latency and failure behaviour. A value displayed on an HMI can be older than the latest physical change.
Application distinction. High-speed capture, ordinary discrete control and analogue measurement solve different problems. Select the hardware function first, then confirm the CPU, task and network capabilities needed to use the data correctly.
| Requirement | Possible interface | Check |
|---|---|---|
| Rapid encoder pulses | High-speed counter | Frequency and input format |
| Continuous process value | Analogue input | Range and conversion |
| Remote station | Networked I/O | Update and failure response |
| Drive position command | Supported motion interface | Drive compatibility |
13. PLC selection: capacity, speed and environment
Begin with a functional specification: controlled process, input/output list, sequence, response requirements and environmental conditions. Choosing only by brand name or lowest purchase price can overlook the real interface and performance requirements.
Capacity. Count digital inputs, digital outputs, analogue channels and specialised channels separately. Include reasonable stated expansion. Check usable module slots, remote stations, program/data memory, communication ports and supply capacity.
Performance. Match scan/task behaviour, input filtering, pulse handling and analogue update rates to the process. Check the instructions and programming tools required. A fast average scan does not establish the worst-case system response.
Installation and support. Temperature, vibration, electrical noise, enclosure requirements, maintenance access, documentation, spare availability and lifecycle cost affect suitability. Required safety functions need an appropriate safety architecture; ordinary software interlocks alone are insufficient.
14. Applications, merits and limitations of PLC control
Applications include conveyors, packaging, assembly, material handling, fluid-power sequencing, pumping and machine interlocks. PLCs suit repeated logic and sequences with defined field interfaces. Unit V develops complete application sequences in more detail.
Merits. Programmable changes, modular expansion where supported, online monitoring, diagnostic data and reusable logic can reduce control-system complexity. Internal bits and software timers avoid a separate physical relay for every logical function.
Limitations. Up-front engineering, software errors, dependence on power and compatible interfaces, maintenance skills and communication faults must be considered. A PLC is not inherently ideal for every high-speed numerical or precision-motion task.
Sound comparison. Compare complete solutions under the same requirements. A PLC, a relay panel and a general computer have different strengths. Reliability comes from suitable hardware, clear logic, tested behaviour and maintenance rather than from the controller label alone.
| Control approach | Useful strength | Consideration |
|---|---|---|
| Relay panel | Simple direct discrete function | Changes can require rewiring |
| PLC | Industrial sequence and I/O integration | Engineering and compatible hardware |
| General computer | Rich computation and user interfaces | Industrial real-time I/O architecture |
15. Ladder diagram: rails, rungs and execution
A ladder diagram (LD) represents logical conditions and actions using horizontal rungs between vertical rails. Its appearance recalls relay circuits, but it is a programming representation. The rails indicate logical evaluation, not exposed power conductors.
Reading. In the simplified examples, examine conditions from left to right and execute rungs from top to bottom. A true path enables an output instruction. The precise language rules and task schedule belong to the chosen PLC environment.
Program versus wiring. A contact symbol reads data; a coil instruction writes a bit. The same stored bit can be examined on several rungs without installing several physical contacts. A physical output still needs suitable hardware.
Notation used here. Tags are symbolic, not vendor-specific absolute addresses. A plain contact passes logic when its bit is 1; a slashed contact passes when its bit is 0. Plain coils are non-latching assignments unless expressly shown as Set or Reset.
16. Contacts, coils and the logical truth table
A non-negated contact is true when its referenced BOOL is 1. A negated contact is true when that BOOL is 0. Calling these examine-true and examine-false contacts helps separate program logic from a field switch’s mechanical normal state.
A normal output coil writes the result of its rung condition to the addressed bit when executed: true writes 1, false writes 0. It may write an internal bit or output-image bit. An output terminal responds according to the controller’s I/O update behaviour.
Duplicate assignments. Two normal coils writing the same bit can create scan-order-dependent behaviour; in a simple sequential model, the later executed assignment can overwrite the earlier one. Prefer clear ownership of each command.
Unexecuted logic. A normal coil is not a complete specification of startup, fault or task-not-executed behaviour. Those cases require the controller configuration and program design. In all examples, the relevant rungs are assumed to execute each cycle.
| Referenced bit | Plain contact | Negated contact |
|---|---|---|
| 0 | False | True |
| 1 | True | False |
17. Series and parallel logic: AND, OR and NOT
Series contacts form an AND condition. If Start is true and Guard_OK is true, a series path using those tags is true. If either is false, that path is false. Use clear defined meanings for each bit.
Parallel branches form an OR condition between alternative true paths. A lamp may be requested by either Manual_Request or Auto_Request. Additional series permissives outside the branch apply to both alternatives.
NOT is represented by examining a bit for 0. For example, a negated Fault contact is true when Fault = 0. A negated contact is not automatically a physical NC switch; it is a logical test.
Expression first. Write the intended Boolean expression before drawing. For Permit = Healthy AND (Request_A OR Request_B), the Healthy contact must be outside the parallel branch. Moving it into only one branch changes the requirement.
| A | B | A AND B | A OR B |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 |
18. Latching or holding circuit: start-stop control
A momentary Start input should often establish a continuing run request until a stop condition occurs. A holding or seal-in circuit uses the run bit as one alternative to Start. It does not require the operator to hold Start continuously.
Defined program. RunCmd(next) = Stop_OK AND (Start OR RunCmd(current)). The Stop_OK contact is in series with the entire parallel branch. When Start is pressed while Stop_OK = 1, the run coil becomes true. On subsequent scans its own bit maintains the branch.
Stopping. If Stop_OK becomes 0, the common series condition is false and the normal RunCmd coil writes 0. Pressing Start simultaneously cannot bypass this stop condition. A held Start can start the machine again after Stop_OK returns; preventing that requires additional restart logic.
Physical boundary. Stop_OK is defined as a healthy normal-stop input. This educational run circuit is not, by itself, an emergency-stop or personnel-protection design. The motor command passes through suitable hardware and machine-specific permissives.
19. Memory bits, state flags and retentive data
An internal memory bit stores a logical state without directly representing a physical I/O terminal. Examples include RunCmd, Step_1, BatchDone and AlarmPending. A memory bit can be written by logic and examined by other rungs.
Retentive means specified data is preserved across particular events such as a restart or power interruption, according to configuration. It is separate from whether a bit has a physical output. Not every memory region, timer or counter is automatically retentive.
Startup state. Define which flags initialise to 0, which are restored and which must be reconciled with real sensor states. Remembered Step_2 does not prove that a cylinder is physically in its expected position after power loss.
Good use. Name state bits clearly and define how they are set, cleared and used. Use an explicit stop/reset strategy. Uncontrolled retained commands can produce confusing restart behaviour even if the normal running sequence appears correct.
20. Set/reset instructions and priority
A Set instruction writes a bit to 1 when its enabling condition is true; it does not automatically clear the bit merely because that condition later becomes false. A corresponding Reset instruction writes 0 when enabled.
Difference from holding. A normal-coil seal-in circuit rewrites its result every execution. Set/reset logic holds a stored state until an opposing action changes it. Both can implement run memory but have different execution and retention implications.
Both requests true. Priority must be explicit. With separate Set and Reset rungs in a declared sequential model, the later executed write can determine the final bit. A vendor block may instead define set-dominant or reset-dominant behaviour. Do not assume all instructions agree.
Reset-dominant example. For a conceptual state equation, next = NOT Reset AND (Set OR current). Reset = 1 forces next = 0 even when Set = 1. Startup retention remains a separate configuration question.
| Set | Reset | Next state: reset dominant |
|---|---|---|
| 0 | 0 | Previous state |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 1 | 0 |
21. Permissives, interlocks and output command separation
A permissive is a condition required to allow an action, such as a healthy drive or adequate supply pressure. An interlock prevents incompatible actions, such as simultaneous forward and reverse commands.
Separate request from command. A stored RunCmd can represent operator intent while MotorCmd = RunCmd AND DriveReady AND NOT Fault represents the current allowed output. This separation makes the effect of each condition easier to trace.
Opposed outputs. A simple logical pattern uses ForwardCmd = ForwardRequest AND NOT ReverseActive and a corresponding reverse condition. Complete behaviour must also resolve simultaneous requests, contactor feedback and any required changeover delay. Two software contacts do not prove a safe electrical reversing installation.
Feedback. A commanded output is not proof of action. Auxiliary contacts, limit sensors or drive status can confirm appropriate states. Normal control and safety functions have distinct design requirements; use the ladder examples to explain logic, not as a finished machine-safety scheme.
22. Timers: preset, elapsed time and output state
A timer is a program function that changes state according to a time condition. Typical parameters are input IN, preset PT, elapsed time ET and output Q. The block needs its own stored instance data; separate independent timers must not unintentionally share one instance.
Common functions. TON delays switching on, TOF delays switching off and TP creates a timed pulse under defined triggering rules. Retentive accumulation is another function. Instruction names and detailed behaviour vary, so the notes explicitly state the teaching model.
Time representation. A preset may be a time value such as 3 seconds, or a count multiplied by a specified time base. A value of 30 is meaningless without its type or time base. Timer timing need not be implemented by adding exactly one scan duration every scan.
Execution matters. The program must call or service the timer as required. Do not assume that skipping its block, stopping the task or powering down has the same effect as setting IN false. Read the specified block and restart behaviour.
23. On-delay timer TON and delayed starting
For the defined non-retentive TON, IN becoming true starts elapsed-time accumulation. Q remains false until IN has remained true for at least PT. When ET reaches PT, Q becomes true while IN remains true.
Reset behaviour. If IN becomes false before or after completion, Q becomes false and ET resets to zero under this model. Several separate short true periods do not add together to satisfy the preset.
Example. A process must see a continuously present package for 2 seconds before Accept becomes true. Feed PackagePresent into TON and use the timer Q as the condition. A 1.2-second presence followed by a gap does not complete a 2-second non-retentive TON.
Observed timing. Task scheduling, timer servicing and output updates affect when an external load sees the result. PT is the logical preset, not a promise of zero timing error at the terminals. Use the shown ideal timing chart for function understanding.
24. Off-delay timer TOF and pulse timer TP
For the defined TOF, a true IN makes Q true. When IN becomes false, Q remains true for the off-delay PT, then becomes false if IN stays false. If IN returns true during the delay, the output remains true and the off-delay is cancelled/reset in the teaching model.
Application. An extractor request can remain active briefly after a process request disappears.
Ordinary stop permissives can still need a separate path; a timer should not silently override a condition intended to remove permission immediately.
For a defined non-retriggerable TP, a rising edge triggers Q true for PT even if IN falls earlier. During the active pulse, additional input changes do not extend it in this example. After completion and a suitable return to false, another rising edge can trigger a new pulse.
Compare. TON requires sustained input before turning on; TOF maintains output after turning-off input; TP produces a defined pulse from a trigger. Retriggerable functions and vendor-specific variants must not be inferred from the generic letters alone.
25. Retentive timing and timing accuracy
A retentive accumulating timer can preserve elapsed time while its enabling condition is false and resume later. A separate Reset action clears the accumulated value in the defined model. This differs from a non-retentive TON, which clears when its input goes false.
Example. A teaching timer with PT = 8 s sees 3 s enabled, 4 s disabled and then 5 s enabled. It reaches the target after 8 s total enabled time, not after the first 8 s of wall-clock time. The off interval does not contribute.
Retention boundaries. Holding ET through an ordinary false input does not automatically prove retention through power loss or a CPU restart. Instruction function and non-volatile memory configuration are separate matters.
Accuracy. Consider time base or resolution, timer implementation, task interval, scheduling and output latency. If a timer result is only observed every 10 ms, the observation is discrete even when internal elapsed-time measurement uses a finer clock.
26. Counters and rising-edge event counting
A counter stores the number of defined events. An up counter CTU normally increments on a false-to-true transition at its count input in the stated model. A continuously true input is one event, not one new count on every scan.
Parameters. CU is the count-up input, R is reset, PV is preset, CV is current value and Q indicates the specified comparison such as CV greater than or equal to PV. Data range, overflow and retention behaviour depend on the implementation.
Event quality. A bouncing switch can create several edges for one physical operation. Filtering, debouncing or a suitable event definition may be needed. Conversely, an event that is too brief for the input path may never become visible.
Count versus measurement. Counting input transitions does not automatically measure production accurately: the sensor must identify each intended item once. Closely spaced items, transparent packages or a blocked beam may require suitable sensing and logic.
27. CTU, CTD and CTUD counter operation
A defined CTU starts from CV = 0, adds one on each accepted rising edge and sets Q when CV reaches or exceeds PV. Reset forces CV to zero and clears Q for a positive PV. Reset has priority over counting in the example.
A defined CTD loads a preset when Load is true and subtracts one per accepted count-down edge otherwise. Its completion condition commonly indicates CV less than or equal to zero. State the loading action; a down counter need not load itself automatically.
A CTUD supports both count directions. It is useful for occupancy, inventory or reversible movement when the physical events are well defined. Reset/load priority and simultaneous up/down edges must follow the selected instruction specification.
Example boundary. For a classroom occupancy model, accept exactly one valid entry or exit event at a time and constrain the valid range. Real installations need a strategy for simultaneous crossings, lost power, missed events and reconciliation with actual occupancy.
| Function | Event action | Other state action |
|---|---|---|
| CTU | Increment on accepted up edge | Reset to zero |
| CTD | Decrement on accepted down edge | Load preset |
| CTUD | Count either direction | Defined reset/load priorities |
28. Combining timer and counter logic: a batch example
Requirement. While a batch is enabled, count one rising edge per detected item. At a preset count of five, latch BatchDone, stop requesting feed and start a 2-second indication period. A deliberate reset prepares the next batch.
State plan. BatchEnable permits counting. Counter Q produces the completion condition. BatchDone is stored so that the event remains meaningful after feed stops. A TON with IN = BatchDone can indicate that the completion state has lasted 2 seconds.
Order and reset. Define whether the first count can occur on the enabling scan, ensure one event per item, and define reset priority for counter, timer and flags. The timer Q signals delay completion; it does not by itself reset the batch unless programmed to do so.
Interpretation. This is a logic-development exercise, not a finished packaging-machine design. Unit V applies PLC logic to complete processes with additional sensing, actuator states and fault handling. Keep command, confirmation and sequence state separate.
29. Programming method, trace tables and debugging
Develop systematically. Write the requirement, define tags and true-state meanings, list states and transitions, form Boolean conditions and then draw the ladder. Include startup, normal stop, reset and conflicting-request behaviour.
Trace table. For each scan or event, record relevant inputs, prior memory, evaluated conditions and resulting states. A table makes seal-in behaviour and edge counting easier to verify than a verbal claim that a rung works.
Monitor carefully. Online status and watch tables show program data. A force or override changes control conditions and is not ordinary evidence of correct automatic operation. Compare command bits with independent field feedback and diagnostic information.
Common faults. Wrong tag, inverted input meaning, duplicate coils, missing timer execution, reused timer instances, unintended retention and a count input that never returns false are frequent causes. Check the requirement before changing a correct program to match a faulty assumption.
30. Controller answer structure and final selection checklist
Hardware question. Define the PLC and label supply, CPU, memory, input and output modules, bus, programming device and field equipment. Explain data flow and the difference between a command and main load power.
Scan question. State the cyclic model, identify process images and explain scan time. Qualify input/output timing and exceptions. For a calculation, declare whether the times are sequential and which interface or actuator delays are included.
Programming question. Define tags, draw contacts and coils clearly, state the logic expression and explain the sequence. For holding, show stop outside the seal-in branch; for timers/counters, state function, preset, reset and trigger rules.
Selection question. Match I/O types and quantities, capacity, response, environment, networking, tools, support and cost to the application. Verify initialisation, retention and appropriate failure behaviour. Complete coverage is achieved through connected hardware and logic explanations rather than memorising symbols alone.
| Question area | Essential evidence |
|---|---|
| PLC structure | Labelled components and roles |
| Scanning | Model, timing and process images |
| I/O selection | Compatible signal and load interfaces |
| Ladder program | Tags, logic, sequence and reset |
| Timers/counters | Trigger, preset, state and priority |
SOLVED EXAMPLES AND APPLICATIONS
The following are original teaching examples. Identify the relevant role, working principle and assumptions before interpreting the result.
Solved example 4.1: Sequential scan-time budget
A declared sequential cycle uses 1.2 ms for input servicing, 4.0 ms for logic, 1.0 ms for output servicing and 0.8 ms for overhead. Calculate scan time.
-
1. Add non-overlapping parts. T = 1.2 + 4.0 + 1.0 + 0.8 = 7.0 ms.
-
2. State the model. All four times are stated to be sequential; no additional interrupt or communication time is specified.
Answer. The cycle is 7 ms under the declared budget. This is not the complete sensor-to-actuator response.
Solved example 4.2: Cycles per second
A controller has a constant 8 ms cyclic period in a simplified model. Find cycles per second.
-
1. Convert units. 8 ms = 0.008 s.
-
2. Take the reciprocal. Cycle frequency = 1/0.008 = 125 cycles/s.
Answer. 125 cycles per second. This is a repetition rate, not a promise to capture every 125 Hz input waveform.
Solved example 4.3: Response at different scan phases
In a sample-at-start/update-at-end model, T = 8 ms. Input changes either just before sampling or just after it. Ignore module, sensor and load delays. Estimate output-response delay.
-
1. Just before sampling. The condition can be used in the current scan and written at its end: approximately 8 ms.
-
2. Just after sampling. It waits almost one scan for the next sample and then that scan executes: approximately 16 ms.
Answer. Approximately 8-16 ms for these boundary cases and assumptions. This range is not universal for all task and I/O arrangements.
Solved example 4.4: Pulse sampling
Ordinary samples occur at 0, 5 and 10 ms. An input is high from 2 to 4 ms. Will these samples show it?
-
1. Read sampled instants. The pulse is false at 0 ms, false at 5 ms and false at 10 ms.
-
2. Identify the issue. The entire pulse lies between two ordinary samples.
Answer. It is missed by the stated sampling scheme. Suitable capture hardware or a changed sensing/sampling design may be required.
Solved example 4.5: Digital I/O capacity with reserve
A machine needs 18 digital inputs and 11 digital outputs. Add a 25% reserve to each category and round up to whole channels.
-
1. Inputs. 18 x 1.25 = 22.5, so provide at least 23 DI channels.
-
2. Outputs. 11 x 1.25 = 13.75, so provide at least 14 DO channels.
Answer. At least 23 DI and 14 DO. Select available module sizes at or above these counts and check all other requirements separately.
Solved example 4.6: Linear current scaling
A transmitter maps 4-20 mA to 0-100 bar. What pressure corresponds to 12 mA?
-
1. Normalise the span. Fraction = (12 – 4)/(20 – 4) = 8/16 = 0.5.
-
2. Convert to engineering units. Pressure = 0 + 0.5 x 100 = 50 bar.
Answer. 50 bar for the stated linear map; fault/underrange handling is a separate requirement.
Solved example 4.7: Raw analogue scaling
A stated raw range of 0-27648 represents 0-100 degrees Celsius. Convert raw 13824.
-
1. Use the declared raw range. Fraction = 13824/27648 = 0.5.
-
2. Scale. Temperature = 0 + 0.5 x 100 = 50 degrees Celsius.
Answer. 50 degrees Celsius. These raw endpoints belong to this example and are not a universal PLC convention.
Solved example 4.8: Ideal resolution
A defined 12-bit ideal bin model covers a 10 V span. Calculate one voltage increment.
-
1. Number of bins. 2^12 = 4096.
-
2. Divide the span. 10/4096 = 0.00244140625 V = 2.4414 mV.
Answer. Approximately 2.44 mV per ideal increment. Accuracy and endpoint coding are separate matters.
Solved example 4.9: Evaluate a combined rung
Permit = Healthy AND (Request_A OR Request_B). Evaluate Healthy = 1, Request_A = 0 and Request_B = 1.
-
1. Parallel condition. 0 OR 1 = 1.
-
2. Series permissive. 1 AND 1 = 1.
Answer. Permit = 1. If Healthy becomes 0, Permit becomes 0 regardless of either request.
Solved example 4.10: Physical NC versus software contact
An NC normal-stop circuit produces Stop_OK = 1 when healthy. Which software contact passes logic while healthy?
-
1. Define the data. The healthy condition is stored as the bit value 1.
-
2. Choose the test. A plain, non-negated contact is true for a bit value of 1.
Answer. Use a non-negated Stop_OK test for this definition. Physical NC does not automatically mean use a negated ladder contact.
Solved example 4.11: Holding-circuit state trace
RunNext = Stop_OK AND (Start OR RunCurrent). Starting at RunCurrent = 0, apply (Stop_OK, Start) = (1,1), then (1,0), then (0,1).
-
1. Start and hold. First evaluation gives 1 AND (1 OR 0) = 1; second gives 1 AND (0 OR 1) = 1.
-
2. Stop priority. Third evaluation gives 0 AND (1 OR 1) = 0.
Answer. Run state is 1, then 1, then 0. The shared stop condition prevents Start from bypassing it.
Solved example 4.12: Reset-dominant memory
For Next = NOT Reset AND (Set OR Current), evaluate Set = 1, Reset = 1 and Current = 1.
-
1. Reset condition. NOT Reset = 0.
-
2. Apply the equation. Next = 0 AND (1 OR 1) = 0.
Answer. Next = 0. This is the explicitly defined reset-dominant model, not a claim about every vendor Set/Reset instruction pair.
Solved example 4.13: Non-retentive TON
A TON has PT = 3 s. IN is true for 2 s, false for 0.5 s and then true for 3 s. Ignore observation quantisation. When does Q first become true?
-
1. First interval. Two seconds is less than the preset; the false interval clears ET.
-
2. Second interval. The new true interval begins at t = 2.5 s and completes the preset at t = 5.5 s.
Answer. Q first becomes true at t = 5.5 s under the defined ideal model, not at 3 s of total wall-clock time.
Solved example 4.14: Off-delay timing
A defined TOF with PT = 2 s has Q true while IN is true. IN falls at t = 5 s and stays false. When does Q fall?
-
1. Start off-delay. The falling input starts the two-second delay.
-
2. Complete delay. 5 + 2 = 7 s.
Answer. Q falls at t = 7 s in the ideal model. Reasserting IN during the delay would cancel the pending off transition in this example.
Solved example 4.15: Pulse timing
A defined non-retriggerable TP has PT = 1.5 s. A rising edge occurs at t = 4 s and IN falls at 4.2 s. Find the output interval.
-
1. Trigger. Q becomes true at the rising edge at 4 s.
-
2. Pulse duration. The defined pulse lasts 1.5 s, so it ends at 5.5 s.
Answer. Q is true from 4 to 5.5 s in the ideal model; the earlier input fall does not shorten this defined pulse.
Solved example 4.16: Accumulated enabled time
A retentive accumulating model has PT = 8 s. Enable is true for 3 s, false for 4 s and then true again. How much additional enabled time is needed?
-
1. Retain the state. The first interval stores 3 s; the false interval contributes zero and does not clear it.
-
2. Remaining duration. 8 – 3 = 5 s.
Answer. Five more enabled seconds are needed. The target is reached at wall-clock time 12 s if the intervals begin at t = 0.
Solved example 4.17: Rising-edge counter trace
A CTU starts at CV = 0 and sees CU values 0,1,1,0,1,0,1 over successive observations. Reset stays false. PV = 3. Find CV and Q.
-
1. Identify edges. Rising edges occur at the second, fifth and seventh observations.
-
2. Count and compare. Three accepted edges give CV = 3; CV >= PV is true.
Answer. CV = 3 and Q = 1. Holding CU high at two successive observations did not create a second count.
Solved example 4.18: Counter reset priority
A defined CTU has CV = 4 and PV = 5. Reset and a count-up rising edge occur together. Reset has priority. Find the resulting CV and Q.
-
1. Apply priority. Reset overrides the count event in the declared model and sets CV = 0.
-
2. Compare with preset. 0 >= 5 is false.
Answer. CV = 0 and Q = 0. State the selected instruction priority when answering a different implementation.
Solved example 4.19: Down-counter example
A defined CTD loads 6 when Load is true. After Load becomes false, four accepted down edges occur. Find CV and completion state Q, where Q = (CV <= 0).
-
1. Initialise. Load establishes CV = 6.
-
2. Count down. 6 – 4 = 2; 2 <= 0 is false.
Answer. CV = 2 and Q = 0. Two further accepted down edges would reach zero under this arithmetic model.
Solved example 4.20: Batch completion and timer roles
Five valid item edges make a batch counter reach PV = 5. BatchDone then enables a TON with PT = 2 s. Does timer completion automatically clear the counter?
-
1. Identify separate states. Counter state, BatchDone and timer state belong to separate logic/instances.
-
2. Read the programmed actions. Timer Q reports that its delay condition completed; it clears other states only if reset logic explicitly uses it.
Answer. No. A reset sequence must explicitly define which states clear and when the next batch is enabled.
EXAM QUESTIONS WITH ANSWERS
Practice questions covering the definitions, comparisons and applications in Unit IV.
Short-answer practice
Q1. Define a PLC.
Answer. An industrial programmable controller reads field inputs, executes a stored program and updates commands through compatible output interfaces.
Q2. Name the basic PLC components.
Answer. Power supply, CPU, program/data memory, input modules, output modules, internal bus and programming/communication interface.
Q3. What is a compact PLC?
Answer. A controller with CPU and a defined set of I/O integrated in one enclosure; some models also support expansion.
Q4. What is modular construction?
Answer. A compatible set of separate CPU, supply, I/O and communication modules selected and configured for the application.
Q5. Define scan time.
Answer. The duration of one defined cyclic execution, including its applicable I/O, program and supporting activities.
Q6. What is the process image?
Answer. A memory representation of input or output states used by the cyclic program, distinct from continuously accessing each electrical terminal.
Q7. Why can a short pulse be missed?
Answer. It can occur between ordinary input samples or be rejected by input filtering before the program sees a valid transition.
Q8. Digital versus analogue I/O?
Answer. Digital signals represent discrete states. Analogue signals represent a quantity over a stated range and require appropriate conversion/scaling.
Q9. What does an input tag identify?
Answer. A named program data item associated with a defined field point or input representation, with a specified meaning for its value.
Q10. Name three digital output types.
Answer. Relay, transistor and triac. Their load domain, ratings and switching characteristics differ.
Q11. Does a lit output LED prove movement?
Answer. No. It commonly indicates a command state; power, load operation and actual motion require separate verification.
Q12. Define a ladder rung.
Answer. A horizontal logical network of conditions and actions between rails in a ladder program.
Q13. What does a plain contact test?
Answer. It passes logical truth when its referenced bit is 1; it does not physically open or close a field contact.
Q14. What does a negated contact test?
Answer. It passes logical truth when its referenced bit is 0, regardless of the mechanical NO/NC classification of a field switch.
Q15. What does a normal coil do?
Answer. When executed, it writes its rung result to the addressed bit: true writes 1 and false writes 0.
Q16. How are AND and OR drawn?
Answer. Series conditions implement AND; alternative parallel paths implement OR under the defined ladder logic.
Q17. Define a holding circuit.
Answer. A memory-maintaining run circuit using an existing run-state contact in parallel with a momentary Start condition, inside shared stop/permissive conditions.
Q18. What is a memory bit?
Answer. An internal BOOL used for logical state without necessarily mapping to a physical I/O terminal.
Q19. What is retentive data?
Answer. Configured data preserved across specified operating events; the exact restart and power-loss rules depend on the controller and configuration.
Q20. Define TON.
Answer. A defined non-retentive on-delay requires its input to stay true for the preset before Q becomes true; false input resets it.
Q21. Define TOF.
Answer. An off-delay makes Q true with its true input and maintains Q for the stated delay after the input becomes false, under its defined retrigger rules.
Q22. Define a pulse timer.
Answer. A timer that produces a pulse for a specified duration from a defined trigger; retriggering behaviour must be specified.
Q23. What event increments CTU?
Answer. An accepted false-to-true transition at its count-up input in the defined edge-counting model.
Q24. State PLC selection criteria.
Answer. I/O types/counts, expansion, memory, timing, special functions, networking, supply, environment, tools, support, appropriate safety architecture and lifecycle cost.
Structured long-answer practice
Use a definition, clearly separated points, a relevant example and a labelled diagram or comparison where appropriate. Match the length to the marks and the question rather than memorising a fixed word count.
Long question 1. Explain the basic structure and working of a PLC.
Answer
-
1. Definition and purpose. A PLC is an industrial programmable controller used to read field states, evaluate stored logic and issue output commands. For a conveyor, a package sensor and operator request are inputs; the stored sequence determines a suitable motor-starter command.
-
2. CPU and memory. The CPU executes instructions and manages data. Program storage contains logic/configuration; working memory holds process values, states and function-block data. Retention depends on configuration.
-
3. Interfaces and power. Input modules condition compatible field signals. Output modules provide compatible commands. Supply and backplane support electronics; load-power equipment remains distinct from the processor.
-
4. Cyclic operation. In a sample-execute-update teaching cycle, inputs enter the process image, logic evaluates the sampled values and outputs receive the resulting commands. The cycle repeats. Actual scheduling, I/O updates and vendor boundary order can differ.
-
5. Programming and evidence. A programming device creates, downloads and monitors code; an HMI supports operators. A sensor event enters the input module, becomes program data, is evaluated with stored conditions and changes a compatible output command.
Long question 2. Explain scan cycle, scan time and response limitations.
Answer
-
1. Cycle versus duration. The scan cycle is a repeating sequence of activities. Scan time is the elapsed duration of the defined cycle. It is not one contact-evaluation time or a timer preset.
-
2. Contributors. I/O servicing, logic, communication, diagnostics and interrupts can affect timing. Average duration and the longest observed cycle can differ; a watchdog supervises excessive execution time.
-
3. Sampling effects. A sampled value can remain unchanged in the process image while the physical input changes. A pulse entirely between samples can be missed. Input filtering adds another condition.
-
4. Overall response. Sensor, input, task, output and actuator delays all matter. In a declared start-sample/end-update model, the phase of an input can add nearly a further scan before a commanded output appears.
-
5. Application and calculation. For sequential components, total cycle time is their sum in consistent units. High-speed counters or capture hardware can be necessary for events too short for ordinary cyclic sampling.
Long question 3. Describe PLC I/O types and selection criteria.
Answer
-
1. Digital inputs. They represent discrete field states after appropriate electrical conditioning. Electrical thresholds and polarity must be compatible, and a tag must have a defined true-state meaning. Physical NO/NC and software inversion are different concepts.
-
2. Digital outputs. Relay outputs use rated contacts, transistor outputs switch compatible DC loads and triac outputs suit compatible AC loads. Load ratings, switching duty and interface needs determine selection; PLC outputs need not carry main motor current.
-
3. Analogue and special I/O. Analogue modules convert a measured range into data or a command signal. Scaling converts that data to engineering units; resolution differs from accuracy. High-speed, temperature, motion and remote-I/O functions serve specialised requirements.
-
4. Capacity and performance. Digital input/output, analogue and special-channel counts are assessed separately with stated reserve. CPU/module limits, memory, timing, supply and communication must satisfy the whole sensor-to-load requirement.
-
5. Environment and support. Industrial conditions, enclosure, maintainability, tools, spares, lifecycle cost and required safety facilities affect suitability. The complete system is selected against a written application requirement.
Long question 4. Explain contacts, coils, holding circuits and memory bits.
Answer
-
1. Ladder meaning. Rails and rungs express logical evaluation. A plain contact examines a bit for 1; a negated contact examines it for 0. A normal coil writes the evaluated result when executed.
-
2. Boolean structure. Series forms AND and parallel branches form OR. A common permissive placed outside parallel alternatives gates every alternative; putting it in one branch changes the Boolean requirement.
-
3. Holding sequence. RunNext = Stop_OK AND (Start OR RunCurrent). Start creates the run state, the run contact holds it and the common stop condition clears it. The stop condition is outside the parallel holding branch.
-
4. Memory and alternatives. Internal bits store state without physical outputs. Set/reset instructions hold state until an opposing action changes it. Simultaneous-request priority must be explicit. Logical state holding and configured power-loss retention are different properties.
-
5. Trace and limitation. From an initial zero run state, healthy stop plus Start makes Run = 1; release of Start keeps Run = 1; an unhealthy stop clears Run. A held Start can restart it when permission returns unless further logic prevents this. A simple classroom seal-in rung is normal-control logic, not a completed machine-safety design.
Long question 5. Explain timers and counters with suitable applications.
Answer
-
1. Timer parameters. IN is the timer condition, PT the preset duration, ET elapsed time and Q the logical output. Time units must be declared. Each independent timer needs its own appropriate instance state and scheduled execution.
-
2. Timer functions. TON delays on after sustained input; TOF delays off after an input falls; TP produces a defined pulse. Retentive accumulation holds elapsed enabled time until reset in the stated model. For a TON with PT = 2 s, a continuous input beginning at t = 1 s makes Q true at t = 3 s in the ideal model.
-
3. Counter functions. A CTU counts accepted rising edges, CTD counts down after a defined load, and CTUD handles both directions. PV is preset count, CV is current count and Q reports the defined completion comparison. A held high input is not a new event on every scan.
-
4. Reset and implementation. Reset/load priority, valid data range, overflow, retention and skipped-block behaviour follow the chosen instruction. Holding elapsed time while IN is false does not by itself establish power-loss retention.
-
5. Combined example. Five accepted item edges can complete a batch counter, set BatchDone, inhibit feed and enable a two-second delay. A deliberate reset clears the specified state for the next batch; timer Q does not clear another block automatically. Bounce or missed pulses can corrupt the item count.
QUICK REVISION – UNIT IV
The complete unit at a glance
| Syllabus area | Essential understanding |
|---|---|
| PLC structure | Supply, CPU, memory, buses, input/output modules and engineering interface. |
| Types | Compact, modular and distributed I/O arrangements with suitable special capabilities. |
| Working and scan | Cyclic data updates, process images, execution and supporting tasks; vendor order can differ. |
| I/O | Digital, analogue and specialised interfaces; signal compatibility and load paths. |
| Selection | Channel counts/types, expansion, timing, environment, networking, power and lifecycle support. |
| Ladder | Rails, rungs, bit tests, coils, series AND and parallel OR. |
| State logic | Holding, memory bits, Set/Reset priorities, permissives and interlocks. |
| Timing and counting | TON, TOF, TP, accumulation; edge-triggered counters and explicit reset/load. |
Logical functions and state rules
| Function | Defined rule |
|---|---|
| Plain contact | True when referenced bit = 1. |
| Negated contact | True when referenced bit = 0; not the same as a physical NC switch. |
| Normal coil | When executed, writes its rung result as 1 or 0. |
| Holding | RunNext = Stop_OK AND (Start OR RunCurrent). |
| Reset-dominant state | Next = NOT Reset AND (Set OR Current). |
| TON | Requires sustained true input for PT; false input resets the defined non-retentive model. |
| TOF | Maintains Q for the off-delay after IN becomes false under the defined retrigger rule. |
| TP | A defined trigger produces a pulse; retrigger rules must be specified. |
| CTU | Accepted rising edges increment CV; Q = (CV >= PV) in the teaching model. |
Calculations and assumptions
| Quantity | Relationship and limitation |
|---|---|
| Sequential scan budget | T = input time + logic time + output time + stated overhead; only for non-overlapping parts. |
| Cycle frequency | f = 1/T using seconds; not a universal maximum input-event frequency. |
| Reserve channels | Required count = round up [current need x (1 + reserve fraction)] for each I/O category. |
| Linear scaling | Engineering value = low + (raw – raw low) x engineering span / raw span. |
| Ideal bin increment | Span/2^n under the stated n-bit conversion model; distinct from accuracy. |
| Timer preset | State time units or time base and distinguish preset, observation and physical response. |
| Counter | Count accepted edges, not scans spent high; define reset/load, priority and valid range. |
Memory cues
PLC hardware: sense, condition, process, command. Ladder: test bits, combine conditions, write state. Timers: on delay, off delay, pulse, accumulate. Counters: event, edge, count, compare, reset.
Abbreviations and key terms
| Term | Meaning | Term | Meaning |
|---|---|---|---|
| PLC | Programmable logic controller | Rung | Logical ladder network |
| CPU | Central processing unit | Coil | Bit-writing ladder instruction |
| I/O | Input and output interfaces | Seal-in | Holding through a state contact |
| DI | Digital input | Memory bit | Internal logical state |
| DO | Digital output | Retentive | Preserved across specified events |
| AI | Analogue input | Interlock | Prevents incompatible action |
| AO | Analogue output | TON | On-delay timer |
| BOOL | Binary logical data type | TOF | Off-delay timer |
| Process image | Memory representation of I/O | TP | Defined pulse timer |
| Scan time | Duration of a defined cycle | PT / ET | Preset and elapsed time |
| Watchdog | Execution-time supervision | PV / CV | Preset and current count |
| Tag | Named program data item | CTU / CTD | Count up and count down |
Common mistakes to avoid
-
Treating every PLC as having one universal scan boundary order.
-
Equating scan time with total physical response time.
-
Assuming a short pulse is guaranteed to be sampled.
-
Confusing physical NC contacts with negated software bit tests.
-
Using incompatible analogue ranges or output load types.
-
Treating an output LED as proof of completed motion.
-
Putting a stop condition inside only one holding branch.
-
Writing one command with multiple uncontrolled normal coils.
-
Assuming every memory bit survives power loss.
-
Confusing a non-retentive TON with accumulated enabled time.
-
Counting every high scan instead of accepted rising edges.
-
Leaving reset, startup or simultaneous-request priority undefined.
Final answer check: define tags and the execution model, label the diagram, explain conditions and state changes, state timing/reset rules, and verify numerical units and assumptions.