Notes on the documentation

This description is only intended for the use of trained specialists in control and automation engineering who are familiar with the applicable national standards.
It is essential that the following notes and explanations are followed when installing and commissioning these components.

The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.

Disclaimer

The documentation has been prepared with care. The products described are, however, constantly under development.
For that reason the documentation is not in every case checked for consistency with performance data, standards or other characteristics.
In the event that it contains technical or editorial errors, we retain the right to make alterations at any time and without warning.
No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.

Trademarks

Beckhoff®, TwinCAT®, EtherCAT®, Safety over EtherCAT®, TwinSAFE® and XFC® are registered trademarks of and licensed by Beckhoff Automation GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners.

Patent Pending

The TwinCAT Technology is covered, including but not limited to the following patent applications and patents:
EP0851348, US6167425 with corresponding applications or registrations in various other countries.

Copyright

© Beckhoff Automation GmbH.
The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.


Information Model

MDP (Modular Device Profile) represents an information model, describing hardware and software components as modules, e.g a NIC or a CPU, as well as software like TwinCAT System.

  • One Modul consists of a sum of tables.
  • Every table is clearly defined by a 16bit index
  • a concrete table's entry is addressed with an 8bit SubIndex.

index areas

As described in the 'Module Device Profile Specification for EtherCAT' the MDP is divided into these areas:
Index | Name | Description
0x1nnX | General Area | Storage of device information
0x8nnX | Configuration Area | Storage of module's configuration data
0xBnnX | ServiceTransfer Area | Storage of function call's trigger
0xFnnX | Device Area. | Storage of global configuration data

Every module has a unique, dynamically created module ID (0x00 bis 0xFF), as well as a unique module type.

Composition of a MDP index

0x | A | nn | X
 | 4Bit Area Code | 8Bit dynamic Module ID | 4Bit table ID depending of module's type - see module definition specification

For Addressing via ADS a full MDP Address is used. The Index is part of this Address.

Sample:

By address the NIC module the IP address can be read.

A list of all dynamically created modules is located in table 0xF020 of the Device Area.

The return value for each module consists of its module type at high word and the dynamically created module ID at low word.

A table's content can look like this:

