Skip to main content

MDP (Modular Device Profile)

New to EtherCAT

MDP is a standard designed specifically for modular devices. Most simple slaves — a single servo drive, an I/O module — are not MDP devices, so you can skip this chapter. You need MDP only when you use an expandable coupler (such as EK1100 plus terminal modules) or a multi-channel compound device.

What is MDP?​

MDP (Modular Device Profile) is the EtherCAT standard for describing modular devices.

A modular device is a device made up of several submodules. An EtherCAT coupler, for example, can contain digital outputs, digital inputs, an encoder and other modules, and each submodule can be configured and controlled independently.

Typical MDP devices​

Common MDP devices include:

  • I/O couplers (such as Beckhoff EK1100 plus various terminal modules)
  • Modular servo drives (a multi-axis drive where each axis is one module)
  • Compound-function devices (integrating I/O, communication, safety and other function modules)

MDP characteristics​

  • Flexible configuration: each module has its own PDO mapping and its own object dictionary; some devices support hot-plug
  • Module identification: the device is identified by a main ID (such as 0x00000100), and modules are distinguished by SubIndex
  • Unified management: the master reaches all modules through one device address, and each module is assigned its own logical address space

MDP compared with non-MDP devices​

Non-MDP deviceMDP device
FunctionFixed function, configured as a wholeFlexibly combined, configured per module
I/OFixed I/O, cannot be splitIndependent I/O per module
PDOOne PDO mapping for the whole deviceIndependent PDO mapping per module
ESIA single device descriptionIncludes the module structure description
AddressOne logical address rangeIndependent address range per module

Code examples​

List the modules​

// Scan modular devices
var slave = master.Slaves[0];

// Print the module list
Console.WriteLine($"设备: {slave.Name}"); // Device: {slave.Name}
Console.WriteLine($"模块数量: {slave.MDP.ConfiguredModules.Count}"); // Module count: {slave.MDP.ConfiguredModules.Count}
Console.WriteLine("模块列表:"); // Module list:

foreach (var slot in slave.MDP.ConfiguredModules)
{
Console.WriteLine($" 模块 {slot.SlotIndex}: {slot.ModuleName}"); // Module {slot.SlotIndex}: {slot.ModuleName}
Console.WriteLine($" 类型: 0x{slot.ModuleType:X8} ({slot.ModuleIOType})"); // Type: 0x{slot.ModuleType:X8} ({slot.ModuleIOType})
Console.WriteLine($" 状态: {slot.Status}"); // Status: {slot.Status}
}

Access module PDO data​

Each module has its own PDO data area; GetModulePdoLayout() returns each module's offset and size in the IOmap:

// Get the modular device
var slave = master.Slaves[0];

// PDO layout of each module in the IOmap (input/output offsets and byte counts)
var layout = slave.MDP.GetModulePdoLayout();
if (layout == null) return;

foreach (var mod in layout)
Console.WriteLine($"模块 {mod.SlotIndex}: 输入 {mod.InputSize}B @+{mod.InputOffset}, 输出 {mod.OutputSize}B @+{mod.OutputOffset}"); // Module {mod.SlotIndex}: input {mod.InputSize}B @+{mod.InputOffset}, output {mod.OutputSize}B @+{mod.OutputOffset}

// Get layout information per module (for example the output PDO of module 1, the input PDO of module 2)
var doModule = layout[1];
var diModule = layout[2];
Recommended tool

Use DARRA EtherCAT Master Tools to configure MDP:

  • Automatic module detection — scans and identifies all submodules
  • Configuration file generation — exports a complete MDP configuration file for deployment
  • Visual module management — view and configure each module in a graphical interface
  • Batch PDO mapping — configure the PDO mapping of every module

For production, configuring MDP with the tool is strongly recommended, to avoid the complexity and error risk of manual configuration.

Notes​

  1. ESI file support: an MDP device needs a complete ESI file that describes the module structure
  2. Configuration order: configure the main device first, then each module
  3. Address assignment: every module needs its own logical address space
  4. Module compatibility: after replacing a module, scan and configure again