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.
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.
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.
Previous article:What is DNC? Can an Industrial IoT Gateway do it?
Next article:Application of frequency converter in centrifugal circulating compressor
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- rk3568+rk809+sc8886 +linux battery kernel configuration and battery curve graph
- High-pass, low-pass, band-pass, band-stop filters, notch filters, frequency selection circuits
- How to highlight a network in KiCad
- Hardware outlet] RK3399 realizes dual network ports
- Lora rate comparison table
- RS485 communication interface problem
- Summary of the Beginner's Guide to 28335
- Matlab Machine Learning (English and Chinese subtitles)
- 【NXP Rapid IoT Review】+Preparation for Data Download
- [ST60 short-distance test] Part 3: Analysis of obstacles and application scenarios