The MDP (Modular Device Profile) information model lists all parameters with the help of areas, modules and tables. As the generic access to each parameter, an addressing is defined whose main component is the MDP index (2 bytes).

Details can be found in the documentation on the Beckhoff Device Manager.

The function returns the MDP index for parameters from the MDP Configuration Area in order to enable parameter access via the MDP index (FB_IPCDiag_ReadParameterByMdpIdx).

Selection can be made by means of nModuleIdx if several instances of the module type exist. Internally, the function determines the dynamic module ID and appends it to the MDP index.


    eModuleType   : E_IPCDiag_ModuleType;
    nModuleIdx    : USINT; (* 1= first instance of this module type (= default) *)
    nTableID      : BYTE;
    fbRegister    : FB_IPCDiag_Register;

eModuleType. At this input is the IPC diagnostics module type is specified. The possible types are listed in the enumeration E_IPCDiag_ModuleType. (Overview of the module types: (https://infosys.beckhoff.de/content/1031/devicemanager/99079192065133835.html))

nModuleIdx. Because there can be several instances of a module type in the system, the module index beginning with 1 is specified at this input.

nTableID: The table ID in which the parameter exists is specified at this input.

fbRegister: The instance of FB_IPCDiag_Register must be transferred so that the function can use the available information for the IPC diagnostic configuration on the target system.
This instance must have been called beforehand. Otherwise an error is output.

Return value

The function returns the determined MDP index.

In the event of an error, if the requested module is not available, the function returns a value of 0.


Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.7

IPC or CX (x86, x64, ARM)