PLC programming technology for single-button start/stop control
2026-04-06 07:38:28··#1
Abstract : Based on the characteristics of PLC control systems, this paper introduces nine PLC programming techniques for single-button start/stop control using Panasonic Electric Works FP0 series PLC as an example. These techniques simplify circuit control, reduce malfunctions, and have high practical value. Keywords : PLC; single button; programming technology; ladder diagram; instruction 0 Introduction In PLC control system design, load start and stop control is frequently encountered. The common practice is to use two buttons as external start and stop control input devices. The PLC also has two corresponding input points. The external wiring of the PLC is shown in Figure 1. Button SB1 (X0) is used for start control, and button SB2 (X1) is used for stop control. While this achieves the control objective, it requires more buttons and connecting wires, and also increases the number of PLC input points. However, in practical work, the multi-functional features of the PLC can be fully utilized. A single button can be used to control the start and stop of the load. The improved external wiring of the PLC is shown in Figure 2. SB replaces the functions of SB1 and SB2, and X0 replaces the functions of X0 and X1. This greatly simplifies the actual wiring, saving hardware costs and significantly reducing potential malfunctions caused by multiple buttons. The circuit becomes more economical, safe, reliable, and easy to control, possessing high practical value. Based on practical work experience and research results, this paper introduces several PLC programming techniques for single-button start/stop control, using the Panasonic Electric Works FP0 series PLC as an example. [align=center]Figure 1 Figure 2[/align] 1. Programming Technique Using Rising Edge Differential Instructions [align=center]Figure 3 Ladder Diagram Program Using Rising Edge Differential Instructions Figure 4 Ladder Diagram Program Using Set/Reset Instructions [/align] The ladder diagram program using rising edge differential instructions, as shown in Figure 3, has the following control process: When SB is pressed for the first time, X0 is turned on, energizing the coil of R0 for one scan cycle. Its normally open contact closes, energizing the coil of Y0 and locking it, thus starting the external load. Simultaneously, the normally open contact of Y0 closes, preparing for the coil of R1 to be energized. When SB is pressed for the second time, X0 is turned on, R0 is energized again for one scan cycle, the coil of R1 is energized, the normally closed contact of R1 opens, the coil of Y0 is disconnected, and the external load stops working. Repeatedly pressing SB will repeat the above control process. 2. Programming Technique Using Set/Reset Instructions The ladder diagram program using set/reset instructions is shown in Figure 4. The control process is as follows: When SB is pressed, X0 is turned on, the coil of R0 is turned on for one scan cycle, its normally open contact closes, R2 is set (closed) and held, one pair of normally open contacts of R2 closes, the coil of Y0 is turned on, and the external load starts to work; at the same time, the other pair of normally open contacts of R2 closes, preparing for the coil of R1 to turn on; when SB is pressed again, X0 is turned on, causing the coil of R0 to turn on again for one scan cycle, the coil of R1 is turned on, the normally open contact of R1 closes, R2 is reset (open) and held, the coil of Y0 is opened, and the external load stops working. Subsequent presses of SB result in the same operation. 3. Programming Techniques Using Counter Instructions Figure 5: Ladder Diagram Programming with Counter Instructions Figure 6: Ladder Diagram Programming with Timer Instructions The ladder diagram program using counter instructions is shown in Figure 5. From the figure, it can be seen that: When SB is pressed for the first time, X0 is activated for one scan cycle, CT100 counts once, and the coil of Y0 is activated and latched. When SB is pressed for the second time, X0 is activated again for one scan cycle, CT100 counts once more, accumulating two counts. Then, the normally closed contact of C100 opens, the coil of Y0 disconnects, and the normally open contact of C100 closes, resetting CT100 to prepare for the next count. Then a new cycle begins. 4. Programming Techniques Using Timer Instructions The ladder diagram program using timer instructions is shown in Figure 6. The timer TMR0 is set to 1, and the timing interval is 0.01s (the set value should be as small as possible to facilitate immediate stopping in case of abnormal situations after startup). As shown in Figure 6: When SB is pressed, X0 is activated for one scan cycle, and the coil of Y0 is set and activated. The normally open contact of Y0 causes timer TMR0 to start after timing for 0.01s. Its normally closed contact opens, while its normally open contact closes, preparing for the reset of Y0. When SB is pressed again, X0 is activated for another scan cycle. Since the normally open contacts of X0 and TMR0 are both activated, Y0 is reset, and the coil of Y0 is deactivated. This cycle repeats continuously. 5. Programming Technique Using Hold Instructions [align=center] Figure 7: Ladder Diagram Program Using Hold Instructions Figure 8: Ladder Diagram Program Using Shift Register Instructions [/align] The ladder diagram program using hold instructions, as shown in Figure 7, has the following control process: When SB is pressed, X0 is turned on, the coil of R0 is turned on for one scan cycle, the normally open contact of the set trigger signal R0 closes, setting KP, the coil of Y0 is turned on, and the normally open contact of Y0 closes, preparing for R1 to turn on; when SB is pressed again, X0 is turned on, the coil of R0 is turned on again for one scan cycle, the coil of R1 is also turned on for one scan cycle, the normally open contact of the reset signal R1 closes, resetting KP, and the coil of Y0 is turned off. Each time SB is pressed, the state of Y0 is reversed once. 6. Programming Techniques Using Shift Register Instructions The ladder diagram program using shift register instructions is shown in Figure 8. The figure shows a left shift operation of WR0 by 1 bit. Whether the shifted-in data is 0 or 1 is determined by the state of R0. The shift trigger signal is X0, and the normally open contact of the reset signal R1 is used. The working process is as follows: When SB is pressed for the first time, X0 is turned on. Since the normally closed contact of R0 (bit 0 of WR) is closed at the beginning, a signal is input to the shift register SR WR0. 1 is shifted into R0. The normally open contact of R0 is closed, and the coil of Y0 is turned on. At the same time, the normally closed contact of R0 is opened. When SB is pressed for the second time, X0 is turned on, and a signal is input to the left shift register SR WR0. SR WR0 shifts left by one bit, and 1 is shifted into R1. Since the normally closed contact of R0 is opened, 0 is shifted into R0. R0 is reset, the coil of Y0 is opened, the normally open contact of R1 is closed, and all 16 relay states of WR0 are 0. At this time, the circuit returns to its initial state, preparing for the next start. 7. Programming Technique Using Master Control MC/MCE Instructions [align=center] Figure 9: Ladder Diagram Program Using MC/MCR Instructions Figure 10: Ladder Diagram Programming with Basic Comparison Instructions [/align] The ladder diagram program using master control instructions is shown in Figure 9. The control process is as follows: When SB is pressed, X0 is turned on, entering the MC, MCE instruction program. Since the normally closed contact of Y0 is initially closed, the coil of R0 is turned on and self-locked. The normally closed contact of R0 breaks the interlock with the coil of R1. The normally open contact of R0 closes, the coil of Y0 is turned on and self-locked. After SB is released, the execution of the instruction program between MC and MCE ends, and R0 is reset. When SB is pressed again, X0 is turned on, and the MC, MCE instruction program is re-entered. Since the coil of Y0 is turned on, the circuit of the coil of R0 has been broken by the normally closed contact of Y0, and the coil of R0 is no longer turned on. The coil circuit of R1 is closed and self-locked by the normally open contact of Y0. When the normally closed contact of R1 opens, one pair of contacts disconnects the coil of Y0, while the other pair of contacts interlocks with the coil of R0. This prevents the erroneous control phenomenon of the coils of R0 and Y0 being reconnected after the normally closed contact of Y0 resets. After releasing SB, the execution of the instruction program between MC and MCE ends, and R1 resets. The control process of pressing SB sequentially thereafter is the same as described above. 8. Programming Techniques Using Basic Comparison Instructions The ladder diagram program using basic comparison instructions is shown in Figure 10. The control process is as follows: When SB is pressed, X0 is activated, triggering CT100 to count once. The count is decremented by 1. At this time, the value register EV100 = K1, energizing the coil of Y0. When SB is pressed again, X0 is activated, triggering CT100 to count once more, accumulating to two counts. The count is decremented by 1 again. At this time, the value register EV100 = K0, deactivating the coil of Y0. Simultaneously, the normally open contact C100 of CT100 closes, triggering CT100 to reset. Repeatedly pressing SB will repeat the above control process. 9. Programming Techniques Using Advanced Instructions In addition to basic logic control instructions, the PLC instruction system has a wealth of advanced instructions, which can easily implement various functions such as data transmission, arithmetic operations, comparison, transformation, shifting, and bit control. Familiarity with and appropriate application of advanced instructions in practice can greatly simplify the program, a feature unmatched by traditional relay control systems. As shown in Figure 11, a single instruction using the advanced instruction F132 (BTI) inverts bit 0 of WY0 (Y0) on each rising edge of X0, thus achieving the control requirement. [align=center] Figure 11 Ladder diagram program programmed using advanced instruction F132 (BTI)[/align] 10 Conclusion The programming techniques described above have proven to be practical. Because PLCs have a rich instruction set, programming is very simple and flexible. The same control requirements can be programmed using different instructions. Programmers need to continuously explore and improve their programming skills in practice to fully utilize the advantages of PLCs and achieve various control requirements. References: [1] Wang Zhaoyi, ed. Programmable Controller Technology Tutorial [M]. Beijing: Machinery Industry Press, 1998. [2] Chang Dounan, ed. Electrical Control and PLC [M]. Beijing: Machinery Industry Press, 1998. [3] Li Xiangdong, ed. Programmable Controller [M]. Beijing: Machinery Industry Press, 2007. [4] Panasonic Electric Works, Ltd. FP Series FP-M/FP Programming Manual [Z]. About the Author: Sun Keli, male, born in December 1968, Han nationality, from Taizhou, Jiangsu Province, works at Taizhou Electromechanical Higher Vocational Technical School, senior teacher, mainly engaged in teaching and research work in mechatronics, and has published many papers in provincial and above journals. Contact number: 13852863593, postal code: 225300