CodeSys to Modbus TCP for E1

Here is a small CodeSys project that shows Epic connected to a Modbus TCP device using Ladder Logic under CodeSys.

It was part of a proof-of-concept for a system upgrade. Optomux B1 brains were being replaced with ethernet E1 brains and the desire was to use Epic with the CodeSys Ladder Logic. The E1’s have Modbus TCP built-in. Everything you need comes with the Epic’s version of CodeSys.

Attached are a step-by-step document.
This project shows, in almost the simplest possible way, how to connect to Modbus TCP devices.

CodeSys (V3.5 SP15 Patch 4) .
The Epic is running firmware 1.5.0

image
EPIC CODESYS TO MODBUS TCP DEVICE-5-8-2020.zip (1.3 MB)

1 Like

I’m curious if CodeSys can talk to these using OptoMMP too?

CodeSys does not talk to an E1 using MMP, and I don’t think it will. That is why I used Modbus.
The Modbus TCP feature is built into our version of CodeSys. I’m just getting started, but the more I learn CodeSys the more I like it.
My understanding is that the Opto CodeSys library contains extensive information about each device. So even though Epic CodeSys uses MMP to talk to another Epic, it is because the IO has been thoroughly defined by the library. So while Epic could conceivably talk to an E1 or E2, the libraries would have to be expanded to include legacy IO, which I don’t believe is going to happen.

1 Like