Detailed Explanation of PLC Control System Project Development Process

Detailed Explanation of PLC Control System Project Development Process

In today’s rapidly developing era of industrial automation, PLC (Programmable Logic Controller) has become the core control device in the field of industrial automation due to its powerful functions, high reliability, and flexibility. For engineers new to the industry, mastering the PLC control system project development process is a crucial step into this field. A standardized and systematic development process not only ensures the smooth progress of the project but is also an important guarantee for the successful delivery of the project. This article will comprehensively outline the complete process of PLC control system development, combining practical development documents and rich engineering experience, and provide practical solutions to common problems that novice engineers may encounter during the development process, helping engineers quickly grasp the key points of development and take solid steps in the field of PLC control system development.

1. Overview of the Development Process

PLC control system development is a tightly linked process that can be clearly divided into six major stages, each with clear objectives and key tasks, collectively constructing a complete path from project initiation to final stable operation.

Control Function Investigation: This stage is the foundation of the entire project, aiming to deeply understand the process of the controlled object, clarify control requirements, and accurately define system boundaries. System Design and Hardware Configuration: Based on the results of the control function investigation, complete hardware selection and circuit design work to ensure that the hardware system can stably and efficiently support the operation of the entire control system. Program Planning: Carefully design the program architecture, reasonably divide functional modules, and clearly define the interfaces between each functional module, laying a good foundation for subsequent program writing. Program Editing: Use appropriate programming languages to convert the design ideas from the program planning stage into executable PLC programs, and add detailed and accurate comments to improve the readability and maintainability of the program. System Simulation Operation: In a non-field environment, verify the correctness of the program logic by simulating input signals, identify and resolve potential basic errors, and reduce the difficulty and risk of on-site debugging. On-site Debugging and Operation: Deploy the developed PLC control system to the actual site, conduct I/O wiring tests, program optimizations, and document organization to achieve stable system operation and complete the final documentation archiving of the project.

2. Detailed Explanation by Stage and Practical Points

1. Control Function Investigation

Objective

Clarify control requirements and define system boundaries to provide accurate basis for subsequent system design and development. The quality of work in this stage directly affects the direction of the entire project; if the requirements are unclear, it may lead to repeated rework in subsequent designs, severely impacting project progress and costs.

Key Steps

Analyze the process of the controlled object: In-depth study of the timing of mechanical actions of the controlled object, for example, in an automated assembly line, the start, run, stop sequence of various mechanical components and their collaborative relationships. At the same time, carefully identify the types of sensor signals; different types of sensors (such as temperature sensors, pressure sensors, position sensors, etc.) output different signal forms and characteristics, accurately grasping this information is crucial for subsequent hardware selection and program design.

Draw work cycle diagrams or state flow charts: It is recommended to use UML state diagrams or Grafcet diagrams. For example, in a simple automatic door control system, using a UML state diagram can clearly show the transition relationships between the door being closed, opened, and in operation, as well as the events that trigger state transitions (such as button presses, infrared sensors detecting a person, etc.). Grafcet diagrams intuitively describe the system’s workflow through the combination of steps, transition conditions, and actions, helping engineers better understand and design control logic.

Determine control methods: Based on actual needs, determine whether to use automatic, semi-automatic, or manual control methods, and whether the system operates independently or needs to be networked with other devices. For example, in some small devices, manual control may be sufficient; while in large automated factories, networked automated control of devices is often required to improve production efficiency and management levels.

Common Issues

Vague requirements are the most common issue in this stage. Since industrial projects involve multiple professional fields, there may be communication barriers or inconsistent understanding of certain concepts between the process department and electrical control engineers, leading to unclear control requirements, and when problems are discovered in subsequent design processes, a lot of rework may be necessary.

Solution Strategies

Establish a close communication mechanism with the process department to repeatedly confirm control requirements. Using a “Requirement Confirmation Form” is a very effective method, listing all requirements in detail, including specific action requirements of the controlled object, types and installation locations of sensors and actuators, specific requirements for control methods, etc., to be signed off by both the process department and electrical control engineers, ensuring that both parties have a complete understanding of the requirements, thus avoiding issues caused by vague requirements from the outset.

2. System Design and Hardware Configuration

Objective

Complete hardware selection and circuit design, building a stable, reliable, high-performance, and cost-effective hardware platform to provide a solid physical foundation for the operation of the PLC control system.

