Beckhoff Implementation

Modbus TCP/IP for Beckhoff

Ethernet-based variant of Modbus using TCP/IP. Combines simplicity of Modbus with speed and scalability of Ethernet.

Type: Industrial EthernetSpeed: 10/100/1000 MbpsReleased: 1999Organization: Modbus Organization
1 Gbps capable
Bandwidth
Unlimited (network dependent)
Max Nodes
100m per segment (with switches: unlimited)
Max Distance
No
Real-Time

Protocol Overview

Beckhoff TwinCAT 3 uses Tc2_ModbusTCP library for both master and slave. Runs on Windows embedded PC, leverages standard Windows TCP/IP stack for Modbus TCP communication.

When to Use Modbus TCP/IP

Choose Modbus TCP/IP for SCADA systems, plant-wide networks, remote monitoring, or when integrating industrial equipment with IT systems.

Beckhoff Hardware Requirements

Compatible Communication Modules

CX Series embedded PC (built-in Ethernet)
C6015/C6025 ultra-compact IPC
Any TwinCAT3-compatible PC with Ethernet

Wiring Details

Network Setup

Standard Windows networking. Configure IP in Windows Network Settings. Port 502 for Modbus TCP.

Beckhoff Software & Programming

Function Blocks & Instructions

FB_MBTCPClient (Tc2_ModbusTCP)
FB_MBTCPServer
FB_ClientServerConnection
FB_MBReadHoldingRegs
FB_MBWriteHoldingRegs

Beckhoff Code Example

fbModbusTCPClient(
  sIPAddr := '192.168.1.10',
  nTCPPort := 502,
  nUnitID := 1,
  nQuantity := 10,
  nMBAddr := 0,
  cbLength := SIZEOF(arrData),
  pDestAddr := ADR(arrData),
  bExecute := TRUE,
  => bBusy => bBusy,
  => bError => bError
);

Beckhoff-Specific Implementation Notes

Leverages Windows TCP/IP stack. Supports TLS/SSL for secure Modbus TCP. Error ID provides detailed Windows socket errors. Typical response time <5ms on Gigabit. Can handle 100+ simultaneous connections limited only by PC resources.

Technical Specifications

Physical Layer

  • Physical Layer: IEEE 802.3 Ethernet
  • Cable Type: Cat5e/Cat6 Ethernet
  • Topology: Star, Tree, Ring
  • Power Over Cable: No

Data Layer

  • Data Link: TCP/IP
  • Encoding: Binary
  • Error Detection: TCP checksum
  • Frame Size: 1500 bytes (MTU)

Performance

  • Scan Time: 1-10ms typical
  • Deterministic: No
  • Real-Time: No

Certification

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

Advantages & Disadvantages

Advantages

  • High speed (up to 1 Gbps)
  • Uses standard Ethernet infrastructure
  • Unlimited nodes and distance (with switches)
  • Easy IT integration
  • Simple protocol (Modbus heritage)
  • Open standard and free
  • Remote access capability

Disadvantages

  • Not deterministic (not real-time)
  • No built-in security (requires VPN/firewall)
  • Higher latency than dedicated fieldbuses
  • Requires managed switches for large networks
  • No device profiles or configuration tools

Common Use Cases & Applications

SCADA systems
Plant-wide data collection
Building management systems
Remote monitoring
Enterprise system integration
Large distributed systems

Industry Adoption

Adoption LevelVery High
Market Share25-35% of industrial Ethernet
Geographic PresenceWorldwide
Primary Industries
Oil & GasWater/WastewaterBuilding AutomationManufacturingEnergy

Supported Message Types

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