Data Processing Methods for Building Automation Based on Function Block Diagrams in PLCs

Data Processing Methods for Building Automation Based on Function Block Diagrams in PLCs

Click the blue text to follow!

Old Li Talks Technology: PLC Fault Diagnosis Matters

Data Processing Methods for Building Automation Based on Function Block Diagrams in PLCs

1

Emergency Faults in the Workshop

Hey Xiao Wang, do you remember that last week the injection molding machine in our workshop suddenly stopped? The production manager was in a panic, and when I went over, the operation screen was flashing with alarm messages. The new technician spent half a day flipping through the manual but couldn’t find the problem. In fact, with a little basic knowledge of PLCs, it could have been resolved in ten minutes.

The fault appeared to be an alarm from the temperature control unit, but the root cause was a small issue in the PLC program. We are using the Siemens S7-200 series PLC in our workshop, which is considered a “workhorse” in the industrial automation field. Once I connected the programmer and opened the status monitor, I immediately found that the analog reading from the temperature sensor was abnormal.

Data Processing Methods for Building Automation Based on Function Block Diagrams in PLCs

plc1

What is a PLC?

Before we rush into discussing faults, Xiao Wang, you just joined, so we need to first understand what a PLC is. A PLC is a Programmable Logic Controller, which you can think of as the “brain” of the factory. Its input terminals act like eyes and ears, collecting sensor signals; its output terminals act like hands and feet, controlling motors, valves, and other devices.

Don’t be intimidated by the technical jargon; essentially, a PLC replaces traditional relay control cabinets, using software instead of hardware wiring. Look at our workshop’s distribution cabinet; it used to be filled with relays, but now a small PLC does the job, saving space and reducing the likelihood of faults.

“When I first started in this field, I had to connect relays with wrenches and screwdrivers, and changing logic required rewiring, which was exhausting. Now, I can just sit at the computer and modify the program, which saves a lot of effort.”

Data Processing Methods for Building Automation Based on Function Block Diagrams in PLCs

2

Understanding Common Instructions

PLC programming mainly uses ladder diagram language, which looks like a series of ladders laid horizontally. There are three main types of commonly used instructions: contact instructions, coil instructions, and function instructions. Contact instructions act like switches, checking whether a certain condition is met; coil instructions act like light bulbs or motors, executing a certain action; function instructions include timers, counters, and other special functions.

The fault with the injection molding machine was due to the analog reading from the temperature sensor needing to undergo proportional calculations before it could be used. The program used a “multiplication” instruction, but the parameter settings were incorrect, leading to an excessively high calculated temperature value, which triggered the high-temperature protection.

I adjusted the proportional coefficient from 0.1 to 0.01, and the problem was immediately resolved. Xiao Wang, you see, this highlights the importance of understanding the function of instructions! Just copying programs isn’t enough; you need to understand what each instruction does.

Data Processing Methods for Building Automation Based on Function Block Diagrams in PLCs

3

Three Key Techniques for Fault Diagnosis

When it comes to PLC fault diagnosis, I have summarized three key techniques over the years:

First Technique: Check the Indicator Lights. Don’t underestimate those small lights on the PLC; they can reveal a lot of information. If the RUN light is off, it means the PLC is not running; if the ERR light is flashing, there may be a program error; the status of the I/O lights directly reflects the input and output conditions.

“Once, a boss urgently called me to his factory, saying the equipment was completely unresponsive. When I arrived on-site, I found that the PLC’s POWER light was off; it turned out the electrician had forgotten to reinstall the fuse after replacing it the day before. Such a simple problem took them a whole morning to figure out.”

Second Technique: Use the Programmer for Monitoring. By connecting to the computer and opening the status monitor, you can visually see the value changes at each address. Whether the input signals are detected and whether the outputs are functioning as expected becomes clear at a glance.

Xiao Wang, don’t think you can memorize all the instructions; that’s unrealistic. The key is to learn how to check the program’s running status and identify abnormal points. For example, if the temperature shows 100 degrees but is actually only 30 degrees, there must be an issue with the sensor or the calculation process.

Third Technique: Troubleshoot from Outside to Inside. PLC faults are sometimes not due to the PLC itself but rather to peripheral devices. First, check the power supply, then the sensors and actuators, and only then suspect the PLC program.

“I remember once a production line stopped inexplicably, and after replacing several sensors, it still didn’t work. Eventually, we discovered that the incoming voltage was unstable, causing the PLC to occasionally restart. If you only focus on the program, you’ll never find the cause.”

Data Processing Methods for Building Automation Based on Function Block Diagrams in PLCs

4

Sharing Practical Experience

Two months ago, the palletizing robot in the adjacent workshop was always mispositioning, and we suspected it was a problem with the servo motor. When I went to take a look, I found that the issue was with the settings of the counter in the PLC.

The program used the CTU instruction (Up Counter) to record pulse counts to control position, but it did not account for the situation of restarting after an emergency stop. I added a function to detect emergency stops and reset the counter, and the problem was resolved.

Xiao Wang, this highlights the importance of experience. PLC programs must consider handling various exceptional situations; you can’t just focus on the normal process. In case of a power outage, emergency stop, or sensor failure, the program should have corresponding handling mechanisms.

Data Processing Methods for Building Automation Based on Function Block Diagrams in PLCs

5

Old Li’s Advice

Learning PLCs isn’t difficult; the challenge lies in accumulating experience. Practice more, and don’t be afraid when encountering problems; step-by-step troubleshooting will always lead to the cause. Remember the three key techniques I mentioned, and you’ll be able to handle workshop equipment issues independently in the future.

By the way, don’t be overly reliant on foreign brands; domestic PLCs have made significant progress in recent years and are cheaper. The key is to grasp the principles; the brand is just a different shell, while the core is quite similar. Alright, it’s time to get off work; tomorrow I’ll teach you about PLC communication functions, which are crucial for connecting upstream and downstream devices!

Data Processing Methods for Building Automation Based on Function Block Diagrams in PLCs

Leave a Comment