Integrating CAN Bus Air Compressors with Siemens PLC via Protocol Gateway

In modern manufacturing, compressed air systems are vital but often energy-intensive. Many facilities still run air compressors with standalone controllers, leading to pressure fluctuations, delayed responses, and unnecessary energy consumption. This article explores a practical integration approach using a protocol gateway to connect CAN-based air compressors to a Siemens PLC, enabling centralized control, automatic scheduling, and significant energy savings.

Project Background and Challenges

A mechanical manufacturing plant operated multiple air compressors with CAN bus interfaces to supply pneumatic equipment on the production line. The compressors, similar to the Atlas Copco G 7-22 VSD series, were originally controlled locally. This setup caused several issues: start/stop operations were not synchronized, pressure regulation lagged, and energy consumption was higher than necessary. Additionally, the compressors could not be integrated into the existing control system for centralized monitoring.

The goal was to implement an integrated control system using a Siemens 1200 PLC (CPU 1214C DC/DC/DC) to manage all compressors centrally, with automatic start/stop scheduling based on real-time pressure. The main technical hurdle was bridging the ProfiNet protocol of the PLC with the CAN protocol of the compressors.

Solution: Protocol Conversion Gateway

After evaluating several options, the team selected a ProfiNet-to-CAN gateway (model JM-PN-CAN/COP). This industrial-grade device acts as a ProfiNet slave on one side and a CAN master on the other, seamlessly translating data between the two networks. Its robust design ensures reliable operation in harsh electromagnetic environments typical of factory floors.

Key Components:

  • Controller: Siemens 1200 PLC (CPU 1214C DC/DC/DC with ProfiNet)
  • Air Compressors: Three units with CAN interface (similar to Atlas Copco G 7-22 VSD), supporting remote start/stop and pressure feedback
  • Gateway: ProfiNet to CAN protocol converter (JM-PN-CAN/COP)
  • Pressure Sensor: Diffusion silicon type (e.g., PT124G-111) connected to PLC analog input for header pressure monitoring
  • Cables: ProfiNet industrial Ethernet cable, CAN bus shielded twisted pair

System Architecture

The system follows a three-layer architecture: control layer, protocol conversion layer, and field device layer.

Layer Function Communication
Control Layer Siemens 1200 PLC runs control logic, sends start/stop commands and pressure setpoints, receives status and alarms. ProfiNet master to gateway
Conversion Layer Gateway JM-PN-CAN/COP translates ProfiNet data to CAN frames and vice versa. ProfiNet slave & CAN master
Field Device Layer Air compressors execute commands and report parameters via CAN bus. CAN bus (daisy-chain)

The PLC communicates with the gateway over ProfiNet, sending control words and receiving status words. The gateway, configured as a CAN master, polls the compressors and maps the data to the ProfiNet process image. A pressure sensor wired to the PLC’s analog input provides the actual system pressure for closed-loop control.

Implementation Steps

1. Hardware Connection

The physical setup is straightforward. The PLC’s ProfiNet port (X1) connects to the gateway’s PN_IN port using a standard Ethernet cable. On the CAN side, the gateway’s CAN_H, CAN_L, and GND terminals connect to the first compressor’s CAN interface. The remaining compressors are daisy-chained using CAN bus cables, ensuring proper termination resistors at both ends (typically 120 ohms). The pressure sensor’s 4-20 mA output connects to the PLC’s analog input module.

2. Gateway Configuration

Using the gateway’s configuration software, you set the ProfiNet device name and IP address (e.g., 192.168.0.20) to match the PLC’s network plan. The CAN side is configured for 500 kbps baud rate, standard frame format (11-bit ID), to match the compressor’s protocol. The crucial step is data mapping: define which ProfiNet output bytes correspond to compressor start/stop commands and pressure setpoints, and which CAN input bytes map to ProfiNet input bytes for status, pressure feedback, and fault codes.

Typical CAN Frame Mapping Example: Compressor 1 Start/Stop command mapped to CAN ID 0x201, byte 0, bit 0. Pressure setpoint mapped to CAN ID 0x301, bytes 0-1 (16-bit value). Status feedback from CAN ID 0x181, byte 0 (bit 0: running, bit 1: fault).

3. PLC Programming

In TIA Portal, import the gateway’s GSD file to add it to the ProfiNet network. Assign the I/O addresses corresponding to the mapped data. The control logic is then developed using ladder or structured text. A typical automatic scheduling algorithm compares the actual pressure from the sensor against upper and lower thresholds (e.g., 0.8 MPa and 0.6 MPa). When pressure drops below the lower limit, the PLC starts one or two compressors via the gateway. When pressure exceeds the upper limit, it stops redundant units. Fault handling routines monitor the fault bits from each compressor and trigger alarms or shutdowns as needed.

4. Commissioning and Testing

After wiring and configuration, verify communication by checking live data from the compressors on the PLC’s watch table. Test start/stop commands to ensure correct response. Simulate pressure changes by adjusting the sensor or setpoints to validate the automatic scheduling. Induce a compressor fault (e.g., disconnect a sensor) to confirm alarm handling. Finally, run the system continuously for at least 72 hours to ensure stability, monitoring for any communication dropouts or control delays.

Results and Benefits

The integrated system delivered measurable improvements:

Metric Before After
Pressure Control Accuracy ±0.1 MPa (estimated) ±0.02 MPa
Energy Consumption Baseline Reduced by ~15%
Downtime Response Manual fault detection Automatic alarm & shutdown
Monitoring Local only Centralized, real-time

The 15% reduction in energy consumption translates to significant cost savings, especially in plants with high air demand. The tighter pressure control also improves the performance and lifespan of pneumatic tools and machinery. Maintenance teams can now quickly identify and address compressor faults, reducing unplanned downtime.

Key Takeaways for Industrial Automation Engineers

This project highlights the effectiveness of protocol gateways in bridging legacy or specialized equipment with modern control systems. When selecting a gateway, consider factors like industrial certifications, ease of configuration, and support for required baud rates and frame formats. Proper mapping and thorough testing are essential to ensure reliable data exchange. For similar applications involving variable-speed compressors, the same architecture can be extended to include speed control via the CAN bus, further optimizing energy use.

Pro Tip: Always use shielded cables for CAN bus and ensure proper grounding to avoid communication errors in noisy environments. Additionally, implement a heartbeat signal in your PLC logic to detect gateway communication loss and trigger a safe state.

By adopting such integration strategies, factories can move towards smarter, more energy-efficient compressed air systems without replacing existing equipment, maximizing return on investment.

Similar Posts