PLC Control Exhaust System: Easy Switch Between Manual and Automatic Modes!

Workshop Exhaust System Automation: PLC Implementation for Air Circulation

The workshop exhaust system is controlled by PLC, which automatically detects air quality and intelligently starts and stops the exhaust fan, ensuring a worry-free workshop environment! Today, we will tackle this project.

Project Requirements and Functionality Description

The main requirements for this project are:

  1. To achieve automatic start and stop of the fan based on the workshop air quality (such as temperature, humidity, gas concentration) to control the operation of the exhaust system.
  2. To display air parameters in real-time on the HMI, such as temperature, humidity, and harmful gas concentration, for easy monitoring by operators.
  3. To support manual mode, allowing operators to directly control the fan start and stop via HMI.
  4. The system needs to have an anomaly alarm function, triggering an alarm when sensor failure or gas concentration exceeds the limit.
  5. To ensure stable system operation, avoiding frequent start and stop of the fan or delays in data collection.

Breakdown of Implementation Logic

The control logic of the entire exhaust system can be divided into several parts:

  • Automatic Mode Logic: The PLC automatically determines whether to start the exhaust fan based on parameters collected by air sensors.
  • Manual Mode Logic: Operators directly control the fan start and stop via HMI, with higher priority than automatic mode.
  • Alarm Handling Logic: When gas concentration exceeds the limit or sensor signals are abnormal, an alarm signal is triggered and displayed on the HMI.
  • Status Display Logic: Real-time display of air parameters, fan status, and alarm information on the HMI.

Code Implementation

Below is the ladder diagram code for automating the workshop exhaust system using Siemens S7-1200, with clear structure and easy to learn.

1. Input/Output Allocation Table

Organize resource allocation first for more structured programming.

Name
Address
Description
Temperature and Humidity Sensor Signal
AIW0
Analog input for collecting temperature and humidity data
Gas Concentration Sensor Signal
AIW2
Analog input for collecting gas concentration
HMI Manual Start/Stop Signal
DB1.DBX0.0
Fan control signal sent by HMI
Fan Operation Control Signal
Q0.0
Control fan start and stop
Gas Concentration Exceeding Alarm Signal
Q0.1
Trigger alarm when gas concentration exceeds limit
Sensor Abnormality Alarm Signal
Q0.2
Trigger alarm when sensor signal is abnormal
Automatic Mode Status Display
DB1.DBX0.1
HMI displays automatic mode operation status
Manual Mode Status Display
DB1.DBX0.2
HMI displays manual mode operation status

2. Automatic Mode Logic

The PLC automatically determines whether to start the fan based on the air sensor signals, such as starting the fan when gas concentration exceeds the set value.

| AIW2        L#50.0    Q0.0
|---|>|-------( )---|   // Start fan when gas concentration exceeds 50

| AIW2        L#40.0    Q0.0
|---|<=|------(R)---|   // Stop fan when gas concentration is less than 40

Here, upper and lower limits are set to avoid frequent start and stop of the fan; the thresholds can be adjusted based on actual needs.

3. Manual Mode Logic

The buttons on the HMI can directly control the fan start and stop, with manual mode having a higher priority than automatic mode.

| DB1.DBX0.0   Q0.0
|---| |-------( )---|   // HMI manual control of fan start and stop

| DB1.DBX0.0   DB1.DBX0.2
|---| |-------( )---|   // Manual mode status display

The address corresponding to the HMI button is <span>DB1.DBX0.0</span>, allowing operators to directly start and stop the fan through the HMI interface.

4. Alarm Handling Logic

When gas concentration exceeds the safety range or sensor signals are abnormal, an alarm signal is triggered, and alarm information is displayed on the HMI.

| AIW2        L#100.0   Q0.1
|---|>|-------( )---|   // Trigger alarm when gas concentration exceeds 100

| NOT AIW2    Q0.2
|---| |-------( )---|   // Trigger alarm for abnormal sensor signal

<span>AIW2</span> is the analog input for the gas concentration sensor; abnormal signals can be determined by setting a reasonable range.

5. Status Display Logic

Display the fan’s operation status and current air parameters on the HMI, allowing operators to quickly view the system’s operation status.

| Q0.0       DB1.DBX0.1
|---| |-------( )---|   // Automatic mode status display

| AIW0       HMI_DISPLAY
|---|MOV|------( )---|   // Write temperature and humidity data to HMI display

| AIW2       HMI_DISPLAY
|---|MOV|------( )---|   // Write gas concentration data to HMI display

After the HMI reads these addresses, it can display air parameters and fan status in real-time through text boxes or charts.

Optimization and Common Issues

  1. Frequent Start and Stop of the Fan: The narrow upper and lower limits may cause frequent start and stop of the fan; it is recommended to increase a certain hysteresis range, such as a start threshold of 50 and a stop threshold of 40.
  2. Sensor Signal Fluctuation Issue: Sensor signals may jitter; programming can include filtering logic or signal delay processing to ensure data stability.
  3. Manual Mode Priority Issue: Switching to manual mode may interfere with automatic mode; it is recommended to pause the automatic mode’s operation logic when manual mode is enabled.
  4. False Alarm Trigger Issue: Gas concentration exceeding alarms can be easily affected by environmental interference; increasing judgment time or multiple sampling can confirm alarm signals.

Complete Code Framework

Below is the complete ladder diagram code framework:

// Automatic mode logic  
| AIW2        L#50.0    Q0.0
|---|>|-------( )---|  

| AIW2        L#40.0    Q0.0
|---|<=|------(R)---|  

// Manual mode logic  
| DB1.DBX0.0   Q0.0
|---| |-------( )---|  

| DB1.DBX0.0   DB1.DBX0.2
|---| |-------( )---|  

// Alarm logic  
| AIW2        L#100.0   Q0.1
|---|>|-------( )---|  

| NOT AIW2    Q0.2
|---| |-------( )---|  

// Status display logic  
| Q0.0       DB1.DBX0.1
|---| |-------( )---|  

| AIW0       HMI_DISPLAY
|---|MOV|------( )---|  

| AIW2       HMI_DISPLAY
|---|MOV|------( )---|  

Conclusion

The control logic for the workshop exhaust system is not difficult; the key is to manage data fluctuations and alarm signals! If you have any questions, feel free to leave a message, and we can research together!

Leave a Comment