I am Lao Wang, and I have been working in automation maintenance for 12 years in a factory. Today, I will show you how to use PLC to create something advanced—a vibration analysis early warning system. Although this sounds like a task for precision instruments, it can be effectively managed with a PLC. Last year, I developed a monitoring system for the workshop fan using Siemens S7-1200, which successfully provided early warnings for three bearing failures.
1. Basic Principles of Vibration Monitoring
Vibration acceleration sensors act like the “stethoscope” of the equipment, with common types being piezoelectric sensors that output 4-20mA. The key parameters to monitor are:
- • Amplitude: The magnitude of vibration (unit mm/s²)
- • Frequency: The number of vibration fluctuations (unit Hz)
- • Time-domain waveform: The original vibration curve
The tasks for the PLC are:
- 1. Collect sensor signals
- 2. Calculate characteristic values
- 3. Compare with preset thresholds
- 4. Trigger early warning output
2. Hardware Configuration Plan
![Wiring Diagram]Sensor → Signal Conditioning Module → PLC Analog Input (Note: The ground wire must be connected separately to the cabinet, and the shielding layer should be grounded at one end only)
Hardware Selection Pitfall Guide:
- • Choose a high-speed analog module (e.g., 6ES7134-6PA00-0BD0)
- • When vibration frequency > 50Hz, a dedicated vibration analysis module is required
- • Economic solution: Standard analog module + software filtering (explained later)
3. Key Points of Ladder Diagram Programming
1. Signal Acquisition
// Collect every 10ms interrupt
IEC_TIMER(TIMER1,PT:=T#10MS)
MOVE(IN:=AIW0, OUT=>Vibration Raw Value)
2. Software Filtering
// Moving average filtering (10 samples)
Vibration Filtered Value = (Sum of previous 9 samples + new sample value)/10
3. Characteristic Value Calculation
Simple Algorithm:
- • Peak Value = MAX(100 consecutive sample values)
- • Effective Value = SQRT(Average of squares)
- • Trend Change Rate = (Current Value – Value 5 minutes ago)/Time Difference
(For complex algorithms like Fourier Transform, it is recommended to process them on HMI or a host computer)
4. Early Warning Logic Design
// Three-level early warning mechanism
IF Effective Value > Set Value THEN
Warning Level = 1 // Yellow Alert
IF Peak Value exceeds limit for 3 consecutive times THEN
Warning Level = 2 // Orange Alarm
IF Trend Slope > Danger Threshold THEN
Warning Level = 3 // Red Emergency Stop
Note: Always add a delay confirmation to avoid false alarms from instantaneous interference!
5. Practical Case: Motor Bearing Monitoring
Parameters of a certain 37kW motor:
- • Normal Vibration: ≤4.5mm/s
- • Early Warning Threshold: 6mm/s
- • Shutdown Threshold: 9mm/s
Program Settings:
- 1. Sampling Frequency: 200Hz (requires high-speed module)
- 2. Calculate effective value every 10 seconds
- 3. Record trend data to DB block every half hour
- 4. Trigger HMI pop-up and log timestamp when exceeding threshold
6. Common Problem Handling
| Fault Phenomenon | Check Direction |
| Signal Jump | Check if the shielding layer is grounded at both ends (Incorrect! Must be single-ended) |
| Value Drift | Unstable power supply for the sensor, need to use an isolated power supply |
| Response Delay | Optimize OB35 interrupt cycle settings |
7. Safety Precautions
- 1. Strong Electrical Isolation: Sensor wiring must be separated from power lines
- 2. Ground Resistance: Ensure system ground resistance < 4Ω
- 3. Explosion-proof Requirements: Use intrinsically safe sensors in hazardous areas
- 4. Emergency Stop Testing: Manually trigger to verify output circuit every month
8. Practical Suggestions
- 1. First, use a signal generator for simulation testing (0-10V corresponds to 0-20mm/s)
- 2. Start practicing with low-speed equipment (e.g., conveyor belts)
- 3. Learn to read vibration spectrum graphs (display as bar charts on HMI)
- 4. Important data should be saved to an SD card (using PLC’s data logging function)
In conclusion: Using PLC for vibration analysis is like carving flowers with a kitchen knife; although it is not as precise as professional instruments, it excels in cost-effectiveness and ease of integration. Focus on trend changes rather than absolute accuracy; being able to provide a 24-hour early warning is a victory!