Beijer HMI via Modbus Codesys

Hi Ben,

We are trying to establish communication between our Groov Epic PR1 and the Beijer HMI (with the HMI as the Master (Client) and the EPIC as the Slave (Server).

We have purchased the CODESYS Modbus TCP Server SL library and are using CODESYS software. However, we are still encountering issues in establishing communication.

Could you please provide a solution or guidance on this?

Hi there. Welcome to the OptoForums Bhushan.

Can you explain ā€˜encountering issues’ a bit more please…
@greichert is our Codesys guy while I have done some work with port 8502 Modbus, but we both need more than whats in this post.

How are the HMI and the EPIC connected?

How are the HMI and the EPIC connected?
Ans:- Through Modbus TCP/IP

When we communicate with the EPIC as the slave (server) and the HMI as the master (client), the communication works smoothly. However, our requirement is for the Beijer HMI to be the master (client) and the EPIC to be the slave (server).

My query is simple: How can I communicate between the Groov Epic PR1 and the Beijer HMI using the Modbus TCP/IP protocol in CODESYS, with the Beijer HMI as the master (client) and the EPIC as the slave (server)?

SA UMS

Hi Ben,
I’m awaiting for your response…

Sorry, thats not what I meant.
I mean what Ethernet ports are you using?
Eth1 or Eth0

Ah, so everything is working fine, there is no issue?
Why do you need to swap it around if you have it working?
What is the reason for not using it how its working?

Sorry to keep you waiting, its 3am in the morning here in USA.

Are you using port 8502 for the Modbus?
Can the Beijer use port 8502?

[quote=ā€œBeno, post:8, topic:6341ā€]
what Ethernet ports are you using?
Ans. Eth0

Please read this

And read this

@projects5 Hi Bushan,

What you write here is exactly the same. You write that EPIC as the Slave is working with the HMI as the Master smoothly.

Here another proposal:
Did you try to use the OPC-UA Server in Codesys and use the OPC-UA client in the Beijer HMI Terminal? That seems to me a more elegant way to communicate between the HMI (Master/Client) and Codesys on EPIC.

Here you can get information about enabling the OPC-UA Server in Codesys on EPIC:
https://training.opto22.com/path/codesys/connecting-groov-view-gadgets-to-codesys-tags-using-opc-ua

And here the OPC-UA Client section for the Beijer HMI Terminals:
https://www.beijerelectronics.com/docs/iX-251-Reference/en/controller.html#opc-ua-client

If you still insist to use Modbus-TCP, then follow the firewall settings as Ben referenced to and make sure the I/O Modbus-TCP Slave is disabled. If you have done all this, and configured the Codesys side correct, the PR1 should reply to the master.

Perhaps use a tool like Modscan to test this.

Hi Gerhard,
I have already made the settings as you suggested and referenced. Accordingly, I have also purchased this Codesys Modbus Device SL.

The Codesys Modbus Device SL is successfully licensed.

Can you please guide me on how to add the ModbusTCP_Server_Device to my program? I searched for it in the program, but I couldn’t find it in my library. Once I have this, I believe my communication issue might be resolved.

ModbusTCP Server Device

Hello, Here is a video link for setting up the Modbus TCP Slave device in Codesys, it is using a different PLC in the example but the setup will be similar for the Epic: https://www.youtube.com/watch?v=8XYEzj9Zrkk

1 Like