Nine essential steps in PLC programming

Publisher:lambda21Latest update time:2022-11-27 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The scientific PLC programming steps are actually very simple, but most engineers often think that it is simple and ignore many details. Ignoring details will inevitably lead to problems in the future. To avoid future problems, you can only follow the rules well. There is no order without rules, and PLC programming also has its own rules.


Step 1: Read the product manual

The first step seems simple enough, but many engineers cannot do it. They think this step is a waste of time, or even only learn about the equipment through supplier training.


Reading the manual carefully is the first step in programming. First, you need to read the safety rules to know which actuators may cause harm to people, which actuators are most likely to collide with each other, and how to solve the problem when danger occurs. These most fatal problems are all in the safety rules. Why not read them?


In addition, the characteristics, usage and debugging methods of each component of the equipment are also in the manual. If you don't read it, even if the program is correct, if the component is not debugged properly, the equipment will not work. In addition, all the circuit diagrams, pneumatic and hydraulic circuit diagrams, and assembly drawings are also in the manual. If you don't read it, how can you know what kind of modification can be done for each component?


Step 2: Check the I/O according to the instructions

Checking I/O is commonly known as "dotting". There are many ways to check I/O, but you must check them one by one according to the addresses provided in the manual and check them under absolutely safe conditions.


When checking the input point, the general input signal is nothing more than various sensors, such as capacitance, inductance, photoelectric, piezoresistive, ultrasonic, magnetic induction and travel switch. Checking these components is relatively simple. According to the component instructions, place the workpiece on the workstation, or move the actuator to check whether the sensor has a signal. Of course, different equipment may have different detection methods, which depends on the specific situation.


However, you must be extra careful when checking the output signal. If it is an electrically driven product, you must energize the actuator driver under safe conditions, especially under the premise of ensuring that the equipment will not be hit, and check whether the actuator can move. If it is a hydraulic or pneumatic actuator, you must also manually energize the reversing valve under safe conditions to control the actuator. When checking the output signal, no matter what the actuator drive method is, you must follow the component manual and first ensure the safety of the equipment and personnel. Note that not all actuators of all equipment can be powered on for testing, so sometimes individual output signals may not be able to be tested manually.


Whether it is an input or output device, when the sensor has a signal or the actuator drive device is powered, you must also check whether the I/O module indicator on the PLC is also lit. In many devices, the input and output signals are connected to the PLC through the wiring terminal. Sometimes the indicator light of the wiring terminal has a signal, but it cannot be guaranteed that the corresponding address on the PLC has no signal connected due to the internal circuit of the connecting wire. Pay special attention to this point.


After measuring the input and output signals, record the measured address to ensure that the signal address is consistent with the instruction manual. If there is a difference, measure the device address again. If it is still inconsistent after multiple measurements, contact the device manufacturer first, because there is no guarantee that the address provided by the manufacturer is correct.

2ce3b98c-6be0-11ed-8abf-dac502259ad0.jpg

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 hardware configuration and corresponding communication configuration according to the actual PLC type. After the hardware configuration is completed, write the I/O address previously recorded on paper in the symbol table of the software. Due to different software, the definition of the symbol table may be different, but general software has this function, and this step is crucial. When writing the symbol table, not only should the absolute address of the input and output of the device be written correctly, but it is also best to name each address and add comments, which will be very convenient for subsequent programming. There is no need to query the absolute address every time when programming, just fill in the named name. Of course, this also depends on whether the software has this function.


Step 4: Write a program flow chart

Before programming, be sure to write out the program flowchart on the 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, one program is a block, and each block can be called as needed.


PLC is best at handling sequential control. In sequential control, the main process is the core. Make sure that the process is correct and check it carefully on the draft. If there is a problem with the main process, when the program is executed by the PLC, it is likely to cause a collision, damage the equipment or cause danger to people.


Step 5: Write a program in the software

After ensuring that there are no problems with the main process, you can write the program in the software. In addition, you must also 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 must not be underestimated. Make sure that under any circumstances, as long as the stop or emergency stop procedures are executed, the equipment will never cause harm to people. It is recommended that you follow the WeChat account Jicheng Training.

2d0546ba-6be0-11ed-8abf-dac502259ad0.jpg

Step 6: Debug the program

In the step of debugging the program, it can be divided into two aspects.

1. If conditions permit, or if you have strong logical ability, you can use the simulation function of the software to test first, but it is difficult to use software simulation to determine whether many complicated programs are correct.

2. Download the program to the PLC for online debugging. If the device does not move or an abnormal situation occurs during operation, do not modify the program first. It is likely that the sensor has not been debugged properly. If you are sure that the sensor is correct, then modify the program.


Step 7: After debugging is completed, edit the program again

In the previous step of debugging, since the program has been modified, it is necessary to check or edit the program as a whole again, and then download the final program to the PLC.


Step 8: Save the program

In this step, we need to pay attention to one question, that is, where should the program be saved? PC hard disk? Flash device? Mobile hard disk? Of course, none of these are allowed, as all these storage devices may be infected with viruses. Therefore, the program must and can only be burned to a CD. And there is another question, which program is burned? Previously, we have downloaded the final debugged and modified program to the PLC. If the PLC executes the program without any errors, we will upload the program to the PC and burn it to the CD.


Everything above is for safety.

Step 9: Fill out the report

After completing the programming, you should fill out the final debugging report, recording the problems you encountered and some difficult problems of the program one by one. Because after a long time, you will forget some of the skills of the program, and it will also make it easier for other colleagues to understand the program you wrote.


Reference address:Nine essential steps in PLC programming

Previous article:What is DNC? Can an Industrial IoT Gateway do it?
Next article:Application of frequency converter in centrifugal circulating compressor

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号