Search
The scientific PLC programming steps are actually very simple, but often most engineers consider them simple and overlook many details. Neglecting details will inevitably lead to problems in the future. To avoid future problems, only by following the rules well can we avoid them. Nothing can be accomplished without norms or standards, and PLC programming also has its own rules.
The following nine steps are for reference.
Step 1: Read the product manual
The first step may seem simple enough, but many engineers cannot do it. Believing that this step is a waste of time, even relying solely on supplier training to understand the equipment.
Carefully reading the instruction manual is the first step in programming. The first step is to read the safety regulations, know which executing mechanisms may cause personal injury, which mechanisms are most prone to collisions, and how to solve the most fatal problems when danger occurs. These are all in the safety regulations, why not look?
In addition, the characteristics, usage, and debugging methods of each component of the equipment are also included in the manual. Even if the program is correct, if the components are not properly debugged, the equipment will still not work. Furthermore, all circuit diagrams, pneumatic hydraulic circuit diagrams, and assembly drawings are also included in the manual. Without reading them, how can one know what modifications can be made to each component.
Step 2: Check the I/O according to the manual
Check I/O, commonly known as "management". There are many ways to check I/O, but it is necessary to check them in order according to the addresses provided in the manual, and in an absolutely safe situation.
When checking input points, the general input signals are various sensors, such as capacitors, inductors, optoelectronic, piezoresistive, ultrasonic, magnetic induction, and travel switches. Checking these components is relatively simple. According to the component instructions, place the workpiece on the workstation or move the actuator to check if there is a signal from the sensor. Of course, the detection methods for different devices may vary depending on the specific situation.
But be extra careful when checking the output signal. If it is an electric drive product, it is necessary to power on the actuator drive under safe conditions, especially to ensure that the equipment does not collide, and check whether the actuator can move. If it is a hydraulic or pneumatic actuator, manually power on the directional valve under safe conditions to control the actuator. When checking the output signal, regardless of the driving mode of the actuator, it is necessary to follow the component manual to ensure the safety of the equipment and personnel. It should be noted that not all actuators of the equipment can be powered on for testing, so sometimes individual output signals may not be able to be manually tested.
Whether it is an input or output device, when the sensor has a signal or the driving device of the actuator is powered on, it is necessary to simultaneously check whether the I/O module indicator light on the PLC is also on. In many devices, the input and output signals are connected to the PLC through wiring terminals. Sometimes, the indicator light of the wiring terminal has a signal, but it cannot be guaranteed that due to an internal open circuit in the connecting wire, there is no signal connected to the corresponding address on the PLC. This requires special attention.
After measuring the input and output signals, the measured address should be recorded simultaneously to ensure that the signal address is consistent with the instructions. If there are differences, measure the equipment address again. If the measurement is still inconsistent multiple times, contact the equipment manufacturer first because at this time, it cannot be guaranteed that the address provided by the manufacturer is correct.
Step 3: Open the programming software, configure the hardware, and write the I/O address in the symbol table
Different PLCs use different programming software. However, for any software, the first step before programming is to configure the hardware and establish the corresponding communication configuration based on the actual PLC type. After the hardware configuration is completed, write the I/O addresses previously recorded on paper in the software's symbol table. Due to different software, the definition of symbol tables may vary, but general software has this function, and this step is crucial. When writing a symbol table, it is not only important to write the absolute addresses of device input and output correctly, but also to name and add comments to each address, which will be very convenient for future programming. You don't need to query the absolute address every time during programming, just fill in the named name. Of course,it also depends on whether the software has this feature.
Step 4: Write a program flowchart
Before programming, it is important to write a flowchart of the program on a draft. A complete program should include the main program, stop program, emergency stop program, reset program, and other parts. If the software allows, each program should be written in the form of "blocks", that is, a program is a block, and ultimately each block can be called as needed.
PLC is best at handling sequential control, where the main process is the core. It is important to ensure that the established process is correct and carefully check it on the draft. If there are problems with the main program, it is very likely that the program will collide, damage the equipment, or pose a danger to personnel after being executed by the PLC.
Step 5: Write a program in the software
Once there are no issues with the main process, you can write the program in the software. In addition, it is important to pay attention to the correctness of the stop, emergency stop, and reset procedures, especially the stop and emergency stop procedures, which are the most important procedures related to personal safety and equipment safety and cannot be underestimated. It is important to ensure that under any circumstances, as long as the stop or emergency stop program is executed, the equipment will never cause harm to personnel.
Step 6: Debugging the program
In the step of debugging the program, it can be divided into two aspects.
1. If conditions permit, or if your logical ability is strong, you can first use the simulation function of the software to test, but many cumbersome programs are difficult to use software simulation to see if the program is correct.
2.Download the program to the PLC for online debugging. If the device does not move or there are abnormal situations during operation, do not modify the program first. It is likely that the sensor has not been debugged properly. If the sensor is correct, then modify the program.
Step 7: After debugging is completed, edit the program again
In the previous debugging step, due to modifications made to the program, it was necessary to check or edit the entire program again, and then download the final program to the PLC.
Step 8: Save the program
In this step, one question to note is where should the program be saved? PC hard drive? Flash device? mobile hard disk drive? Of course, none of these are possible. All these storage devices may be infected with viruses. So, it is necessary and only possible to burn the program onto a CD. And there is another question, which program is the firing program? Previously, we have downloaded the final debugging and modification program to the PLC. If the PLC is completely correct when executing the program, we will upload the program to the PC and burn it onto a CD. Everything above is for safety.
Step 9: Fill out the report
After completing the programming, the final debugging report should be filled out, and the problems encountered and some difficult issues in the program should be recorded one by one. Because after a long time, I will also forget some techniques of the program, and it will also facilitate other colleagues to understand the program you have written.
Our company Rockss Automation have a variety of inventory and different brands of products to choose from. Our vast inventory includes products from various well-known brands, all of which are easily accessible and easy to search for. Whether you're looking for machinery, equipment, or tools, our company has got you covered.
Choose from our extensive range of high-quality, reliable products, and experience the convenience of having everything you need in one place. From sourcing to delivery, our expert team will be with you every step of the way, ensuring a smooth and hassle-free experience.