Key Steps

I/O point statistics: Accurately count the number of inputs (sensors, buttons) and outputs (actuators, indicator lights). During the counting process, be sure to reserve 15% – 20% of the margin. For example, in a medium-sized automated production line, it may involve hundreds of input and output points. If no margin is reserved, during later project debugging or functional expansion, if it is found that the number of I/O points is insufficient, it will require re-selection and replacement of hardware devices, which not only increases costs but also delays project progress.

PLC selection

Select the host model based on the I/O point count: Different brands and series of PLC host models have different I/O point specifications. For example, the Mitsubishi FX series has various models available, including 16 points, 32 points, 64 points, 128 points, etc. Engineers need to select the appropriate host model based on the counted I/O point count, combined with the reserved margin. If the I/O point count is small and the budget is limited, a small 16-point or 32-point host can be selected; if the I/O point count is large, a model with more points must be selected.

Match expansion modules: Under the premise of meeting control requirements, reasonably match expansion modules to reduce costs. For example, the Mitsubishi FX2N – 16EX expansion module can be used to add 16 input points. If the host’s input point count is insufficient, and adding points through expansion modules is cheaper than replacing with a larger point count host, then adding expansion modules can be chosen as a solution.

Consider communication needs: As industrial automation develops towards intelligence and networking, communication functions are becoming increasingly important. Based on whether the system needs to interact with upper-level computers (such as monitoring computers), other PLC devices, or smart instruments for data exchange, select a PLC host or expansion module with corresponding communication interfaces (such as Ethernet, RS485). For example, in a system that requires real-time monitoring of production data and remote control, an Ethernet interface is essential.

Circuit design

Add circuit breakers and isolation transformers to the input power supply: Circuit breakers can quickly cut off power in case of overload, short circuit, and other faults, protecting equipment and personnel safety. Isolation transformers can effectively isolate interference signals in the power grid, improving the system’s anti-interference capability. For example, in a PLC control system installed in an industrial environment, the electromagnetic interference in the industrial site is quite complex. By adding isolation transformers, the interference introduced by the power supply can be greatly reduced, ensuring stable operation of the PLC system.

Inductive loads require parallel freewheeling diodes (DC) or RC snubber circuits (AC): Inductive loads (such as relays, contactors, solenoids, etc.) generate back electromotive force at the moment of switching, which may damage the output module of the PLC. For DC inductive loads, parallel freewheeling diodes can provide a release circuit for back electromotive force; for AC inductive loads, RC snubber circuits need to be used in parallel to suppress back electromotive force and protect the PLC output module.

Practical Tips

Create an “I/O Allocation Table”: Group all input and output points by type, such as buttons, sensors, actuators, indicator lights, etc. In the table, record the name of each point, corresponding physical interface, functional description, and other information in detail. This way, during programming and later maintenance, engineers can quickly and accurately find the required I/O points, greatly improving work efficiency.

Refer to manufacturer manuals: Different brands and models of PLC and their expansion modules have differences in electrical parameters, interface definitions, installation methods, etc. During selection and circuit design, be sure to carefully refer to the manuals provided by the manufacturer to avoid serious errors such as mismatching module voltage levels (e.g., mistakenly connecting a 24V input module to a 220V power supply).

3. Program Planning

Objective

Design a reasonable program architecture, dividing the functions of the entire control system into multiple independent functional modules, and clearly defining the interfaces between each functional module, making the program highly readable, maintainable, and extensible.

Key Steps

Divide functional blocks: Based on the functional requirements of the control system, divide the program into multiple functional blocks. Common functional blocks include initialization modules for initializing parameters and devices at system startup; manual control modules for allowing operators to manually operate devices during debugging or special situations; automatic cycle modules for enabling devices to run automatically according to predetermined processes; and fault handling modules for timely detection, alarm, and response measures when faults occur in the system.

Design program flowcharts: By drawing program flowcharts, clarify the signal interaction relationships between functional modules, such as interlocking mechanisms (to prevent two or more conflicting actions from executing simultaneously), state transition conditions, etc. For example, in a simple motor forward and reverse control system, the program flowchart can clearly show the transition conditions between the motor’s forward, reverse, and stop states, as well as the interlocking logic between forward and reverse, ensuring the safety and stability of the motor during operation.

Common Issues