SubIndex | Value | Description
0 | 5 | Number of table eintries
1 | 0x000C 0000 | Memory Module
2 | 0x000B 0001 | CPU Module (Cernel #1)
3 | 0x000B 0002 | CPU Module (Cernel #2)
4 | 0x0002 0003 | NIC Module

The return value at subindex 4 contains the desired module type (NIC=0x02) at high word and dynamic module (ID=0x03) at low word.

Due to the scheme mentioned before, the complete index looks like this:

0x | A | nn | X
0x | 8 | 03 | 0
 | 4Bit Area Code (Configuration Area) | 8Bit Dynamic Module ID (Index 4-1) | 4Bit table ID (0 = Module Header)

So, the NIC Module's configuration data are located at address 0x8030. The table's definition created for the NIC is documented in the corresponding specification.

Spec NIC Module

Due to specification the NIC's name can be read from SubIndex 3.

To get the NIC's IP address look at table "0x8nn1". So, the index of the desired table is 0x8031 and SubIndex is 2.


Data Types Overview

The MDP information is separated in modules which contain several elements. The data types of the elements are different.

Data type | Description
BOOLEAN | 8 Bit boolean value. 1=true, 0= false
SIGNED8 | 8 Bit signed Integer
SIGNED16 | 16 Bit signed Integer
SIGNED32 | 32 Bit signed Integer
UNSIGNED8 | 8 Bit unsigned Integer
UNSIGNED16 | 16 Bit unsigned Integer
UNSIGNED32 | 32 Bit unsigned Integer
UNSIGNED64 | 64 Bit unsigned Integer
REAL32 | 32 Bit floating point unit
VISIBLE STRING | ASCII string, variable length, not null terminated


General Area

IPC Diagnostics

0x1000-0x1FFF – General Area

0x1000

SubIndex | Type | Name | Type | Access
00 | VAR | Device Type (MDP ProfileID(0x1389) & SubProfileID(0x2710)) | DWORD32 | read-only

0x1008

SubIndex | Type | Name | Type | Access
00 | VAR | Device Name | VISIBLE STRING | read-write

Must be a valid name or write will be aborted with 0xECA60106 (Invalid data)

Valid names must

  • conform to RFC952/ 1123
  • not contain any of the following Beckhoff reserved prefixes:
    • CX- or CX_
    • CP- or CP_
    • EK-
    • AX-

0x1009

SubIndex | Type | Name | Type | Access
00 | VAR | Hardware Version | VISIBLE STRING | constant

0x100A

SubIndex | Type | Name | Type | Access
00 | VAR | OS and Image Version | VISIBLE STRING | constant

0x1018 - Identity Object

SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Vendor | UNSIGNED32 | constant
02 | VAR | Product Code (not yet supported) | UNSIGNED32 | constant
03 | VAR | Revision Number (not yet supported) | UNSIGNED32 | constant
04 | VAR | Serial Number | UNSIGNED32 | constant


0x8000-0x8FFF – Configuration Area

The Configuration Area offers read / write access to configuration data of existing MDP modules.

The module list contains all available modul types. In their chapters the available data is prepared as elements of tables. For each table a unique MDP Index exists (see Information Model).


0xB000-0xBFFF – ServiceTransfer Area

The ServiceTransfer Area offers functional access. So the handling is different to the data access of the Configuration Area. An operation is started and processed asynchronously.

The module definitions contain tables for ServiceTransfer. An operation can require input parameters as InputData table. Output parameters are described as OutputData table.

For all indexes of the ServiceTransfer Area this apply:

SubIndex | Name | Access
00 | Len (always = 4) | Read only
01 | Trigger / Write Data | Write only
02 | Operation status | Read only
03 | Operation status and read data | Read only

SubIndex 01

Writing the input data starts the action. For this trigger the SubIndex 01 is used. All variables are transmitted in one data block.

SubIndex 02

After an operation was started the status of an operation can be requested with the SubIndex 02.

Status value [BYTE] | Description
0 | No error; No data available
1 | No error; Data available
2 | error; No data available
3 | error; data available (4 byte MDP error code)
100 ... 200 | Busy; 0% ... 100%
255 | Busy; No percentage

SubIndex 03

After an operation is processed the output data is available and can be requested with the SubIndex 03. All information is received in one data block and correspond to the structure of the OutputData table.
Additionally to the read data the operation status is given. The status is identical to the one above.
Layout:

BYTE  status
BYTE  padding
VOID  data (optional)


Device Area

IPC Diagnostics

0xF000-0xFFFF – Device Area

0xF000
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len | 4 | UNSIGNED16 | read-only
01 | VAR | Object interval | 16 | UNSIGNED32 | read-only
02 | VAR | Max Modules | 0xFF | UNSIGNED32 | read-only
03 | VAR |  | 0 | UNSIGNED32 | read-only
04 | VAR |  | 0xF | UNSIGNED32 | read-only
0xF010 – Module Type List
SubIndex | type | name | type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | MDPSubProfile ID and Module type | UNSIGNED32 | read-only

Returns a list of Module Types of all instanced modules. The Module Type is saved at low word and the MDPSubProfile Id at high word.

The SubIndex ist needed to determine the module's ID.

Sample:

SubIndex: 0x04 MDPSubProfile Id and Module type: 0x2710 0002

At SubIndex 0x04 module type 0x02 is saved: It is an instance of the NIC Module; the module ID is 0x03 (SubIndex-1)

Configuration data are located at 0x8030.

0xF020 – Module ID List
SubIndex | type | name | type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Module type and ID | UNSIGNED32 | read-only

The Module Type is saved at high word and the module ID at low word.

The Module Type at high word is needed to determinate the modules. Module ID is consecutively numbered and assigned dynamically to every object. It corresponds to the variables ‚nn’ in the index.

Sample:

Module type and ID: 0x0002 0003

Determined module type 0x02: NIC Module
Module ID is 3, the object is described at Index 0x8030.

0xF060 – Module name list
SubIndex | type | name | type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Module name | VIS-STRING | read-only

List of names of all instanced modules with a unique module name. For this, the module can be declared clearly.


Overview

IPC Diagnostics

Module Type Overview

Type Number | Module
0x0002 | NIC
0x0003 | Time
0x0004 | User Management
0x0005 | RAS
0x0006 | FTP
0x0007 | SMB
0x0008 | TwinCAT
0x0009 | Datastore
0x000A | Software
0x000B | CPU
0x000C | Memory
0x000E | Firewall WinCE
0x0010 | File System Object
0x0013 | Display Device
0x0014 | EWF
0x0015 | FBWF
0x0017 | Silicon Drive
0x0018 | OS
0x0019 | RAID
0x001A | Cx9Flash
0x001B | Fan
0x001C | Mainboard
0x001D | Disk Management
0x001E | UPS
0x0100 | Misc

The modules will be described in the following chapters. Each module can contain access options of different MDP areas.


NIC

0x8nn0 - Module Header
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0002 00nn | UNSIGNED32 | read-only
02 | VAR | Type | NIC | VISIBLE STRING | read-only
03 | VAR | Name | Adapter Name | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0002 2710 | UNSIGNED32 | read-only
0x8nn1 - NIC Properties
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | MAC Address | VISIBLE STRING | constant
02 | VAR | IPv4 Address1 | VISIBLE STRING | read-write
03 | VAR | IPv4 Subnet Mask1 | VISIBLE STRING | read-write
04 | VAR | DHCP | BOOLEAN | read-write
05 | VAR | IPv4 Default Gateway1,2 | VISIBLE STRING | read-write

1 This is the value currently active in the system. Under WinCE, if you write a new value, it will not neccesarily be immediately applied without a reboot. Until a reboot occured the previous (active) value will be returned for subsequent reads.

2 Under WinCE: A read operation will return either the "DefaultGateway" or the "DhcpDefaultGateway" depending on DHCP state. A write operation will return "Invalid access" if DHCP is enabled.

0xBnn0 – IP Release/Renew Address (Service Transfer Object)
InputData
Type | Name
UNSIGNED8 | DummyByte


Time

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0003 00nn | UNSIGNED32 | read-only
02 | VAR | Type | Time | VISIBLE STRING | read-only
03 | VAR | Name | Time | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0003 2710 | UNSIGNED32 | read-only
0x8nn1
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 VAR SNTP Server1
  • Name or Ip Address of the timeserver
  • Empty string = No synchronisation
  • "NT5DS" = Use domain hierarchy settings (Win32 only)
VISIBLE STRING read-write
02 VAR SNTP Refresh in Seconds1
On WindowsCE lowest allowed value is 5 Seconds. 		UNSIGNED32 read-write
03 | VAR | Seconds since midnight January 1, 1970 (UTC) | UNSIGNED32 | read-write
04 VAR Textual DateTime presentation (ISO 8601)

YYYY-MM-DDThh:mm:ss.sTZD

VISIBLE STRING read-write
05 VAR

Timezone.

Zero based index of currently active timezone as listed in object 0x8nn2.

Sub indizes in Oject 0x8nn2 are one based. To lookup timezone information you need to query sub idx @ "this value"+1

UNSIGNED16 read-write
1SNTP Server and SNTP Refresh
MDP 1.6 (and earlier) | You must reboot the computer for the changes to take effect.
MDP 1.7 (and later) | Changing the value will restart the timeserver to immediately apply values
0x8nn2 - Timezones
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Timezone1 .. Len | VISIBLE STRING | read-only


User Management

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0004 00nn | UNSIGNED32 | read-only
02 | VAR | Type | User Management | VISIBLE STRING | read-only
03 | VAR | Name | User Management | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0004 2710 | UNSIGNED32 | read-only
0x8nn1 – User Name

List of local users (does not include domain users).

SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Name1 .. Len | VISIBLE STRING | read-only
0x8nn2 – Domain

List of domain names for the users in table 0x8nn1

SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Name1 .. Len | VISIBLE STRING | read-only
0x8nn3 – Group Membership *

Comma separated list of groups to which the user belongs

SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | GroupList 1 .. Len | VISIBLE STRING | read-only

0x8nn4 – Local Groups *

List of local groups

SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | GroupList 1 .. Len | VISIBLE STRING | read-only
0xBnn0 – Add User (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | cbInputData
UNSIGNED32 | Name Len
UNSIGNED32 | Domain Len
UNSIGNED32 | Password Len
char[Name Len] | szName
char[DomainLen] | szDomain
char[Password Len] | szPassword

No output data

0xBnn1 – Delete User (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | cbInputData
UNSIGNED32 | Name Len
UNSIGNED32 | Domain Len
char[Name Len] | szName
char[Domain Len] | szDomain

No output data

0xBnn2 – Set Password (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | cbInputData
UNSIGNED32 | Name Len
UNSIGNED32 | Domain Len
UNSIGNED32 | Password Len
char[NameLen] | szName
char[Domain Len] | szDomain
char[Password Len] | szPassword

No output data

0xBnn3 – Set Group Membership (Service Transfer Object) *
InputData
Type | Name
UNSIGNED32 | cbInputData
UNSIGNED32 | UserName Len
UNSIGNED32 | GroupName Len
UNSIGNED32 | DomainName Len
BOOLEAN | IsMemberOfGroup
char[Name Len] | szUserName
char[Group Len] | szGroupName
char[Domain Len] | szDomainName

No output data

0xBnn4 – Create Group (Service Transfer Object) *
InputData
Type | Name
UNSIGNED32 | cbInputData
UNSIGNED32 | GroupName Len
UNSIGNED32 | DomainName Len
char[Name Len] | szGroupName
char[Domain Len] | szDomainName

No output data

0xBnn5 – Delete Group (Service Transfer Object) *
InputData
Type | Name
UNSIGNED32 | cbInputData
UNSIGNED32 | GroupName Len
UNSIGNED32 | DomainName Len
char[Name Len] | szGroupName
char[Domain Len] | szDomainName

No output data

* Will be available in MDP 1.0.5.x


RAS

This module is available for Windows CE.

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0005 00nn | UNSIGNED32 | read-only
02 | VAR | Type | RAS | VISIBLE STRING | read-only
03 | VAR | Name | RAS | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0005 2710 | UNSIGNED32 | read-only
0x8nn1 - Misc
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Enable | BOOLEAN | read-write
02 | VAR | Slow Connection | BOOLEAN | read-write
03 | VAR | Use DHCP | BOOLEAN | read-write
03 | VAR | Use Auto Addresses | BOOLEAN | read-write
04 | VAR | Static Ip Count | UNSIGNED32 | read-write
05 | VAR | Static Ip Start | VISIBLE STRING | read-write
0x8nn2 - Line Names
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Line 1 .. Len | VISIBLE STRING | read-only
0x8nn3 - Line Enabled
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Enabled 1 .. Len | BOOLEAN | read-write
0x8nn4 - Userlist
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Username 1 .. Len | VISIBLE STRING | read-only
0xBnn0 – Add User
InputData
Type | Name
UNSIGNED32 | cbUsername
VISIBLE STRING | Username
0xBnn1 – Delete User
InputData
Type | Name
UNSIGNED32 | cbUsername
VISIBLE STRING | Username


FTP

Module for Configuring the Windows CE FTP Server.

This module is available for Windows CE.

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0006 00nn | UNSIGNED32 | read-only
02 | VAR | Type | FTP | VISIBLE STRING | read-only
03 | VAR | Name | FTP | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0006 2710 | UNSIGNED32 | read-only
0x8nn1
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Active | BOOLEAN | read-write
02 | VAR | Allow Anonymous | BOOLEAN | read-write
03 | VAR | Allow Anonymous Upload | BOOLEAN | read-write
04 | VAR | Anonymous Vroots | BOOLEAN | read-write
05 | VAR | Use Authentication | BOOLEAN | read-write
06 | VAR | Default Directory | VISIBLE STRING | read-write
0x8nn2
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Username | VISIBLE STRING | read-only
0xBnn0 – Add User

Service Transfer for enabling an NTLM user for FTP. The user must previosly be existing. To manage and create new NTLM users use the UserManagement Module.

InputData
Type | Name
UNSIGNED32 | cbUsername
VIS-STRING | Username
0xBnn1 – Delete User
InputData
Type | Name
UNSIGNED32 | cbUsername
VIS-STRING | Username


SMB Server

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0007 00nn | UNSIGNED32 | read-only
02 | VAR | Type | SMB Server | VISIBLE STRING | read-only
03 | VAR | Name | SMB Server | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0007 2710 | UNSIGNED32 | read-only
0x8nn1 - SMB Share Names
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Name1 .. Len | VISIBLE STRING | read-only
0x8nn2- SMB Path Names
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Path1 .. Len | VISIBLE STRING | read-only
0x8nn3- Userlist
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Username1 .. Len | VISIBLE STRING | read-only
0x8nn4- Access rights
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Access right1 .. Len | VISIBLE STRING | read-only
Access rights:

The users access rights are described as UNSIGNED32 and will be appended to the VISIBLE STRING.

USER_DELETE 0 // deletes the specified user from the ACL
SHARE_READ 10 // grant read access
SHARE_CHANGE 20 // grant change access
SHARE_FULL -1 // grant full access

Under WinCE only USER_DELETE and SHARE_FULL access may be set.

0xBnn0 – Add Share (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | cbInputData
UNSIGNED32 | NameLen
UNSIGNED32 | PathLen
char[NameLen] | szName
char[PathLen] | szPath
0xBnn1 – Del Share (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | NameLen
Char[NameLen] | ShareName
0xBnn2 – Set user Access rights (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | ShareNameLen
UNSIGNED32 | UserNameLen
UNSIGNED32 | AccessRights
Char[NameLen] | ShareName
Char[NameLen] | UserName


TwinCAT

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0008 00nn | UNSIGNED32 | read-only
02 | VAR | Type | TwinCAT | VISIBLE STRING | read-only
03 | VAR | Name | TwinCAT | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0008 2710 | UNSIGNED32 | read-only
0x8nn1 – Tc Misc
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Major Version | UNSIGNED16 | read-only
02 | VAR | Minor Version | UNSIGNED16 | read-only
03 | VAR | Build | UNSIGNED16 | read-only
04 | VAR | Ams Net ID1 | VISIBLE STRING | read-write*
05 | VAR | Reg Level2 | UNSIGNED32 | read-only
06 | VAR | TwinCAT Status | UNSIGNED16 | read-only
07 | VAR | RunAsDevice (available for Windows CE) | UNSIGNED16 | read-write
08 | VAR | ShowTargetVisu (available for Windows CE) | UNSIGNED16 | read-write
09 | VAR | Log File size (available for Windows CE) | UNSIGNED32 | read-write
10 | VAR | Log File Path (available for Windows CE) | VISIBLE STRING | read-write
11 | VAR | TwinCAT System ID3 | VISIBLE STRING | read-only
1Ams Net ID Info
The computer needs to be restarted in order to apply the new NetID
2Reg Level Info
Reg Level 0 = CP
 Reg Level 1 = I/O
 Reg Level 2 = PLC
 Reg Level 3 = NC-PTP
 Reg Level 4 = NCI
3TwinCAT System ID Info
System Requirements:
MDP Version 1.6 or higher
0x8nn2 - TwinCAT Route Name
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Name1 .. Len | VISIBLE STRING | read-only
0x8nn3 - TwinCAT Route Address
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Address1 .. Len | VISIBLE STRING | read-only
0x8nn4 - TwinCAT Route AMS Address
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | AMS1 .. Len | VISIBLE STRING | read-only
0x8nn5 - TwinCAT Route Flags
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Flags1 .. Len | UNSIGNED32 | read-only
0x8nn6 - TwinCAT Route Timeout
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Timeout1 .. Len | UNSIGNED32 | read-only
0x8nn7 - TwinCAT Route Transport
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Transport1 .. Len | UNSIGNED16 | read-only
Transport Info
The type E_RouteTransportType is documented in Beckhoff Information System
0x8nn8 - TwinCAT Logfile
SubIndex | Type | Name | Type | Access
00 | VAR | Logfile | VISIBLE STRING | read-only
0xBnn0 - TwinCAT Add Route (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | cbInputData
UNSIGNED32 | Flags
UNSIGNED32 | Timeout
UNSIGNED16 | Transport
BYTE[6] | NetId
UNSIGNED32 | Name Len
UNSIGNED32 | Address Len
char[Name Len] | szName
char[Address Len] | szAddress
Transport Info
The type E_RouteTransportType is documented in Beckhoff Information System
0xBnn1 - TwinCAT Del Route (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | NameLen
char[NameLen] | szName


Data Store

The Data Store module may be used to store configuration data on the device.

Information is stored in an xml file under %TwinCAT%\Datastore

By default two Data Store instances are available: “System” and “User”.

To add further instances create “Name.xml” in the \Hard Disk\BkIpcDiag\DataStore (CE) or %IPC_DIAG_PATH%\DataStore (Win32) folder

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0009 00nn | UNSIGNED32 | read-only
02 | VAR | Type | DataStore | VISIBLE STRING | read-only
03 | VAR | Name |  | VISIBLE STRING | read-only
04 | VAR | Dev type | 0x0009 2710 | UNSIGNED32 | read-only
0xBnn0 - Browse (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | pathLen
UNSIGNED32 | hContinue
UNSIGNED32 | dwMaxReadLen
UNSIGNED32 | pathLen
char[pathLen] | szPath

OutputData
Type | Name
UNSIGNED32 | nVersion
UNSIGNED32 | cbData
UNSIGNED32 | hContinue
UNSIGNED32 | cItems
UNSIGNED32 | dwMaxReadLen
UNSIGNED32 | nOffsFirstItem

struct _TItem
{
UNSIGNED32      cchItem;
UNSIGNED32      chValue;
BOOLEAN         sSubitems;
UNSIGNED32
    nOffsNextItem;
//char[cchItem] szItem
//char[cchValue] szValue
}

0xBnn1 - Add Item (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | cbData
UNSIGNED32 | PathLen
UNSIGNED32 | ValueLen
char[PathLen] | szPath
BYTE[ValueLen] | pValue
0xBnn2 - Del Item (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | PathLen
char[PathLen] | szPath


Software Versions

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x000A 00nn | UNSIGNED32 | read-only
02 | VAR | Type | Software | VISIBLE STRING | read-only
03 | VAR | Name | Software | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x000A 2710 | UNSIGNED32 | read-only
0x8nn1
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Name 1 .. Len | VISIBLE STRING | read-only
0x8nn2
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Company 1 .. Len | VISIBLE STRING | read-only
0x8nn3
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Date 1 .. Len | VISIBLE STRING | read-only
0x8nn4
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Version 1 .. Len | VISIBLE STRING | read-only


CPU

Module to represent CPU information.

0x8nn0 - Module Header
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x000B 00nn | UNSIGNED32 | read-only
02 | VAR | Type | CPU | VISIBLE STRING | read-only
03 | VAR | Name | CPU | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x000B 2710 | UNSIGNED32 | read-only
0x8nn1 - CPU Properties
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | CPU Frequency | UNSIGNED32 | constant
02 | VAR | Current CPU Usage (%) | UNSIGNED16 | read-only
03 | VAR | Current CPU Temperature (°C)1 | SIGNED16 | read-only
1Current CPU Temperature Info

Not supported by all devices.

System Requirements Windows Embedded Standard (WES):

MDP Version 1.5.45 or higher

System Requirements WinCE:

MDP Version 1.6 or higher


Memory

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x000C 00nn | UNSIGNED32 | read-only
02 | VAR | Type | Memory | VISIBLE STRING | read-only
03 | VAR | Name | Memory | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x000C 2710 | UNSIGNED32 | read-only
0x8nn1
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Program Memory Allocated | UNSIGNED32 | read-only
02 | VAR | Program Memory Available | UNSIGNED32 | read-only
03 | VAR | Storage Memory Allocated (available for Windows CE) | UNSIGNED32 | read-only
04 | VAR | Storage Memory Available (available for Windows CE) | UNSIGNED32 | read-only
05 | VAR | Memory Division (available for Windows CE) | UNSIGNED32 | read-write


Firewall CE

IPC Diagnostics

Firewall WinCE

Module representing the Windows CE Firewall

This module is available for Windows CE.

Table 0x8nn1 contains general firewall settings; Tables from 0x8nn2 describe the firewall rules

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x000E 00nn | UNSIGNED32 | read-only
02 | VAR | Type | Firewall CE | VISIBLE STRING | read-only
03 | VAR | Name | Firewall CE | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x000E 2710 | UNSIGNED32 | read-only
0x8nn1 – Firewall Settings
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | enable IPv4 | BOOLEAN | read-write
02 | VAR | enable IPv6 | BOOLEAN | read-write
03 | VAR | Persist | BOOLEAN | read-write
0x8nn2 – Flags
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Flags1 .. Len | ENUM | read-only

FWF_BLOCK = 01
FWF_ALLOW = 02
FWF_LOG = 04
FWF_INBOUND = 08
FWF_OUTBOUND = 16
FWF_DISABLED = 20

0x8nn3 – Mask
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Mask1 .. Len | ENUM | read-only

FWM_PRIVATE_HOST = 0x0001
FWM_PUBLIC_HOST = 0x0002
FWM_PORT = 0x0004
FWM_TypeE = 0x0008
FWM_CODE = 0x0010
FWM_PROTOCOL = 0x0020
FWM_ACTION = 0x0040
FWM_TIME_OF_DAY = 0x0080 (not supported)
FWM_DAY_OF_WEEK = 0x0100 (not supported)
FWM_DAY = 0x0200 (not supported)
FWM_MONTH = 0x0400 (not supported)
FWM_PUBLIC_HOST_MASK = 0x0800
FWM_PUBLIC_HOST_PREFIX = 0x1000

0x8nn4 – Private Host
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | IP String 1 .. Len | VISIBLE STRING | read-only
Only valid if Flags (0x8nn2) contain FWM_PRIVATE_HOST Textual representation of either an IPv4 or IPv6 address (depending on the Protocol Type specified in 0x8nn6)
0x8nn5 – Public Host
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | IP String 1 .. Len | VISIBLE STRING | read-only
Only valid if Flags (0x8nn2) contain FWM_PUBLIC_HOST Textual representation of either an IPv4 or IPv6 address (depending on the Protocol Type specified in 0x8nn6)
0x8nn6 – Public Host Mask
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Mask1 .. Len | VISIBLE STRING | read-only
Only valid if Flags (0x8nn2) contain FWM_PUBLIC_HOST_MASK. If this is an IPv4 Rule, this is the subnet mask. For IPv6 rules this is the “prefix length”
0x8nn7 – Protocol
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Protocol 1 .. Len | UNSIGNED32 | read-only
Only valid if Flags (0x8nn2) contain FWM_PROTOCOL
0x8nn8 – Action
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Action 1 .. Len | ENUM | read-only
BLOCK = 0x01 ALLOW = 0x02 ALLOW_RESPONSE = 0x03
0x8nn9 – Port Range
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Protocol 1 .. Len | UNSIGNED32 | read-only
Only valid if Flags (0x8nn2) contain FWM_PORT. Hiword is Max Port; Loword is Min Port. Max Port must be higher or equal to Min Port.
0x8nnA – Type & Code
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Protocol 1 .. Len | WORD | read-only
Hibyte is Code; Lobyte is Type Only valid depending on FWM_TypeE and FWM_CODE Flags (0x8nn2)
0x8nnB – Description
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Description 1 .. Len | VISIBLE STRING | read-only
0x8nnC – UID
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | UID 1 .. Len | UNSIGNED32 | read-only
0xBnn0 – Add Rule (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | cbData
UNSIGNED32 | Flags
UNSIGNED32 | Mask
union { char szPrivateHost[8*5]; WORD family; }; | If FWF_PRIVATE_HOST is set this is the Private host Ip address. Otherwise this is the address Family to which the rule applies (AF_INET or AF_INET6)
Char[8*5] | Public Host IP
union { BYTE b[4]; UINT publicHostPrefixLength; }; | If FWM_PUBLIC_HOST_MASK is set this is the public host mask for an IPv4 address. If FWM_PUBLIC_HOST_PREFIX is set this is the public host prefix length for an IPv6 address.
UNSIGNED32 | Protocol
UNSIGNED32 | Actions
UNSIGNED32 | PortRange (HIWORD = max | LOWORD = min)
UNSIGNED16 | Type & Code (HBYTE = code | LOBYTE = Typee)
UNSIGNED32 | DescriptionLen
char[DescriptionLen] | szDescription
0xBnn1 – Delete Rule (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | UId (From Table 8x8nnC)


File System Object

Module representing the local Filesystem.

There are ServiceTransfer Objects for directory browsing and file access.

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0010 00nn | UNSIGNED32 | read-only
02 | VAR | Type | FSO | VISIBLE STRING | read-only
03 | VAR | Name | FSO | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0010 2710 | UNSIGNED32 | read-only
0xBnn0 - Dir (Service Transfer Object)

This object will return all files and subfolders of a given root path. Use it for directory browsing etc.

The path can include wildcard characters, for example, an asterisk (*) or a question mark (?).
If the string ends with a wildcard, period (.), or directory name, the user must have access to the root and all subdirectories on the path.

InputData
Type | Name
DWORD | cbsRootDir
VISIBLE STRING | sRootDir
OutputData
Type | Name
DWORD | Version = 0
DWORD | cbData
DWORD | cDirs
DWORD | cFiles
DWORD | nOffsFirstDir //Offset of the first directoryInfo struchture
DWORD | nOffsFirstFile //Offset of the first fileInfo struchture
0xBnn1 - GetFile(Service Transfer Object)

Service transfer for reading a file.

When reading large files, this can be done via multiple calls. First open the file by submitting a filename, then continue by submitting the continuation handle returned in the GetFileResponse. The maximum size of a chunk is determined by the cbMaxRead parameter.

Always supply either a Filename or continuation handle. Supplying both or none of it will result in E_INVALIDDATA being returned.

InputData
Type | Name | Meaning
DWORD | cbFilename | Length of the Filename in characters.
DWORD | Continuation handle | For subsequent read request supply a continuation handle previously returned by the ReadFile OutputData
DWORD | cbMaxRead | Maximum size to return in the response. This is the number of bytes to be read plus size of the OutputData structure. It must always be greater than the size of the OutputData structure
Char[cbFilename] | Filename | Path and filename to be opened for reading

OutputData
Type | Name | Meaning
DWORD | cbData | Number of bytes that have been actually read
DWORD | Continuation handle | If there is more data to read this continuation handle can be used in a subsequent read request
BOOL | bMoreData | Indicating if there is more data available in the file
BYTE[cbData] | data | read data
0xBnn2 - WriteFile (Service Transfer Object)
InputData
Type | Name | Meaning
DWORD | cbFilename | Length of the filename in chars
DWORD | Continuation handle | For subsequent write request supply a continuation handle previously returned by the WriteFile OutputData
DWORD | cbData | Number of Bytes to be written
DWORD | bWriteCompleted | Indicates completion of file access; If !=0 File will be flushed and closed.
Char[cbFilename] | Filename | Filename
BYTE[cbData] | data | Writedata
OutputData
Type | Name | Meaning
DWORD | Continuation handle | Continuation handle to write more data to the file
0xBnn3 - CopyFile ServiceTransfer

Copy or move source file to destination

InputData
Type | Name | Meaning
DWORD | cbSrc | Length of source filename
DWORD | cbDst | Length of destination filename
DWORD | Flags | One or more of the following flags 0x00000001 = Copy. Set this flag to copy the file, otherwise it is moved 0x00000002 = Overwrite. When copying forces to overwrite existing files in the destination. other it is ignored
Char[cbSource] | Source Filename | Complete path to the source file
Char[cbDst] | Destination Filename | Complete path to the destination file
0xBnn4 - DeleteFile ServiceTransfer

Delete a file or folder.

InputData
Type | Name | Meaning
DWORD | cbFilename | length of filename
BOOL | bRecurse | delete an entire directory recursively
Char[cbFilename] | Filename | Path to destination file or folder
0xBnn5 - mkdir ServiceTransfer

Create a new directory

InputData
Type | Name | Meaning
DWORD | cbFilename | Length of the folder to be created
BOOL | bRecurse | Create directories recursively
char[cbFilename] | Filename | Name of the new folder.


Display Device

Properties of the display Adapter. If multiple display Adapters are installed there will be one Instance of this Module for each.

Table 0x8nn2 contains a list of available display modes while the currently selected mode is stated in table 0x8nn1

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0013 00nn | UNSIGNED32 | read-only
02 | VAR | Type | Display Device | VISIBLE STRING | read-only
03 | VAR | Name | Device Name | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0013 2710 | UNSIGNED32 | read-only
0x8nn1 – Device settings
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | IDx of active display mode | UNSIGNED8 | read-write
0x8nn2 – Display modes
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 .. Len | VAR | Mode | VISIBLE STRING | read-only


EWF

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0014 00nn | UNSIGNED32 | read-only
02 | VAR | Type | EWF | VISIBLE STRING | read-only
03 | VAR | Name | EWF | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0014 2710 | UNSIGNED32 | read-only

0x8nn1 – Volume Name
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | Volume Name | VISIBLE STRING | read-only
0x8nn2 – Volume ID
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | Volume ID | VISIBLE STRING | read-only
0x8nn3 – State
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | Ro
01..Len | VAR | State | UNSIGNED32 | Ro

Values:

0 = EWF_ENABLED
1 = EWF_DISABLED

0x8nn4 – Type
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | Ro
01..Len | VAR | Type | UNSIGNED32 | Ro

Values:

0 = EWF_DISK
1 = EWF_RAM
2 = EWF_RAM_REG

0x8nn5 – Boot command
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | Ro
01..Len | VAR | Boot command | UNSIGNED32 | Rw

OUT Values
0 = No Command
1 = Enable
2 = Disable
3 = SetLevel
4 = Commit

IN Values
0 = ClearCommand
1 = EwfMgrEnable
2 = EwfMgrDisable without Commit
3 = EwfMgrDisable with Commit
4 = EwfMgrCommit

0xBnn0 - EWF Commit and Disable Live*
InputData
Type | Name
CHAR | Volume Name

System Requirements

MDP | Version 1.3.42 or higher
Driver | Installed EWF driver
OS | XPE, WES


FBWF

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0015 00nn | UNSIGNED32 | read-only
02 | VAR | Type | FBWF | VISIBLE STRING | read-only
03 | VAR | Name | FBWF | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0015 2710 | UNSIGNED32 | read-only
0x8nn1 – CurrentState
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | State | BOOLEAN | read-only
02 | VAR | Compression | BOOLEAN | read-only
03 | VAR | PreAllocation | BOOLEAN | read-only
0x8nn2 – NextState
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | State | BOOLEAN | read-write
02 | VAR | Compression | BOOLEAN | read-write
03 | VAR | PreAllocation | BOOLEAN | read-write

0x8nn3 – Volumes
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | Volume | Vis-String | read-only

0x8nn4 – Exclusions
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | Exclusions () | Vis-String | read-write

On Read
Return Value will be a multi-string.

Each single-string is null terminated and the whole multi-string is double null terminated at the end.

0xBnn0 - FBWF Add Volume Command object*
InputData
Type | Name
DWORD | cbData
DWORD | cbVolume
CHAR[cbVolume] | cVolume
0xBnn1 - FBWF Remove Volume Command object*
InputData
Type | Name
DWORD | cbData
DWORD | cbVolume
BOOL | bClearExclusion
CHAR[cbVolume] | cVolume

0xBnn2- FBWF Add Exclusion Command object*
InputData
Type | Name
DWORD | cbData
DWORD | cbVolume
DWORD | cbFilePath
CHAR[cbVolume] | cVolume
CHAR[cbFilePath] | cFilePath
0xBnn3- FBWF Enum Exclusions Command object*
InputData
Type | Name
DWORD | cbData
DWORD | cbVolume
DWORD | Index
CHAR[cbVolume] | cVolume
OutputData
Type | Name
DWORD | cbFilePath
CHAR[cbFilePath] | cFilePath
0xBnn4 - FBWF Remove Exclusion Command object*
InputData
Type | Name
DWORD | cbData
DWORD | cbVolume
DWORD | cbFilePath
CHAR[cbVolume] | cVolume
CHAR[cbFilePath] | cFilePath
0xBnn5 - FBWF Commit File Command object*
InputData
Type | Name
DWORD | cbData
DWORD | cbVolume
DWORD | cbFilePath
CHAR[cbVolume] | cVolume
CHAR[cbFilePath] | cFilePath
0xBnn6 - FBWF Commit All Command object*
InputData
Type | Name
DWORD | cbData
DWORD | cbVolume
CHAR[cbVolume] | cVolume

* this is not supported because of security reasons

0xBnn7 - FBWF RestoreFile Command object*
InputData
Type | Name
DWORD | cbData
DWORD | cbVolume
DWORD | cbFilePath
CHAR[cbVolume] | cVolume
CHAR[cbFilePath] | cFilePath

System Requirements

MDP | Version 1.3.42 or higher
Driver | Installed FBWF driver
OS | XPE, WES


SiliconDrive

0x8nn0 - Module Header
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0017 00nn | UNSIGNED32 | read-only
02 | VAR | Type | SiliconDrive | VISIBLE STRING | read-only
03 | VAR | Name | SiliconDrive | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0017 2710 | UNSIGNED32 | read-only
0x8nn1 - Silicon Drive Information
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Total Erase Counts | UNSIGNED64 | read-only
02 | VAR | Drive Usage (%) | UNSIGNED16 | read-only
03 | VAR | Number of Spares | UNSIGNED16 | read-only
04 | VAR | Spares Used | UNSIGNED16 | read-only
05 | VAR | for internal use only | UNSIGNED32 | read-only
06 | VAR | for internal use only | UNSIGNED16 | read-only
07 | VAR | for internal use only | UNSIGNED8 | read-only
Total Erase Counts Info
The entire sum of write and erase cycles of all blocks on a Silicon Drive.
Drive Usage Info
The calculated usage of the silicon drive based on two million write and erase cycles per sector in a Block.
Number of Spares Info
Spare Blocks replaces Blocks who had been wear out. Number of Spares is the total number of available Spare Blocks.
Spares Used Info
The number of spares already used on the Silicon Drive. The solid state drive has 100 percent of its spares available for most of the product life. Spares are used up quickly when they are needed once.
Subindex 05-07 Info
For internal use only

System Requirements:

MDP | Version 1.5.58 or higher
TcSiSmart.dll | Version 1.4.56 or higher

System Requirements

TcSiSmart.dll | Version 1.4.46 or higher
Silicon Drive CompactFlash Card | SiSMART support


Intro

IPC Diagnostics

Operating System

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0018 00nn | UNSIGNED32 | read-only
02 | VAR | Type | OperatingSystem | VISIBLE STRING | read-only
03 | VAR | Name | <OS Name> | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0018 2710 | UNSIGNED32 | read-only
0x8nn1
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | OS Major Version | UNSIGNED32 | read-write
02 | VAR | OS Minor Version | UNSIGNED32 | read-write
03 | VAR | OS Build | UNSIGNED32 | read-write
04 | VAR | CSD Version | VISIBLE STRING | read-write

System requirements

MDP Version 1.3.42 or higher


RAID

General Explication
The module allows management and test utilities to access the physical components within a RAID set. It is possible to get detailed information about a single RAID set.
Each RAID contains a particular number of devices. Furthermore any RAID and any device has a state.

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0019 00nn | UNSIGNED32 | read-only
02 | VAR | Type | RAID Controller | VISIBLE STRING | read-only
03 | VAR | Name | SCSI Number | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0019 2710 | UNSIGNED32 | read-only
0x8nn1 – Controller Info
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | State | UNSIGNED32 | read-only
02 | VAR | Offline Reason | UNSIGNED32 | read-only
State Info
1 = GOOD => operating normally.
2 = FAILED => the controller has failed. No I/O is allowed to the controller in this state.
3 = OFFLINE => the controller is in a transitional state and is currently inaccessible. It has not failed, but no I/O is allowed to the controller in this state.
4 = POWEROFF => the controller slot is powered off. It may have been failed before but currently does not have power to the slot.
Offline Reason Info
0 = NO_REASON => unknown reason.
1 = INITIALIZING => the driver is in the process of initializing the controller and bringing it online.
2 = BUS_DEGRADED => the physical interface to the SAS or SATA domain is in a degraded state.
3 = BUS_FAILURE => the physical interface to the SAS or SATA domain has failed.
0x8nn2 – RAID Sets Type
Explication
The tables 0x8nn2, 0x8nn3 and 0x8nn4 are linked. Each one contains information about existing raid sets. Same index refers to the same raid set. E.g. if you look at index 1 in those three tables, you will find detailed information about the same raid.

SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | Type | UNSIGNED8 | read-only
Type Info
0 = No Raid
1 = Raid Type 0
2 = Raid Type 1
3 = Raid Type 10
4 = Raid Type 5
5 = Raid Type 15
255 = Raid Type No Standard Type
0x8nn3 – RAID Sets State & Info
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | State & Info | UNSIGNED16 | read-only
State = First 8 Bits
0 = OK => indicates the RAID set is operational.
1 = DEGRADED => indicates the RAID set is no longer functioning in a fault tolerant mode.
2 = REBUILDING => indicates the RAID set is rebuilding. This implies a degraded operation. Once the rebuild completes successfully, the status will change to OK. If the rebuilding process fails, the
status will be updated accordingly.
3 = FAILED => indicates the RAID set has failed. There is no guarantee on the operational behavior of the RAID set and data loss has occurred or is imminent.
Info = Last 8 Bits
If bStatus == OK, then Info will be 0.
If bStatus == DEGRADED, then Info will contain the failed drive index number.1
If bStatus == REBUILDING, then Info will contain the percentage complete. The value will be in the range of 0 to 100 (0h to 64h).

If bStatus == FAILED, then Info will be 0 or vendor specific. Since the failure modes could include drive or controller failures, Info may provide a vendor specific error code to indicate which component led to the failed status.

1 Not Supported

0x8nn4 – RAID Sets Drives
Explication
This is a list of all Raid Sets in the current system configuration. Each row contains a specific number of devices. One byte of the value represents one index in the 0x8nn9 / 0x8nnA list.
You can get detailed information about the device in the 0x8nn9 and 0x8nnA table. The maximum value is 255.

SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | Devices | VISIBLE STRING | read-only

Raid Sets Drives
*General Explication
0x8nn5 – 0x8nn8 : Reserved

0x8nn9 – Drives Serial Number
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | Serial Number | VISIBLE STRING | read-only
Serial Number
Maximal 40 Bytes
0x8nnA – Drives State
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | State | UNSIGNED8 | read-only
State
0 = OK => indicates the physical drive is operational.
1 = REBUILDING => indicates the physical drive is the target drive of a RAID set rebuild. Once the rebuild completes successfully, the status will change to OK.
If the rebuilding process fails, the status will be updated appropriately.1
2 = FAILED => indicates the physical drive has posted unrecoverable errors to the controller or has triggered a vendor specific action to remove the physical drive from the RAID set. There is
no guarantee on the operational behavior of the drive and data loss has occurred or is imminent.
3 = DEGRADED => indicates the physical drive has posted a SMART notification to the controller.

1 Not Supported

System Requirements

MDP | Version 1.3.42 or higher
RAID-Driver | IMSM 7.0 PV or higher
OS | XP, XPE, WES


CPU

IPC Diagnostics

Cx9Flash

Internal module. Do not use.


Fan

Every fan which is available is represented by an own MDP module. Not supported by all devices.

0x8nn0 - Module Header
SubIndex | Typ | Name | Value | Typ | Zugriff
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x001b 00nn | UNSIGNED32 | read-only
02 | VAR | Typ | Fan | VISIBLE STRING | read-only
03 | VAR | Name | Adapter Name | VISIBLE STRING | read-only
04 | VAR | Dev Typ | 0x001b 2710 | UNSIGNED32 | read-only
0x8nn1 - Fan Properties
SubIndex | Typ | Name | Typ | Zugriff
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Fan speed (rpm) | SIGNED 16 | read-only

System Requirements Windows Embedded Standard (WES)

MDP Version 1.5.48 or higher

System Requirements WinCE

MDP Version 1.6 or higher


Mainboard

This module represents the mainboard. Not supported by all devices.

0x8nn0 - Module Header
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x001C 00nn | UNSIGNED32 | read-only
02 | VAR | Type | Mainboard | VISIBLE STRING | read-only
03 | VAR | Name | Mainboard | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x001C 2710 | UNSIGNED32 | read-only
0x8nn1 - Mainboard Information
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Mainboard Type | VISIBLE STRING | read-only
02 | VAR | Serial Number | VISIBLE STRING | read-only
03 | VAR | Production Date | VISIBLE STRING | read-only
04 | VAR | Boot Count | UNSIGNED32 | read-only
05 | VAR | Operating Time in Minutes | UNSIGNED32 | read-only
06 | VAR | Min Board Temperature (°C) | SIGNED32 | read-only
07 | VAR | Max Board Temperature (°C) | SIGNED32 | read-only
08 | VAR | Min Input Voltage (mV) | SIGNED32 | read-only
09 | VAR | Max Input Voltage (mV) | SIGNED32 | read-only
10 | VAR | Mainboard Temperature (°C) | SIGNED16 | read-only
Production Date Info

YYYY-MM-DD-ww (Year-Month-Day-CalenderWeek)

Each Value can be 0 if it is not used.

Min Board Temperature Info
Lowest detected temperature
Max Board Temperature Info
Highest detected temperature
Min Input Voltage Info
Lowest detected voltage
Max Input Voltage Info
Highest detected voltage
0x8nn2 - Version Information
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Mainboard Revision | UNSIGNED8 | read-only
02 | VAR | Bios Major Version | UNSIGNED8 | read-only
03 | VAR | Bios Minor Version | UNSIGNED8 | read-only

0x8nn3 - Voltage Information
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | Name | VISIBLE STRING | read-only
0x8nn4 - Voltage Information
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | Location | SIGNED16 | read-only
Location Info
00 = LOCATION_UNKNOWN

01 = LOCATION_OTHER
02 = LOCATION_PROCESSOR
03 = LOCATION_DISK
04 = LOCATION_SYSTEM_MANAGEMENT_MODULE
05 = LOCATION_MOTHERBOARD
06 = LOCATION_MEMORY_MODULE
07 = LOCATION_POWER_SUPPLY
08 = LOCATION_ADDIN_CARD
09 = LOCATION_FRONT_PANEL_BOARD
10 = LOCATION_BACK_PANEL_BOARD
11 = LOCATION_PERIPHERIE
12 = LOCATION_CHASSIS
13 = LOCATION_BATTERY
14 = LOCATION_UPS
15 = LOCATION_GRAFFIC_BOARD
16 = LOCATION_SUPERIO
17 = LOCATION_CHIPSET

0x8nn5 - Voltage Information
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | Voltage (mV) | SIGNED16 | read-only
0x8nn6 - Voltage Information
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01..Len | VAR | Nonimal Voltage (mV) | SIGNED16 | read-only

System Requirements

MDP Version 1.6 or higher


DiskManagement

Lists the currently mounted logical volumes

0x8nn0 - Module Header
SubIndex | Typ | Name | Value | Typ | Zugriff
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x001d 00nn | UNSIGNED32 | read-only
02 | VAR | Typ | Fan | VISIBLE STRING | read-only
03 | VAR | Name | DiskManagement | VISIBLE STRING | read-only
04 | VAR | Dev Typ | 0x001d 2710 | UNSIGNED32 | read-only
0x8nn1 - DriveLetter
SubIndex | Typ | Name | Typ | Zugriff
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Drive letter 1..n | VISIBLE STRING | read-only

0x8nn2 - Volume Label
SubIndex | Typ | Name | Typ | Zugriff
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Volume Label 1..n | VISIBLE STRING | read/ write*

*Write is not supported in Windows CE

0x8nn3 - FileSystem
SubIndex | Typ | Name | Typ | Zugriff
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Filesystem name 1..n | VISIBLE STRING | read-only
0x8nn4 - Drive Type
SubIndex | Typ | Name | Typ | Zugriff
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Drive type 1..n | UNSIGNED32 | read-only

DRV_UNKNOWN = 0,
DRV_FIXED = 1,
DRV_REMOVABLE= 2,
DRV_CDROM = 4

0x8nn5 - Total size (Bytes)
SubIndex | Typ | Name | Typ | Zugriff
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Volume size 1..n | UNSIGNED64 | read-only
0x8nn6 - Free Bytes
SubIndex | Typ | Name | Typ | Zugriff
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Free bytes 1..n | UNSIGNED64 | read-only

Systemrequirements

MDP Version 1.6 or newer


UPS

UPS (uninterruptible power supply)

This module represents the UPS. Not supported by all devices.

0x8nn0 - Module Header
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x001E 00nn | UNSIGNED32 | read-only
02 | VAR | Type | UPS | VISIBLE STRING | read-only
03 | VAR | Name | UPS | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x001E 2710 | UNSIGNED32 | read-only
0x8nn1 - UPS Information
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | UPS Model | VISIBLE STRING | read-only
02 | VAR | Vendor Name | VISIBLE STRING | read-only
03 | VAR | Version | UNSIGNED8 | read-only
04 | VAR | Revision | UNSIGNED8 | read-only
05 | VAR | Build | UNSIGNED16 | read-only
06 | VAR | Serial Number | VISIBLE STRING | read-only
07 | VAR | Power Status | UNSIGNED8 | read-only
08 | VAR | Communication Status | UNSIGNED8 | read-only
09 | VAR | Battery Status | UNSIGNED8 | read-only
10 | VAR | Battery Capacity (in %) | UNSIGNED8 | read-only
11 | VAR | Battery Runtime (in seconds) | UNSIGNED32 | read-only
12 | VAR | Persistent Power Fail Count | BOOLEAN | read-only
13 | VAR | Power Fail Counter | UNSIGNED32 | read-only
14 | VAR | Fan Error | BOOLEAN | read-only
15 | VAR | No Battery | BOOLEAN | read-only
16 | VAR | Test Capacity | BOOLEAN | write-only
Kompatibilitätsliste | S-UPS | 24V Beckhoff UPS/ 230V Beckhoff UPS
UPS Model | x | x
Vendor Name | x | x
Version | x | x
Revision | x | x
Build | x | x
Serial Number |  | x
Power Status | x | x
Communication Status |  | x
Battery Status |  | x
Battery Capacity (in %) | x | x
Battery Runtime (in seconds) | x | x
Persistent Power Fail Counter | x | x
Power Fail Counter | x | x
Fan Error |  | x
No Battery |  | x
Test Capacity | x |
UPS Model Info

1 = SUPS

2 = 24V Beckhoff USV und APC 230V USV
Power Status Info

0 = UNKOWN

1 = ONLINE

2 = ONBATTERIES
Comunication Status Info

0 = UNKOWN

1 = OK

2 = ERROR
Battery Status Info

0 = UNKNOWN

1 = OK

2 = Change Battery

Persistent Power Fail Counter Info

TRUE = Power Fail Counter is persistent

FALSE = Power Fail Counter will be reset after computer restart
Test Capacity Info

Test Capacity will update "Battery Runtime (in seconds)". Write dummy value to start Test. Power off System and wait as long as the computer turns off. Start computer and read new "Battery Runtime (in seconds)".
0x8nn2 - UPS GPIO Pin Information
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Address | UNSIGNED16 | read-only
02 | VAR | Offset | UNSIGNED8 | read-only
03 | VAR | Params | UNSIGNED8 | read-only
Compatibility List | S-UPS | 24V Beckhoff UPS/ 230V Beckhoff UPS
Address | x |
Offset | x |
Params | x |

System Requirements

MDP Version 1.6 or higher


Misc

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0100 00nn | UNSIGNED32 | read-only
02 | VAR | Type | Misc | VISIBLE STRING | read-only
03 | VAR | Name | Misc | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0100 2710 | UNSIGNED32 | read-only
0x8nn1
SubIndex | Type | Name | Type | Access
00 | VAR | Len | UNSIGNED16 | read-only
01 | VAR | Startup Numlock State Numlock state at system startup | BOOLEAN | read-write
02 | VAR | CE Remote Display state Indicates if a client is connected via CERHost Since MDP 1.6.x Only WinCE | BOOLEAN | read only
0xBnn0 - Restore Factory Settings (Service Transfer Object) (available for WindowsCE)
InputData
Type | Name
UNSIGNED8 | DummyByte
0xBnn1 - Reboot (Service Transfer Object)
InputData
Type | Name
UNSIGNED8 | DummyByte


MDP hardware support

The Tables shows the MDP modules and features which are supported by the respective Beckhoff hardware.
Therefor the test devices had run with the mentioned image versions.

The statement is valid for all features of a MDP module, if no special feature is accentuated. Are some features of a module accentuated, for all other features the statement for the module is valid.

Additional information at some MDP features tells the minimum required image or MDP version for this special feature.

Note: Using MDP with the TwinCAT Plc Library Modular Device Profile these system requirements of the MDP Plc Library have to be attended. Part of this constraint is the TwinCAT Plc-Runtime system version 2.11.0 Build 1541 or higher (perhaps not included in these here mentioned image versions).

The full spectrum of Beckhoff IPC and embedded PC products is seperated to several sites.

MDP Module and Feature support:
C65xx-0000 / CP62xx-0000 / C69xx-0000 / CP72xx-0000 / CX1020 / CX1030
C65xx-0020 / CP62xx-0020 / C69xx-0020 / CP72xx-0020
CP62xx-0020 / C6915 / CPx7xx-0030 / CX50x0
CX9000 / CX90xx / CP66xx / CP6608
CPx7xx-0000 / CX1000
CPx7xx-0020 / CX1010


MDP Error Codes

General Error codes

Code | Meaning
0x00000000 | Success - No Error
0xECA60001 | Fail - Unspecified error
0xECA60100 | Invalid index
0xECA60101 | Invalid access
0xECA60102 | Buffer too small
0xECA60103 | Type not supported
0xECA60104 | Out of memory
0xECA60105 | No data available
0xECA60106 | Invalid data
0xECA60107 | Invalid arg
0xECA60108 | Value out of range
0xECA60200 | Server is busy
0xECA60201 | MDP API not initialized
0xECA60F00 | Not implemented
0xECA61000 | Not supported
0xECA60FFF | Unexpected error

API error codes

Code | Meaning
0xECA7xxxx | The low word contains an error code from a system call.

A List of Win32 error codes is located in the TwinCAT Diagnostics documentation.

ADS error codes

Code | Meaning
0xECA8xxxx | The low word contains a ADS result code

A List of ADS error codes is located in the ADS documentation.

Module specific error codes

Code | Module | Meaning
0xECAF0401 | User Mgmt | User already exists
0xECAF0402 | User Mgmt | User does not exist
0xECAF0403 | User Mgmt | Group already exists
0xECAF0404 | User Mgmt | Group does not exist
0xECAF0410 | SMB | Server is not installed
0xECAF0411 | SMB | Share already exists
0xECAF0412 | SMB | Share does not exist
0xECAF0420 | TwinCAT | Ads route already exists
0xECAF0421 | TwinCAT | Ads port could not be opened
0xECAF0430 | Datastore | A variable with this name already exists
0xECAF0431 | Datastore | Variable with requested name does not exist
0xECAF0432 | Datastore | Section with specified name does not exist
0xECAF0433 | Datastore | The name of the variable was invalid
0xECAF0440 | Registry | The name of the key (e.g. "HKLM") was invalid


Overview

BECKHOFF currently provides these MDP APIs :

MDP C Import dll

MDP .NET Api

Download MDP API 1.3.40

MDP via ADS

The possibility to access MDP information via ADS communication is described here.

MDP via PLC Library

A Beckhoff TwinCAT PLC Library is available to get access to the MDP information.


Overview

The MDP API layer allows access to the MDP. It consists of the following Files:
File | Function
MDPApi.h | Include header containig all required function definitions.
MDPApi.lib | Linker library.
MdpApi.dll | Dynamic link library.


MDPOpen

Initialize the MDPApi communication library. Call this function once before using the Api.

LONG MDPOpen();

Parameter

Return value

MDP Status Code

Example


MDPClose

Deinitialize the MDPApi communication library. Call this function once when finished using the MDP Api.

LONG MDPClose();

Parameter

Return value

MDP Status Code

Example


MDPSyncRead

Read data from the MDP.

LONG MDPSyncRead(
unsigned short 	nIndex,
unsigned char 	nSubIndex,
unsigned char 	nFlags,
unsigned long 	cbBuff,
void* 		pBuff,
unsigned long* 	pCbActRead);

Parameter

nIndex [in]

Index of the table to be read

nSubIndex[in]

SubIndex (table row) to be read

nFlags[in]

Optional flags for the read operation

cbBuff[in]

Number of Bytes to be read

pBuff[in]

Pointer to the buffer for the read operation.

pCbActRead[out]

Pointer to a variable of type unsigned long, receiving the number of bytes actually written to pBuff.

Return value

MDP Status Code

Example


MDPSyncWrite

Write data to the MDP

LONG MDPSyncWrite(
unsigned short 	nIndex,
unsigned char 	nSubIndex,
unsigned char 	nFlags,
unsigned long 	cbBuff,
void* 		pBuff);

Parameter

nIndex [in]

Index of the table to be read

nSubIndex[in]

SubIndex (table row) to be read

nFlags[in]

Optional flags for the read operation

cbBuff[in]

Number of Bytes to be read

pBuff[in]

Pointer to a buffer, containing the data to be written.

Return value

MDP Status Code

Example


MDPSyncReadWrite

Write and then read data from the MDP.

LONG MDPSyncReadWrite(
unsigned short 	nIndex,
unsigned char 	nSubIndex,
unsigned char 	nFlags,
unsigned long 	cbWrBuff,
void* 		pWrBuff,
unsigned long	cbRdBuff,
void*		pRdBuff,
unsigned long* 	pCbActRead );

Parameter

nIndex [in]

Index of the table to be read

nSubIndex[in]

SubIndex (table row) to be read

nFlags[in]

Optional flags for the read operation

cbWrBuff[in]

Number of Bytes to be written

pWrBuff[in]

Pointer to a buffer, containing the data to be written.

cbRdBuff[in]

Number of Bytes to be read

pRdBuff[in]

Pointer to the buffer for the read operation.

pCbActRead[out]

Pointer to a variable of type unsigned long, receiving the number of bytes actually written to pBuff.

Return value

MDP Status Code

Example


IO Flags

#define MDP_IOFLAG_FULLACCESS 	0x0001
#define MDP_IOFLAG_SYNC_ST 		0x0002

MDP_IOFLAG_FULLACCESS

Read the entire Table in one single write access.

This is only valid if

- Reading SubIndex 0 or 1

- The Table is of type Array or Record

- The Table contains more than 1 item

- The Table does not contain items of type String

MDP_IOFLAG_SYNC_ST

Synchroneous service transfer. This is only valid for ServiceTransferTables.

By default, writing ServiceTransfer data causes the ST to begin execution and then immediately returns. If this flag is specified, the API will wait for the ST to finish before returning from the write.


Overview

The MDP .Net Api builds up on the MDP C import library. Due to that the MDPApi.dll is required at runtime.

The MdpApi.dll is only available as 32 Bit component and cannot be used in an 64 Bit Process. Any attempt to do so results in a System.BadImageFormat Exception being thrown.


General

Beside communication with Modular Device Profile for IPC through MDP API it is possible to communicate with MDP through ADS.

NOTE:
Currently MDP supports the following ADS functions:

  • AdsSyncReadReq
  • AdsSyncReadReqEx
  • AdsSyncWriteReq

For PLC programmer at least the following function blocks out of the TwinCAT PLC System Library are supported:

  • ADSREADEX
  • ADSWRITE

ADS Port

The TwinCAT System Service has to be defined as port.

Port = 10000

IndexGroup / IndexOffset

Use IndexGroup and IndexOffset as described in the following scheme:

IndexGroup = 0xF302 (CoE)
IndexOffset = MDP address = MDP Index, flags und SubIndex.

MDP address:

31 .. 16 | 15 .. 8 | 7 .. 0
Index-16Bit | flags-8Bit | SubIndex-8Bit

The MDP Index is described in the information model.

flags

0x00

default

#define MDPIO_FLAG_FULLACCESS 0x01

Reading a table - including all sub indcies - with one single request. Only available if

  • sub index is 0 or 1
  • table contains no string values
  • table is of type array (all entries contain data of the same datatype - except sub index 0)

#define MDPIO_FLAG_ST_WAITRES 0x02

Calling a service transfer and keeping it alive until service transfer has finished. Available only for triggers of service transfer objects (Area 0xBxxx / sub index 1)


Overview

IPC Diagnostics - PLC Api

PLC Library

The TwinCAT PLC MDP library offers miscellaneous function blocks, in order to enable extensive access to MDP data.

There are two basic types of function blocks in the library.
On the one hand the general function blocks. They can be used to query and set arbitrary parameters in the MDP themselves by means of discrete access.
Furthermore, specific function blocks offer the possibility of accessing certain data as well as groupings of several data with one call. The function blocks available here offer fast access to the most important MDP information.

More information is concentrated in the full documentation of the MDP PLC Library.


Samples

Different Samples are available depending on API.

MDP Dll

Samples are located here.

MDP .NET

Samples are located here.

ADS

Samples are located here.

OPC-UA

Samples are located here.

MDP SPS Bibliothek

Samples are enclosed in the documentation of the MDP PLC Library.


General

VisualStudio.Net C++

See the tutorial about Including MDP API.


Including MDP Api in Visual Studio (2008)

1. After starting Visual Studio create a new Visual C++ Win32 console application

2. Finish project wizard with default settings. Open project property pages an add MDPApi.lib as additional dependency.

3. Include MDPApi header into your source code

#include "C:\Program Files\Beckhoff\MDP\MDPApi.h"


General

IPC Diagnostics - Samples

Samples

VIsualStudio.NET C#

Description | Download
Read hardware data (CPU, Memory, NIC, ...) | MdpCsharpSample01.zip
Read software versions (TwinCAT, OS, ...) | MdpCsharpSample02.zip
read NetID | MdpCsharpSample03.zip
change time zone | MdpCsharpSample04.zip

NOTE: Samples have been created using Visual Studio 2005


General

IPC Diagnostics - Samples

IPC Diagnostics over ADS sample in Csharp

Beside communication with Modular Device Profile for IPC through MDP API it is possible to communicate with MDP through ADS.

Following sample will read the CPU Frequency, CPU Usage, Free Space, CF Card Drive Usage, TwinCAT Version and Build, CPU Temperature, if supported.

Download MDPoverADS Sample

Cookbook:

  • Extract the Sample
  • Open the solution.
  • In Window1.xaml.cs search the line private AmsNetId netId = AmsNetId.Local;
  • Default netId is local here. To connect to a remote Target change the netId e.g. new AmsNetId ("172.16.5.2.1.1")
  • Compile and execute the solution.


General

IPC Diagnostics - Samples

IPC Diagnostics over UA sample in Csharp

The MDP UA Server builds up on the MDP C import library. Due to that the MDPApi.dll is required at runtime.

The MdpApi.dll is only available as 32 Bit component and cannot be used in an 64 Bit Process. Any attempt to do so results in a System.BadImageFormat Exception being thrown.

Following sample will read the CPU Frequency, CPU Usage, Free Space, CF Card Drive Usage, TwinCAT Version and Build, CPU Temperature, if supported.

Download MDPoverUA Sample

Cookbook:

  • Extract the Sample
  • Open the file settings.xml in MDPOverUA/MDPOverUA folder. Settings.xml is also added as
  • Search the line <Session Url="opc.tcp://CP_083582:4852" Security="None" RefreshInterval="1000" KeepAlive="10000" />
  • Adjust the Device name - Enter the name of device which is hosting MDP UA Server
  • Compile and execute the solution.


General

IPC Diagnostics - Samples

IPC Diagnostics over PLC FB's sample in TwinCAT

See the examples here.


Access Control

The Access Control Object is used to indicate the using of the directory by a process.

If several processes are using the directory at the same time side effects are possible. E.g. list indices of dynamic tables are changed.

A process can write the access cookie with the value != 0 to signalise the using of the directory. The check is lost if the cookie is written with 0.

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | Ro
01 | VAR | Address | 0x0001 00nn | UNSIGNED32 | Ro
02 | VAR | Type | Access Control | Vis-String | Ro
03 | VAR | Name | Access Control | Vis-String | Ro
04 | VAR | Dev Type | 0x0001 2710 | UNSIGNED32 | Ro
0x8nn1
SubIndex | Type | Name | Type | Access
00 | VAR | Access Cookie | UNSIGNED32 | Rw


Typübersicht Module

IPC Diagnostics

MDP Feature Support for C65xx-0000 / CP62xx-0000 / C69xx-0000 / CP72xx-0000 / CX1020 / CX1030

Back to overview

type number | module | C65xx-0000 / CP62xx-0000 / C69xx-0000 / CP72xx-0000 / CX1020 / CX1030
 |  | WES (CX1030, Image v2.2, MDP v1.0.5.49) | CE6.0 (Image v3.22)
0x0002 | NIC |  |
0x0003 | Time |  |
0x0004 | User Management | - |
0x0005 | RAS | - |
0x0006 | FTP | - |
0x0007 | SMB |  |
0x0008 | TwinCAT - RunAsDevice - ShowTargetVisu - Log File size - Log File Path | - - - - |
0x0009 | Datastore | - |
0x000A | Software |  |
0x000B | CPU - Temp | - |
0x000C | Memory - Storage Memory Allocated - Storage Memory Available - Memory Division | - - - |
0x000E | Firewall WinCE | - |
0x0010 | File System Object |  |
0x0013 | Display Device |  |
0x0014 | EWF |  | -
0x0015 | FBWF |  | -
0x0017 | Silicon Drive |  |
0x0018 | OS |  |
0x0019 | RAID | - |
0x0100 | Misc |  |


Typübersicht Module

IPC Diagnostics

MDP Feature Support for C65xx-0020 / CP62xx-0030 / C69xx-0020 / CP72xx-0020

Back to overview

type number | module | C65xx-0020 / CP62xx-0020 / C69xx-0020 / CP72xx-0020
 |  | WES (Image v2.2) | CE6.0 (Image v3.22)
0x0002 | NIC |  |
0x0003 | Time |  |
0x0004 | User Management |  |
0x0005 | RAS | - |
0x0006 | FTP | - |
0x0007 | SMB |  |
0x0008 | TwinCAT - RunAsDevice - ShowTargetVisu - Log File size - Log File Path |  |
0x0009 | Datastore |  |
0x000A | Software |  |
0x000B | CPU - Temp |  |
0x000C | Memory - Storage Memory Allocated - Storage Memory Available - Memory Division |  |
0x000E | Firewall WinCE | - |
0x0010 | File System Object |  |
0x0013 | Display Device |  |
0x0014 | EWF |  | -
0x0015 | FBWF |  | -
0x0017 | Silicon Drive |  |
0x0018 | OS |  |
0x0019 | RAID |  |
0x0100 | Misc |  |


Typübersicht Module

IPC Diagnostics

MDP Feature Support for CP62xx-0020 / C6915 / CPx7xx-0030 / CX50x0

Back to overview

type number | module | CP62xx-0020 / C6915 / CPx7xx-0030 / CX50x0
 |  | WES (Image v2.2) | CE6.0 (CP77xx-0030, Image v3.22, MDP v1.0.4.47)
0x0002 | NIC |  |
0x0003 | Time |  |
0x0004 | User Management |  |
0x0005 | RAS | - |
0x0006 | FTP | - | -
0x0007 | SMB |  |
0x0008 | TwinCAT - RunAsDevice - ShowTargetVisu - Log File size - Log File Path |  |
0x0009 | Datastore |  |
0x000A | Software |  |
0x000B | CPU - Temp |  | -
0x000C | Memory - Storage Memory Allocated - Storage Memory Available - Memory Division |  |
0x000E | Firewall WinCE | - |
0x0010 | File System Object |  |
0x0013 | Display Device |  |
0x0014 | EWF |  | -
0x0015 | FBWF |  | -
0x0017 | Silicon Drive |  |
0x0018 | OS |  |
0x0019 | RAID |  | -
0x0100 | Misc |  |


Typübersicht Module

IPC Diagnostics

MDP Feature Support for CX9000 / CX90xx / CP66xx / CP6608

Back to overview

type number | module | CX9000 / CX90xx / CP66xx / CP6608
 |  | CE6.0 (Image v3.10)
0x0002 | NIC |
0x0003 | Time |
0x0004 | User Management |
0x0005 | RAS |
0x0006 | FTP |
0x0007 | SMB |
0x0008 | TwinCAT - RunAsDevice - ShowTargetVisu - Log File size - Log File Path |
0x0009 | Datastore |
0x000A | Software |
0x000B | CPU - Temp |
0x000C | Memory - Storage Memory Allocated - Storage Memory Available - Memory Division |
0x000E | Firewall WinCE |
0x0010 | File System Object |
0x0013 | Display Device |
0x0014 | EWF | -
0x0015 | FBWF | -
0x0017 | Silicon Drive |
0x0018 | OS |
0x0019 | RAID |
0x0100 | Misc |


Typübersicht Module

IPC Diagnostics

MDP Feature Support for CPx7xx-0000 / CX1000

Back to overview

type number | module | CPx7xx-0000 / CX1000
 |  | WES (Image v2.2) | CE6.0 (Image v3.22)
0x0002 | NIC |  |
0x0003 | Time |  |
0x0004 | User Management |  |
0x0005 | RAS | - |
0x0006 | FTP | - |
0x0007 | SMB |  |
0x0008 | TwinCAT - RunAsDevice - ShowTargetVisu - Log File size - Log File Path |  |
0x0009 | Datastore |  |
0x000A | Software |  |
0x000B | CPU - Temp |  |
0x000C | Memory - Storage Memory Allocated - Storage Memory Available - Memory Division |  |
0x000E | Firewall WinCE | - |
0x0010 | File System Object |  |
0x0013 | Display Device |  |
0x0014 | EWF |  | -
0x0015 | FBWF |  | -
0x0017 | Silicon Drive |  |
0x0018 | OS |  |
0x0019 | RAID |  |
0x0100 | Misc |  |


Typübersicht Module

IPC Diagnostics

MDP Feature Support for CPx7xx-0020 / CX1010

Back to overview

type number | module | CPx7xx-0020 / CX1010
 |  | WES (Image v2.2) | CE6.0 (Image v3.22)
0x0002 | NIC |  |
0x0003 | Time |  |
0x0004 | User Management |  |
0x0005 | RAS | - |
0x0006 | FTP | - |
0x0007 | SMB |  |
0x0008 | TwinCAT - RunAsDevice - ShowTargetVisu - Log File size - Log File Path |  |
0x0009 | Datastore |  |
0x000A | Software |  |
0x000B | CPU - Temp |  |
0x000C | Memory - Storage Memory Allocated - Storage Memory Available - Memory Division |  |
0x000E | Firewall WinCE | - |
0x0010 | File System Object |  |
0x0013 | Display Device |  |
0x0014 | EWF |  | -
0x0015 | FBWF |  | -
0x0017 | Silicon Drive |  |
0x0018 | OS |  |
0x0019 | RAID |  |
0x0100 | Misc |  |


PLC

0x8nn0
SubIndex | Type | Name | Value | Type | Access
00 | VAR | Len |  | UNSIGNED16 | read-only
01 | VAR | Address | 0x0012 00nn | UNSIGNED32 | read-only
02 | VAR | Type | PLC | VISIBLE STRING | read-only
03 | VAR | Name |  | VISIBLE STRING | read-only
04 | VAR | Dev Type | 0x0012 2710 | UNSIGNED32 | read-only
0xBnn0 – Browse (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | pathLen
char[pathLen] | szPath
OutputData
Type | Name
UNSIGNED32 | Version = 1
UNSIGNED32 | cbData
UNSIGNED32 | cItems
UNSIGNED32 | nMaxReadLen
UNSIGNED32 | nOffsFirstPath

A struct of following structure is returned:

struct
    _TPathInfo
{
UNSIGNED32 nOffsNextPath;
UNSIGNED32 cchPath;
UNSIGNED32 cchAdsType;
UNSIGNED32 dwVarType;
UNSIGNED32 dwVarSize;
BOOLEAN hasSubItems;
//char[cchPath] szPath
//char[cchAdsType] szAdsType
}

0xBnn1 – Get Item Info (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | pathLen
char[pathLen] | szPath
OutputData
Type | Name
UNSIGNED32 | varType
UNSIGNED32 | adsType
UNSIGNED32 | varSize
BOOLEAN | hasSubItems
0xBnn2 – Get Variable Value (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | pathLen
char[pathLen] | szPath
OutputData
Type | Name
UNSIGNED32 | varType
UNSIGNED32 | varSize
varType | Value
0xBnn3 – Set Variable Value (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | pathLen
UNSIGNED32 | cbValue
char[pathLen] | szPath
BYTE[cbValue] | pValue
0xBnn4 – Get Variable Value Sum (Service Transfer Object)
InputData
Type | Name
UNSIGNED32 | Version = 1
UNSIGNED32 | cbData
UNSIGNED32 | hContinue
UNSIGNED32 | cItems
UNSIGNED32 | nMaxReadLen
UNSIGNED32 | nOffsFirstPath

A struct of following structure is returned:

struct
_TPath
{
DWORD nOffsNextPath;
DWORD cchPath;
//char[cchPath] szPath
}

OutputData
Type | Name
UNSIGNED32 | Version = 1
UNSIGNED32 | cbData
UNSIGNED32 | hContinue
UNSIGNED32 | cItems
UNSIGNED32 | nMaxReadLen
UNSIGNED32 | nOffsFirstPath

A struct of following structure is returned:

struct
    _TValue
{
DWORD nOffsNextValue;
DWORD dwSize;
//char[cchPath]
    szPath
}