The scientific PLC programming steps are actually very simple, but most engineers often think 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. PLC programming also has its own rules. (For reference only)
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 mechanisms are most likely to collide, and how to solve the problem when danger occurs. These most fatal problems are in the safety rules. Why not read them? In addition, the characteristics, usage methods, and debugging methods of each component of the equipment are also in the manual. If you don’t read them, even if the program is correct, if the components are not debugged well, the equipment will not work. In addition, all circuit diagrams, pneumatic and hydraulic circuit diagrams, and assembly drawings are also in the manual. If you don’t read them, how can you know what kind of transformation can be done for each component?
According to the manual, check the I/O
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 points, the general input signals are nothing more than various sensors, such as capacitors, inductors, photoelectric, piezoresistive, ultrasonic, magnetic 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 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 electric drive product, the actuator driver must be powered on in a safe situation, especially under the premise of ensuring that the equipment will not be hit, to check whether the actuator can move. If it is a hydraulic or pneumatic actuator, the reversing valve must be powered on manually in a safe situation to control the actuator. When checking the output signal, no matter what the actuator drive method is, it must be based on the component manual. First, ensure the safety of the equipment and personnel. Note that not all equipment actuators can be powered on for testing, so sometimes individual output signals may not be tested manually. Whether it is an input or output device, when the sensor has a signal or the actuator drive device is powered on, it is necessary to check whether the I/O module indicator on the PLC is also on. 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.
After measuring the input and output signals, you should also 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 at this time, it cannot be guaranteed that the address provided by the manufacturer is correct.
Open the programming software and configure the hardware
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.
Write a program flow chart
Before programming, be sure to write out the program's 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 established 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 personnel.
Writing programs in 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. It must be ensured that under any circumstances, as long as the stop or emergency stop procedures are executed, the equipment will never cause harm to people.
Debugging Programs
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 see whether the program is correct for many cumbersome programs. 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 in place. If you are sure that the sensor is correct, then modify the program.
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.
Save 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 error, upload the program to the PC and burn it to the CD. All of the above is for safety.
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:EtherCAT motion control: RTSys controller monitoring and setting principle
Next article:Introduction to Mitsubishi Electric SiC power devices of different voltage and power levels
Recommended ReadingLatest update time:2024-11-16 09:23
- 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
- Simplifying Voltage and Current Measurements in Battery Test Equipment
- Knowledge about op amp and bandwidth
- [MM32 eMiniBoard Review] + SysTick Second Timer
- DSP realizes the source code of the water light style
- Controlling Hardware with Python - Low Voltage Startup and Reliability Testing
- HDB3 Codec Design Based on FPGA.pdf
- Data sharing on the transmission power of 2.4G wireless RF chip CC2530
- A talented person actually analyzed power MOS like this, it is very rare information!
- MicroPython has made several adjustments to USB functions
- Commonly used algorithms for drones - Kalman filter (IV)