The leader in industrial automation and control solutions

Applicable Model(s)

cMT Series
cMT X Series

Title

Configuring cMT CODESYS Project as a PROFINET Controller

Date

5/23/2025

Rev

00

P/N

0907-5160

Summary

The built-in CODESYS runtime for the cMT and cMT X series of devices gained support for PROFINET communication as a PROFINET Controller as of CODESYS firmware version 20250212. Enabling PROFINET communication involves configuration of the CODESYS project to include the proper devices and configuration.

Enabling PROFINET communication for the cMT and cMT X series’ built-in CODESYS runtime requires that supported versions of firmware and packages be installed. All the resources below can be downloaded from the Maple Systems website:

  • The CODESYS firmware on the cMT and cMT X series must be updated to version 20250212 or later to PROFINET communication.
  • The CODESYS & Remote IO Package version 1.5.3.516 or later must be installed into CODESYS IDE to support PROFINET communication on the cMT and cMT X series.
  • CODESYS IDE v3.5, SP15, Patch 5 (v3.5.15.50) is the recommended version for development of projects for the cMT and cMT X series’ built-in CODESYS runtime at the time of writing this document.
  • The “PN-Controller” device, version v3.5.12.60, is the recommended version of the device to add into CODESYS IDE projects for enabling PROFINET communication on the cMT and cMT X series.

Note: Using firmware, software, package, and devices versions other than the ones listed above may result in errors within CODESYS IDE, loss of communication, or other unexpected behavior.


Solution

To enable PROFINET communication, users must acquire and install the correct PROFINET General Station Description (GSD) file into the CODESYS IDE device repository, then add and configure the correct devices in the Device Tree.

Note: This demonstration utilizes a GSD file exported from TIA Portal v19 which uses an XML based description. For this reason, the GSD file imported into CODESYS IDE has the “.gsdml” file extension.


Importing the GSD File into the CODESYS IDE Device Repository

1.

A GSD file for the PROFINET device being connected must first be exported from the device’s programming software. Refer to support/documentation for the respective PROFINET device to acquire this GSD file.

2.

In CODESYS IDE, select the Tools menu from the top ribbon, and then open Device Repository:

Select Tools then Device Repository

3.

In the Device Repository popup, select Install and navigate to the GSD file being imported:

Select Install

4.

Note the name and path of the newly installed GSD file in the Device Repository. In this case, a device was added under Fieldbusses > Profinet IO > Profinet IO Slave > PLC_1:

Select your PLC.

Adding the Devices into the CODESYS IDE Project

Note: It is possible for device versions from other CODESYS IDE installations on a development computer to appear. It may be necessary to view device versions specific to the current instance of CODESYS IDE by selecting the “Display all versions (for experts only)” checkbox in Device selection dialogs.

1.

In the Devices Tree, right-click the parent device and select Add Device… from the context menu:

Add device in device tree

2.

Under Fieldbusses > Profinet IO > Ethernet Adapter, add an Ethernet device:

Select Ethernet under Fieldbusses

3.

In the Devices tree, right-click the new Ethernet device and select Add Device…:

Add Device in Ethernet

4.

Under Fieldbusses > Profinet IO > Profinet IO Master, add a PN-Controller device:

Select controller from Fieldbusses

5.

In the Devices tree, right-click the new PN-Controller device and select Add Device…:

Add device from controller

6.

Add the new device that was installed to the Device Repository in the last section. The name and location will differ depending on the GSD file imported. In this example, a device was added under Fieldbusses > Profinet IO > Profinet IO Slave > PLC_1:

Device added under Profinet IO Slave

Configuring the Devices in the CODESYS IDE Project

1.

Double-click the Ethernet device to open its properties. Then, under the General tab, select the icon next to the Interface box:

Select three dots button

2.

Select the interface named “eth0” from the list. This will configure the Ethernet device to use the LAN 1 port on the cMT or cMT X series device for communication:

Select "etho0"

3.

Double-click the PN-Controller device to modify its properties. Then, under the General tab, enter the correct IP address range for the PROFINET device, as well as the correct Peer station/port information:

Double click to modify PN Controller properties

4.

Double-click the PROFINET Device that was added from the imported GSD file. The name of the device will differ depending on the imported GSD file. In this example, the device was named PLC_1. Under the General tab, enter the correct Peer station/port information:

Select the Profinet device

5.

Finally, under the PNIO I/O Mapping tab of the PROFINET Devices’ properties, map the variables/memory of the device to variables in the CODESYS IDE project:

See PNIO I/O Mapping tab to map devices

When the CODESYS IDE project is downloaded to the cMT or cMT X series device and placed into RUN mode, the devices added in the previous section should show the green “connected” icon indicating PROFINET communication is working:

Finished product