Discussion on the Development of Internal Resources of PLC
2026-04-06 05:58:45··#1
Abstract: This paper utilizes the surplus resources within a PLC to detect short-circuit and open-circuit faults in external input control electrical appliances. The design concept is discussed, and ladder diagrams for detecting short-circuit and open-circuit faults in actual control electrical appliances are provided. Keywords: Control electrical appliances; Short circuit; Open circuit; Ladder diagram; Detection I. Introduction Programmable Logic Controllers (PLCs) are characterized by high reliability. In PLC control systems, most faults originate from external control electrical appliances, such as damaged buttons and limit switches. Faults in control electrical appliances fall into two categories: one is the formation of an oxide film on the contacts, preventing them from closing and causing an open-circuit fault; the other is the fusion of the contacts, causing a short-circuit fault. Both will affect the normal operation of the PLC control system. To quickly and accurately detect faults in the control electrical appliances of a PLC control system, this paper explores the use of surplus components within the PLC for automatic diagnosis of open-circuit and short-circuit faults in PLC input control electrical appliances, enabling timely fault elimination and ensuring the normal operation of the PLC control system. II. Detection of Short Circuit Faults in Input Control Electrical Appliances 1. Analysis and Design of Short Circuit Faults To detect short circuit faults in a control electrical appliance, the normally open contact of the appliance being tested can be connected in series in the relevant step sequence segment of the ladder diagram. When the normally open contact of the appliance closes, indicating a short circuit fault, the output relay (an auxiliary relay of the PLC) is immediately activated, stopping the relevant output device and illuminating the fault indicator light, allowing operators to quickly identify the fault and determine its cause. To avoid temporary errors in fault indication caused by the closing of some normally open contacts of the tested appliances during step sequence transitions, several timers can be set as needed, allowing steps with the same transition time and intervals to share a single timer. The normally open contact of the timer is connected in series in the corresponding step sequence segment, with the time setting value slightly longer than the step transition time, thus preventing erroneous fault indications. If a step sequence status indicator composed of internal auxiliary relays of the PLC is set in each step sequence segment, and the normally open contact of the indicator is connected in series with the normally open contact of the aforementioned timer and the fault output relay, fault detection for that step can be achieved using the step sequence status indicator. The faulty electrical appliance can only be detected when the system reaches that step. A PLC control system may have dozens or even hundreds of input control appliances, meaning the system has dozens or even hundreds of step segments, while the contacts of the status register can only be used once. If the program is written according to the step sequence instructions, additional internal auxiliary relays must be selected as status indicators to detect faults. This not only occupies a large number of auxiliary relays but also makes the ladder diagram quite complex. In this situation, using a shift register programming method is more ideal. This not only allows the shift register to control the system across numerous step segments but also utilizes the PLC's abundant internal auxiliary relays as step sequence status indicators, thereby achieving fault detection for numerous input control appliances. 2. Selection of Fault Detection Method If all input control appliances are detected in every step segment, the ladder diagram will become extremely complex. Analysis and practical application have proven that it is not necessary to perform short-circuit detection on all input control appliances in every step segment; it is sufficient to detect only one relevant input appliance in a given step segment. Generally, the control appliance of the LD instruction in each step segment is selected, i.e., the control appliance that starts a certain program segment. III. Detection of Open Circuit Faults in Input Control Appliances 1. Analysis and Design of Open Circuit Faults In the normal operation of a PLC control system, each step sequence has a certain time interval. If an open circuit fault occurs in the input control appliance, the system will be unable to proceed to the next step and will stop. Therefore, it is necessary to detect open circuit faults in the control appliances. To detect open circuit faults, simply connect the normally open contact of the relevant step sequence status indicator, the normally closed contact of the next step sequence status indicator, and the timer coil in series. Start timing immediately at the beginning of the step sequence segment, and reset the timer when the step sequence segment ends and the next step begins. If the system finishes the step within the timer's set time, the normally open contact closes when the timer expires, indicating a fault signal. The selection of the timer's timing value requires attention to the following two points: first, ensuring the system can quickly detect open circuit faults; second, the accurate timing time (i.e., step time) needs to be determined through on-site debugging. 2. Selection of Fault Detection Open circuit detection of a large number of input control electrical appliances will inevitably occupy a lot of timers, while the number of timers inside the PLC is limited. Therefore, the detection of control electrical appliances can be handled as follows: (1) Steps with the same step sequence time and intervals can share a timer. (2) For open circuit fault detection, select the control electrical appliance that is OUT before a certain step sequence segment. (3) Select the control electrical appliance with a high failure rate for detection. IV. Design of Fault Detection 1. Bottle Label Detection System The bottle label detection system is shown in Figure 1. The system has photoelectric switches 0001 and 0002 to check the bottles on the conveyor belt. If a bottle without a label is detected, 0001 is turned on. At this time, the system controls a robot to remove the bottle from conveyor belt A and place it on conveyor belt B. When the robot returns to the starting position, the robot's original position 0004 is turned on. At the same time, the system also counts the bottles without labels. When the count value reaches the set value, the alarm light is on. 2. Ladder Diagram Design of Control System The ladder diagram of the C-series PLC control system is shown in Figure 2. 3. Open circuit fault detection of control electrical appliances: The control electrical appliances to be detected are photoelectric switches 0001 and 0002, stop button 0003 and robot original position detection 0004. Based on the above ideas, the ladder diagram for open circuit fault detection of input control electrical appliances is designed, as shown in Figure 3. 4. Short circuit fault detection of control electrical appliances: The control electrical appliances to be detected are the same as those for open circuit. The ladder diagram for short circuit fault detection of control electrical appliances is designed, as shown in Figure 4. 5. Several points to note: (1) Given that the bottle label detection system has few output points and the PLC has a lot of remaining output points, a simpler method is used in the design to realize the fault detection of control electrical appliances. Each fault of each detected electrical appliance is displayed by an independent output point, so that the fault display is one-to-one and clear. (2) If the control system is more complex and there are many input control electrical appliances and output devices, resulting in fewer surplus output points, in order to reduce the number of output points occupied by the fault display, a status indicator needs to be added. The 8421 code can be used to allocate the fault display lamp (the indicator light corresponding to the output point), and the program can be adjusted accordingly. V. Conclusion The internal resources of a PLC, such as output relays, auxiliary relays, and timers, are generally not fully utilized. Therefore, these surplus internal electrical components can be used to automatically detect faults in external input control electrical components of the PLC. This detection can be performed without any external components or additional costs. This is of great significance for ensuring the normal operation of the PLC control system.