During practical commissioning, a control system that appears to meet the mechanical equipment process requirements in theory may still fail to operate correctly. Beyond software design methods, the following areas are often useful to investigate when diagnosing such problems.
1. Scan Cycle and Response Time
When designing a control system with a PLC, timing is a critical parameter. Two important timing metrics are scan time (how long the PLC takes to execute all instructions) and response time (how long it takes for an input signal to produce a corresponding output).
A running PLC executes the program in memory sequentially. Scan time can be divided into four parts: common tasks (for example clearing timers and checking program memory), data input, data output, instruction execution, and execution of peripheral device instructions. A time monitor inside the PLC is used to measure scan time.
Scan time depends on the hardware configuration, number of I/O points, the types and number of instructions used in the program, and connected peripheral devices. Once the hardware is fixed, scan time is mainly determined by the software instruction set and program length. Response time is the interval from when a PLC receives an input to when it produces an output signal.
Response time is variable. For example, if an input is received at the end of a scan cycle and it takes effect at the start of the next cycle, the response time is relatively short. In general, the minimum and maximum response times can be estimated as:
Minimum response time = input delay + scan time + output delay
Maximum response time = input delay + 2 × scan time + output delay
These formulas show that input response is governed by the scan cycle. The scan cycle is influenced by hardware configuration and the number and type of instructions in the control program. In a large system such as a block forming machine, the software may contain several hundred instructions. A start signal for the automatic plate-pushing operation may be generated from a forming-complete signal combined with a board-present signal. If the forming-complete signal and the send-board signal occur within the same scan cycle, the timing can be affected by scan delays.
In practice, a case may occur where, after the first forming cycle completes, the system immediately begins the next forming cycle instead of performing the automatic push operation. Designers often first suspect program logic errors. If the program checks out, the cause can be instruction and response timing: an input may be scanned and set in a sequence such that the push operation is skipped within the same scan. When hardware cannot be changed and the number of instructions cannot be reduced, resolving the issue in software by adjusting the timing or ensuring the forming-complete signal occurs earlier can solve the problem. In the example system, this approach corrected the behavior.
2. Software Reset
Common internal relays used in PLC programming are called holding relays. Typical PLCs provide internal relays from HR000 to HR915 (10 × 16 points). Timers and counters are typically provided as TIM00 to TIM47 (or CNT00 to CNT47), though the exact point counts vary by PLC model.
Holding relays implement memory functions and record the operating status of mechanical subsystems. For safe and timely sequence control, it is common for the control signals generated by holding relays to both terminate the previous mechanical action and start the next one. If a timer cannot be reset properly, it may prevent correct sequencing.
Before starting machinery, failing to force-reset holding relays can cause unintended machine actions. Hardware reset buttons are commonly provided to force reset holding relays, timers, counters, and high-speed counters when necessary. However, during commissioning, it is often found that when holding relays, timers, and counters are used extensively, the hardware reset may not reliably reset all internal PLC elements.
In other words, a hardware reset may not always reset internal relays, timers, and counters accurately or promptly, causing the control system to fail to operate normally. During debugging, implementing a software reset signal as an internal PLC signal can ensure holding relays and other internal elements are reliably reset so the system operates normally in all conditions.
3. Hardware Circuit
Hardware wiring and input circuits are another common source of intermittent faults. When a two-wire sensor—such as a photoelectric switch, proximity switch, or limit switch—is connected to a PLC input, leakage current can sometimes cause the input to be read as ON.
If sporadic false operations occur during commissioning, leakage current-induced false signals may be the cause. To prevent this, designers often add a parallel bleed resistor on the input. The required resistor value depends on the PLC model and its specified leakage current, which can be found in the vendor's manual. Implementing this hardware measure can effectively prevent false operations caused by leakage current.