PLC programming is generally divided into the following steps:
1. programming preparations
Getting ready for a program is to understand the whole control system functionality, scale, control, input/output signals of type and quantity, special features of the interface and the relationship with the other device, contents and methods of communication, the entire concept of the control system as a whole. Then familiar with the controlled objects, objects and control functions in accordance with the control response, signal or control region, determine the physical location of devices and control devices, understanding of each signal and control signal form, function, size, and the relationship between.
2. Design block diagram
According to the General requirements specification and control system software design of the case, determine the application‘s basic structure and program structure diagram is drawn according to procedure design criteria and according to technological requirements, sketch of the function flow chart of functional units.
3. write a program
According to the design diagram detailed written control procedures. Written comment process in time to the program.
4. program debugging
When debugging starts from the various functional units, set the input signal, observe the changes of the output signal. Each functional unit after debugging is complete, and then debug all programs, parts of the debug interface, until you‘re satisfied. Program debugging can be performed in the laboratory or in the field. If you test at the scene, programmable controller system must be isolated from the signal, you can cut off the external power supply input/output template, to avoid a mechanical device. Errors found during the program and after the correction. Basic principles “focus error is found, directed to the correction of error“.
5. writing documentation
Usually in the manual control of the program requirements, program structure, flow chart gives the necessary instructions and to give the program the installation steps.