Siemens Implementation

Modbus RTU for Siemens

Serial communication protocol using binary encoding over RS-232/RS-485. Most widely used industrial protocol worldwide.

Type: Serial CommunicationSpeed: Up to 115.2 kbpsReleased: 1979Organization: Modbus Organization
115.2 kbps max
Bandwidth
247
Max Nodes
1200m (RS-485)
Max Distance
Yes
Real-Time

Protocol Overview

Siemens S7-1200/1500 support Modbus RTU via CM 1241 communication modules. TIA Portal V13+ provides MB_CLIENT (master) and MB_SERVER (slave) function blocks with comprehensive diagnostics.

When to Use Modbus RTU

Choose Modbus RTU for simple applications, legacy integrations, cost-sensitive projects, or when connecting basic I/O devices over short to medium distances.

Siemens Hardware Requirements

Compatible Communication Modules

CM 1241 RS232 (6ES7241-1CH30-1XB0)
CM 1241 RS422/485 (6ES7241-1CH32-1XB0)
CB 1241 RS485 (6ES7241-1AH32-0XB0)
CP 341 (6ES7341-1AH02-0AE0 - S7-300)
CP 441-2 (6ES7441-2AA05-0AE0 - S7-400)

Wiring Details

RS-485: Terminal A (Data+), Terminal B (Data-), twisted pair 120Ω characteristic impedance. Ground shield at one point only.

Termination

120Ω resistors at both physical bus ends. CM 1241 has switchable termination via DIP switch.

Siemens Software & Programming

Function Blocks & Instructions

MB_MASTER (legacy)
MB_SLAVE (legacy)
MB_CLIENT (TIA V13+, recommended)
MB_SERVER (TIA V13+, recommended)
PORT_CFG

Siemens Code Example

MB_CLIENT(
  REQ := TriggerRead,
  MB_MODE := 0,  // 0=Read, 1=Write
  MB_DATA_ADDR := 40001,
  MB_DATA_LEN := 10,
  MB_DATA_PTR := DataBuffer,
  DONE => ReadDone,
  ERROR => ReadError,
  STATUS => StatusWord
);

Siemens-Specific Implementation Notes

TIA Portal integrates Modbus configuration directly in hardware configuration. Supports both polling and event-driven modes. STATUS word provides detailed error diagnostics (80C8H=timeout, 80A1H=parameter error).

Technical Specifications

Physical Layer

  • Physical Layer: RS-232, RS-422, RS-485
  • Cable Type: RS-485 twisted pair, RS-232
  • Topology: Bus, Star, Tree
  • Power Over Cable: No

Data Layer

  • Data Link: Master/Slave
  • Encoding: Binary (RTU mode)
  • Error Detection: CRC-16
  • Frame Size: 256 bytes max

Performance

  • Scan Time: 10-100ms typical
  • Deterministic: Yes
  • Real-Time: Yes

Certification

  • Certification Required: No
  • License Cost: Free (open standard)
  • Version: Current

Advantages & Disadvantages

Advantages

  • Simple and easy to implement
  • Very low cost
  • Excellent industry support
  • Reliable in harsh environments
  • Minimal hardware requirements
  • Open standard
  • Wide device compatibility

Disadvantages

  • Limited speed (115.2 kbps max)
  • No built-in security
  • Master/slave only (no peer-to-peer)
  • Limited diagnostic capabilities
  • No standardized device profiles
  • Requires proper termination

Common Use Cases & Applications

Simple sensor and actuator networks
Building automation
Energy management systems
Water/wastewater treatment
Legacy equipment integration
Small to medium manufacturing lines

Industry Adoption

Adoption LevelVery High
Market Share30-40% of industrial protocols
Geographic PresenceWorldwide
Primary Industries
ManufacturingBuilding AutomationEnergyWater Treatment

Supported Message Types

Read Coils
Read Discrete Inputs
Read Holding Registers
Write Single Coil
Write Single Register
Write Multiple Registers