High coupling between modules is a common problem during the program planning stage. If the connections between various functional modules are too tight and the degree of interdependence is too high, once a problem occurs in one module during debugging, it may affect the normal operation of other modules, increasing debugging difficulty and time costs.

Solution Strategies

Adopt a modular programming approach; different brands of PLC have different implementations of modular programming. For example, Siemens S7 – 1200 allows the use of FB (Function Block) and FC (Function) blocks for programming. Encapsulate program code with specific functions in FB or FC blocks, and define input and output parameters to achieve communication and data exchange between modules. This way, each module is relatively independent, with a single function, greatly improving maintainability and reusability. For example, encapsulating motor control functionality in a FB block allows it to be directly called in other projects with similar motor control needs, reducing the need to rewrite code.

4. Program Editing

Objective

Use appropriate programming languages to convert the logic designed in the program planning stage into executable program code in the PLC, and add detailed and accurate comments to make the program easy to understand and maintain.

Key Steps

Use Ladder Diagram (LAD) or Structured Text (ST) to write logic: Ladder Diagram is a programming language similar to relay control circuits, intuitive and easy to understand, making it easy for engineers with an electrical control background to get started. For example, in a simple motor start-stop control program, using Ladder Diagram can implement the start, stop, and protection logic of the motor using normally open contacts, normally closed contacts, coils, and other elements, just like drawing a relay control circuit diagram. Structured Text is similar to high-level programming languages (such as C language), with stronger logical expression capabilities, suitable for writing complex algorithms and logic control programs. In projects requiring extensive data processing and complex calculations, Structured Text can better demonstrate its advantages.

Add detailed comments: Add comments at key positions in the program, explaining the source of signals, logical functions, and the role of program segments, etc. For example, before a program segment that processes sensor signals, the comment may state that this sensor is used to detect a specific position of the device, and when the sensor signal is high, it indicates that the device is in a specific state. This way, during later maintenance and debugging, engineers can quickly understand the program’s functionality and logic.

Practical Tips

Debugging Tags: Insert “debugging tags” at key nodes in the program, for example, using an intermediate relay (such as M0.0) as a manual mode flag. During debugging, the status of this debugging tag can be monitored to quickly determine whether the program has entered manual mode as expected, facilitating program debugging and fault diagnosis.

Version Management: Using version management tools is crucial for PLC program development. General version management tools like Git can be used to include PLC programs in the version management system. The version management function provided by the PLC manufacturer’s software can also be used to regularly save historical versions of the program. This way, if code is accidentally deleted or if the program encounters issues requiring a rollback to a previous version during development, the corresponding historical version can be easily found, avoiding losses due to code loss or erroneous modifications.

5. System Simulation Operation

Objective

Before setting up the actual site environment, verify the correctness of the program logic by simulating input signals, identifying and eliminating basic errors in the program, reducing the difficulty and risk of on-site debugging, and improving the success rate of the project.

Key Steps

Use switches to simulate input signals: Use ordinary switches (such as push buttons, toggle switches, etc.) to simulate actual input signals, such as sensor signals, button signals, etc. For example, when simulating a temperature sensor signal, a toggle switch can be used to simulate the high and low level outputs of the temperature sensor, testing the program’s response to different temperature states by operating the switch.

Monitor output status through PLC indicators or upper-level computer: PLC is usually equipped with indicators to indicate the status of output points. By observing the on/off status of the indicators, one can intuitively judge whether the program’s output is correct. For more complex systems, communication can be established between the upper-level computer (such as monitoring computers) and the PLC, allowing real-time monitoring of the PLC‘s output status and enabling more detailed data analysis and fault diagnosis through the upper-level computer interface.

Common Issues

Differences between the simulated environment and the actual site may lead to the inability to detect some issues that only occur in the actual site during the simulation operation. For example, electromagnetic interference in the field, noise in sensor signals, fluctuations in power supply, etc., may be difficult to fully simulate in the simulated environment, resulting in missed tests.

Solution Strategies

To minimize the differences between the simulated environment and the actual site, it is necessary to simulate extreme working conditions during the simulation operation. For example, simulate the jitter of sensor signals by rapidly and frequently switching the simulated input switch to observe the program’s handling capability for unstable signals; simulate power fluctuations using specialized power simulators to adjust the amplitude and frequency of the power supply within a certain range, testing the program’s stability under different power conditions. By simulating these extreme working conditions, more potential issues can be discovered, and timely optimizations and improvements can be made to the program.

