Showing results for 
Search instead for 
Did you mean: 

Looking for a Modbus TCP example program

Looking for a Modbus TCP example program

New Contributor


I want to communicate with a third party component via Modbus TCP. Unfortunately, I have very little experience with Modbus TCP. Is there anyone who has a working example project or similar that they would like to share with me?

Thanks in advance!



Hello, if you want to read and write with a ctrlX to a Modbus TCP device ("slave") you have several posibilities:



Is there more information available about using the:


Yes, you are right. Im looking for a specific program for IEC63111 PLC program.

There is PLC library name CXA_ModbusTCP in ctrlX PLC engineering.

In this library, you may using FB of IL_ModBusTCPClient as a client of modbus TCP. You can find a simple code example.


About how to install the "node-red-contrib-modbus-node" see his read.


About the PLC library "CXA_MODBUSRTU" see this thread.

Occasional Contributor

There is another possibility with the Modbus TCP App, where the Modbus Register will be available in the Data Layer realtime.

Hello  cc2go

I need to set up the ctrlX core as a modbus slave and connect it to a master (robotcontroller in my case). Can this be done with this app?

Is the app already available?

Thanks in advance.


@RobotART_Walter The app is at the moment in prototype phase. Please get in contact with your known sales person for getting access to it.

For the actual functionality please have a look to the store page in our community. At the moment you can set up a ModbusTCP Client that can communicate via every standard ethernet port of the ctrlX CORE to a connected master.

Does it matter over which port (XF51 or XF10) the Modbus TCP signal is sent over? 

Like mentioned above every standard Ethernet port can be used. You simply have to set up the network settings correctly. The only not usable port is XF50 as is reserved for EtherCat only.

Occasional Contributor

I've heard a solution is found. And it's working with the ctrlX CORE.

The robot is a Modbus Client, the ctrlX core must be a Modbus Server, it doesn't matter RTU or TCP. The CXA_Modbus Libs can be used.