Modbus Serial communication Library

Hello!!

We are using Codesys v3.5 SP16 Patch-1 for Opto22 (GRV-EPIC-PR1) EPIC PR1.

  • We have mounted serial communication module (GRV-CSERI-4) and tiring to configure and create using Codesys but we couldn’t find library for Modbus serial communication.

  • We have downloaded the version 2.02.1 library from opto website and installed. But we couldn’t find and it’s not available Modbus serial communication Master/Slave library to configure. Pl check below screenshot for your reference.

  • Our demo also based on serial communication.

So Pl assist to us how to do this Modbus serial communication in codesys on urgent basis.

Hello there.
The Modbus is not part of the Opto library. It is another Codesys module you need to add.
I am not as up to speed on the Codesys library as @greichert is, he will be along shortly to help out.

@Beno is correct, you need add the Modbus Serial library separately. It can be purchased from Codesys online store.

US Codesys Store
International Codesys Store

For Fieldbus support with Codesys, you can start with the Codesys Help Site for Fieldbus Support

1 Like

I use the serial card with Modbus RS485 there is one quirk when using the codesys library (CODESYS Modbus Serial Master SL). The Opto22 PR1 modbus serial device definition does not exist. So, I added a codesys device that allows modbus serial (a raspberry pi); created the modbus master and slaves and then copy and pasted the modbus device into the PR1. It worked. You can test it out before buying the license from codesys. I think they just limit you to 2 hours.

1 Like

Hello…!!

Thanks for the reply… I had Purchased Modbus Serial Library in International Codesys Store.

They had provided ticket number. But they did not provided library file downloading link.
Where can we get that library file.?
I have activated that Modbus RTU Ticket (XXXX XXXX XXXX XXXX) in our device (GRV EPIC PR1). License also showing. But we couldn’t find any serial communication setting in Codesys v 3.5 SP16 Patch1 to configure.

This is good to know. We are new to Opto and from our team standpoint are more inclined to use Codesys.
We have taken over a lot of customers who are currently have SCADApacks using Modbus RTU over UHF radios on their remote sites with the master being located at their “office”.

They do not want to upgrade communications, but want hardware upgrades, so if the GRV-CSERI-4 can be used as master and slave we might have a fighting chance for integrating with the SCADApacks with the hope of one day getting rid of all the SCADApacks.

@reevesjj is correct, I verified this methodology, and made the development team aware of the current limitations, and a direct method will be added in future firmware.

Here is a quick way to get it into an EPIC Application:
I created a standard empty EPIC project:

Then I right clicked on the root folder(in this case RTU_TEST), and then down to Add Device:
image

Then select any Codesys controller that has serial connectivity(the above recommendation was for raspberry pi), but any will work:

Now I have two applications:
image

On the top application I right click and Add Device again:

And I can now add a serial fieldbus device:


Then I just cut/paste it into my new application, and delete the other application all together:
image

Hope this helps get started.

Thanks for the information. I have already tried this way by using “CODESYS Control for Raspberry Pi MC SL | CODESYS Store International” “Respberry-Pi-MC-SL” and Modbus RTU library and license with PR1 controller. And serial communication is working now.