1. PLC model and number of I/O points; select special function modules when there are special functional requirements.
2. Be familiar with the selected PLC programming instructions and compilation software.
3. Perform software component planning, including internal relays, holding relays, data registers, timers, counters, etc.
4. Program planning is generally carried out in the following order: fault extraction, fault handling, manual handling, automatic handling, and output processing. Larger projects or equipment are divided into functional units and blocks for processing. For example, an automated production line may contain elevators, transfer devices, lifting and rotating devices, etc., and should be programmed in the above-mentioned unit segments and blocks.
5. A brief segment comment should be added before each segmented or block-based program to explain its function. If necessary, the corresponding process flow can be noted. The order of the segmented or block-based programs in the overall program should basically follow the process flow sequence to facilitate program readability.
6. Before designing the program, the equipment should be abstracted, and common factors such as stop, emergency stop, overload, over-limit, timeout, safety light curtain, collision stop, and door switch should be extracted and placed in the start circuit or start main control and interlock circuit as the premise of the entire program structure. On this basis, the program is then divided into two major functional areas: automatic and manual.
7. Extract common factors in the manual function area of the program structure, such as manual control and factors endangering equipment and personal safety, and place them in the manual main control and interlocking loop to protect, shield, and alarm the manual control.
8. Extract common factors from the automatic function areas of the program structure, such as automatic, over-limit, and timeout factors, and place them in the automatic main control and interlocking loops to protect, shield, and alarm equipment under automatic control. A general principle is to strictly restrict equipment entry while loosely restricting equipment exit, ensuring safety.
9. The program should include a master reset function to facilitate quick and easy restoration of normal operation in case of equipment failure. The master reset function should fully consider the safety of both equipment and personnel during the reset process.
10. When switching from automatic mode to manual mode, the program should clear the output and intermediate states in automatic mode. In particular, when using the SET instruction in automatic mode, it must be cleared using the RESET instruction in manual mode.
11. Dual outputs are strictly prohibited in programming, meaning the same output statement or the same output coil must appear two or more times in the program. For outputs to the same point under different mode conditions, use intermediate relays for transfer, and finally combine them and list them to the output point.
12. When using a touch screen, the control area and status area shared by the touch screen and PLC shall not be used for programming other functions.
13. Before using special modules of a PLC, it should be determined whether their control area and status area occupy working words. If they do, these working words should not be programmed in any other way.
14. PLC inputs, outputs, intermediate relays, timers, counters, data registers, etc., must all have Chinese annotations. Inputs and outputs must also include the component name and tag number. Corresponding input points are generally assumed to be NO contacts connected to external switches; for those requiring NC contacts, this must be specified in the annotation. All annotations should be clear and unambiguous, avoiding misunderstandings, and minimizing the use of generic terms.
15. After the project is debugged, the final software program must be retained. The file name should include the project number, author, date information, version number, etc.
16. Regarding program encryption: The password for the encrypted program must be stored in a dedicated file, clearly indicating the corresponding username, password, and permissions. The file must be distributed to at least two people to learn the password, in order to prevent the program from becoming inaccessible due to password loss.