Introduction to PLC Analog Control: S7-200 SMART

Hello everyone, I am Ming Ge. Today, let’s talk about analog control with the S7-200 SMART PLC. Many friends find analog signals mysterious when they first encounter PLCs; in fact, they are just like the dimmer switches in our lives, not strictly black and white, but capable of precise adjustments. Now, let’s unveil the mystery of analog signals and see how they shine in industrial control.

What is an Analog Signal?

Simply put, an analog signal is a signal that can change continuously. For example, when we adjust the volume on a speaker, it changes continuously from low to high, which is a typical analog signal. In industrial control, common analog signals include voltage signals (such as 0-10V) and current signals (such as 4-20mA).

In contrast, digital signals are like regular switches, which only have two states: on and off. Digital signals correspond to input and output points in a PLC, while analog signals require special analog modules to process.

Analog Module of S7-200 SMART

The S7-200 SMART series PLC offers various analog modules, with the most commonly used being the EM AM06 (4 inputs/2 outputs). It acts like the ears and mouth of the PLC, able to “hear” external analog signals and “speak” analog signals to control devices.

Note: When selecting a module, pay attention to whether the signal type (voltage/current) and range match your needs.

Wiring Diagram for Analog Signals

Wiring is a common area where many beginners make mistakes. Below is a simplified wiring diagram:

Sensor --> +   EM AM06 Input   - --> Ground
         |                   |
         V(0-10V) or I(4-20mA) |

EM AM06 Output --> +   Actuator   - --> Ground
              |           |
              V(0-10V)    |

Key Reminders:

  1. Current input requires external power supply
  2. Voltage output does not require external power
  3. All ground wires should be connected together

PLC Program Example

Suppose we want to read the value of a temperature sensor (0-100℃ corresponding to 0-10V) and control a valve opening based on the temperature (0-100% corresponding to 0-10V). Below is a simple ladder diagram program:

|   Power On Detect Temperature      Get Temperature Value
|-----[ ]------------------[ MOVE_W ]--------|
|     SM0.1     /Analog Input/     /100℃ /  |
|                   AIW0            VW100   |
|                                           |
|   Convert Temperature to Percentage                        
|-----[ MUL_R ]-----------------------------------|
|     VW100    /100.0/     /100/     /0.0/       |
|      IN1       IN2        OUT       OUT_RET    |
|                           VW102     VD106      |
|                                                |
|   Control Valve Opening                                 |
|-----[ MOVE_W ]----------------------------------|
|     VW102    /Analog Output/                   |
|              AQW0                              |

Let me explain this program:

  1. First, we read the analog input value from AIW0 (0-27648 corresponding to 0-10V)
  2. Convert the read value to actual temperature (0-27648 mapped to 0-100℃)
  3. Convert the temperature value to a percentage
  4. Finally, output the percentage value to AQW0 to control the valve (0-27648 corresponding to 0-10V)

Note: The range of analog values is 0-27648, which is the standard for Siemens PLCs. We need to make the corresponding conversions in the program.

Real-World Application Case

I once used a similar control scheme in a brewery project. We monitored the temperature of the fermentation tank with a temperature sensor and controlled the opening of the cooling valve to maintain the ideal temperature. This system greatly improved the stability of the wine quality.

Once, there was a small issue where the temperature suddenly spiked. It turned out that I accidentally connected the ground wire incorrectly during wiring, leading to inaccurate readings. This reminds us that when dealing with analog signals, wiring and grounding must be handled with extra care.

Common Problems and Solutions

  1. Unstable Readings

  • Check the wiring, especially shielding and grounding
  • Consider using filtering algorithms, such as moving average
  • No Response from Output

    • Confirm that the output mode (voltage/current) is set correctly
    • Check if the load is within the module’s output capacity
  • Incorrect Value Range

    • Carefully check the conversion formula
    • Confirm the actual range of the sensor and actuator

    Practical Suggestions

    Talk is cheap. To truly master analog control, I suggest you:

    1. Build a small analog control system, such as using a potentiometer to simulate temperature input and an LED to simulate valve opening output
    2. Experiment with different types of analog signals, such as voltage and current
    3. Practice various common analog processing algorithms, such as linear mapping and smoothing filters
    4. Simulate various abnormal situations to enhance troubleshooting skills

    Remember, in the industrial field, safety is always the top priority. When operating analog devices, especially in high voltage or high current situations, be sure to take precautions.

    Analog control is an important area in PLC applications. Mastering it will allow you to navigate the industrial control world with ease. I hope this article inspires you, and feel free to ask me any questions. Stay curious, practice diligently, and you will surely become an outstanding PLC engineer!

    Leave a Comment