Back to IoT Blog
Industrial IoT 30 min read

PLC & SCADA Integration with Modbus

Master industrial automation by connecting PLCs to SCADA systems using Modbus protocol. Learn Modbus TCP/RTU, register mapping, and build monitoring dashboards.

Introduction to PLC & SCADA

Programmable Logic Controllers (PLCs) and Supervisory Control and Data Acquisition (SCADA) systems form the backbone of industrial automation. PLCs control machinery and processes, while SCADA provides centralized monitoring and control.

Key Components:
  • PLC: Ruggedized computer for industrial control
  • SCADA: Software for monitoring and control
  • HMI: Human-Machine Interface for operator interaction
  • RTU: Remote Terminal Units for field data collection
  • Communication: Modbus, Profibus, Ethernet/IP protocols

Modbus Protocol Overview

Modbus is the de facto standard for industrial communication:

Modbus RTU

Modbus TCP

Modbus Data Model

Data Type Register Range Access Description
Coils 00001-09999 Read/Write Single bit outputs
Discrete Inputs 10001-19999 Read-Only Single bit inputs
Input Registers 30001-39999 Read-Only 16-bit analog inputs
Holding Registers 40001-49999 Read/Write 16-bit parameters

Hardware Setup

Components needed for a basic Modbus system:

Required Hardware

Network Topology

SCADA Server (Modbus Master)
        |
    [Ethernet Switch]
        |
    +---+---+---+
    |   |   |   |
  PLC1 PLC2 VFD Sensor
Wiring Tips for RS-485:
  • Use twisted pair cable (Belden 9841 or equivalent)
  • Daisy-chain topology (no stars)
  • Terminate both ends with 120Ω resistors
  • Connect A to A, B to B (polarity matters)
  • Ground shield at one end only

PLC Configuration

Configuring Modbus TCP on a generic PLC:

Step 1: Enable Modbus Server

// PLC Configuration (pseudo-code)
Modbus_TCP_Server:
  Enabled := TRUE;
  Port := 502;
  MaxConnections := 4;
  Timeout := 1000; // ms

Step 2: Map Registers

// Map PLC variables to Modbus registers
Holding_Registers:
  HR[40001] := Temperature_Setpoint;
  HR[40002] := Pressure_Setpoint;
  HR[40003] := Motor_Speed_Reference;
  
Input_Registers:
  IR[30001] := Actual_Temperature;
  IR[30002] := Actual_Pressure;
  IR[30003] := Motor_Actual_Speed;
  IR[30004] := Flow_Rate;
  
Coils:
  C[00001] := Motor_Start_Stop;
  C[00002] := Alarm_Reset;
  
Discrete_Inputs:
  DI[10001] := Motor_Running_FB;
  DI[10002] := High_Pressure_Alarm;
  DI[10003] := Low_Level_Alarm;

Step 3: Configure Network

SCADA System Setup

Setting up a SCADA system to communicate with PLCs:

Open Source Options

Commercial Options

Node-RED Modbus Example

[
  {
    "id": "modbus-client",
    "type": "ModBus-Client",
    "tcpHost": "192.168.1.10",
    "tcpPort": 502,
    "unitId": 1
  },
  {
    "id": "read-temperature",
    "type": "ModBus-Read",
    "name": "Read Temperature",
    "topic": "Temperature",
    "unitId": 1,
    "dataType": "InputRegister",
    "address": 30001,
    "quantity": 1,
    "client": "modbus-client"
  },
  {
    "id": "dashboard-gauge",
    "type": "ui_gauge",
    "name": "Temperature Display",
    "topic": "Temperature",
    "format": "{{value}} °C",
    "min": 0,
    "max": 100
  }
]
SCADA Best Practices:
  • Use descriptive tag names (e.g., "Tank1_Temperature")
  • Implement alarm limits (high, high-high, low, low-low)
  • Add timestamp to all data logging
  • Create trend charts for historical analysis
  • Set up email/SMS notifications for critical alarms

Register Mapping

Create a comprehensive register map document:

Example Register Map

Address Name Type Scale Unit R/W
30001 Tank1_Temp INT16 /10 °C R
30002 Tank1_Pressure INT16 /100 bar R
30003 Tank1_Level INT16 /10 % R
40001 Pump1_Setpoint INT16 1 RPM R/W
40002 System_Mode UINT16 - - R/W
00001 Pump1_Start BOOL - - R/W
10001 Pump1_Running BOOL - - R

Troubleshooting

Common Issues

No Communication

Timeout Errors

Incorrect Data Values

Intermittent Communication

Safety Considerations:
  • Never modify safety-critical parameters via SCADA without authorization
  • Implement proper user authentication and access levels
  • Keep audit logs of all write operations
  • Use separate networks for safety and monitoring systems
  • Follow IEC 62443 industrial security standards

Next Steps

Expand your industrial automation skills:

  • Learn OPC UA for modern industrial communication
  • Implement MQTT for IIoT cloud integration
  • Study IEC 61131-3 PLC programming languages
  • Explore predictive maintenance with machine learning
  • Implement industrial cybersecurity measures