6. On-site Debugging and Operation

Objective

Deploy the developed PLC control system to the actual site, conducting tests on I/O wiring, optimizing program response times, and organizing technical documentation to achieve stable system operation and complete the final documentation archiving work of the project, providing complete material support for subsequent system maintenance and upgrades.

Key Steps

Test I/O wiring item by item: Use a multimeter to conduct comprehensive and detailed continuity measurements on the I/O wiring, ensuring that each wire is connected correctly and reliably. In actual engineering, due to the complexity of on-site wiring, issues such as wiring errors and looseness may occur. Through strict wiring tests, these issues can be identified and resolved in a timely manner, avoiding system failures caused by wiring problems.

Optimize program response time: During actual on-site operation, optimize the program’s response time based on the system’s real-time performance requirements. For example, by reasonably adjusting the PLC‘s scan cycle, reducing unnecessary program loop counts, improving the execution efficiency of the program, thereby shortening the system’s response time to external signals, meeting the requirements of the production process.

Organize technical documentation: Organize technical documentation including electrical diagrams (such as schematics, wiring diagrams), commented programs (with detailed comments in the PLC program code), operation manuals (guiding operators on how to correctly use and maintain the system), etc. These documents are important references for the later maintenance and upgrades of the system, and their accuracy and completeness must be ensured.

Practical Tips

Fault Tracking: Fully utilize the online monitoring function of the PLC to monitor the status changes of various signals in the system in real-time. When a fault occurs in the system, quickly locate the position and cause of the signal anomaly by checking the online monitoring data of the PLC. For example, if an actuator does not operate as expected, the online monitoring can show the status of the corresponding output point and whether the related input signals are normal, allowing for rapid fault diagnosis.

Safety First: Before on-site debugging, be sure to disconnect the main power supply to ensure the safety of debugging personnel. Debugging personnel should wear insulated gear, such as insulated gloves and shoes, to prevent electric shock accidents. When performing live operations on equipment, strictly follow electrical safety operating procedures and set clear warning signs to prevent misoperation that could lead to safety accidents.

3. Summary and Recommendations

Core Principles

Clear Requirements: Ensure that requirements are clear and accurate during the control function investigation stage, fully communicate with relevant parties such as the process department, and avoid rework due to vague requirements.

Modular Design: During program planning and writing, adopt a modular programming approach, dividing system functions into independent functional modules to improve code reusability, maintainability, and extensibility.

Stage-by-Stage Verification: Each stage from control function investigation to on-site debugging and operation should undergo strict verification and testing to timely discover and resolve issues, ensuring smooth project progress.

Pitfall Guide

Leave Margin in Hardware Configuration: During I/O point statistics and PLC selection, always reserve enough margin to accommodate potential functional expansions and changes in the future.

Software Comments Must Be Detailed: In the program editing stage, detailed and accurate comments are key to improving program readability and maintainability, facilitating understanding and modification by oneself and others in the future.

Simulation Debugging Must Be Rigorous: During the system simulation operation stage, strive to simulate various working conditions of the actual site, including extreme conditions, to avoid missed testing issues due to differences between the simulated environment and the site.

Never Neglect On-Site Safety: During on-site debugging, safety is the primary consideration. Strictly follow electrical safety operating procedures to ensure the safety of personnel and equipment.

Extended Learning

Study the IEC 61131-3 Standard: This standard defines the unified specifications for PLC programming and various programming languages. Learning it can broaden programming ideas, improve programming skills, and better adapt to the development needs of different brands of PLC.

Refer to Industry Cases: Study and learn from industry cases such as packaging machines and assembly line control to understand the design ideas, problem-solving methods, and precautions in different application scenarios of PLC control systems, accumulating project experience and enhancing practical development capabilities.

Through a systematic development process and practical skills, novice engineers can quickly grasp the essence of PLC control system development, continuously accumulate experience in practice, and gradually grow into automation experts capable of handling projects independently, contributing their strength to the development of industrial automation.

– Classic Textbook: “PLC Programming and Applications” (by Liao Changchu).

Detailed Explanation of PLC Control System Project Development Process

Detailed Explanation of PLC Control System Project Development Process

Long press—select “Recognize the QR code in the image” to follow

Leave a Comment