Jump to content

Modbus


Hoops123

Recommended Posts

Hi,

Has anyone attempted to convert modbus RTU to TCP using C# or any other PC based method?

We are about to purchase 40 energy meters that use modbus RTU for each of the machines on the shop floor, we are told by the saleman that we have to purchase modbus RTU to TCP converters to get the data on the network. At $200 each multiplied by 40, i wondering if I can get around having to buy them. Each machine has a normal PC connected to it, so I'm thinking I can send the RTU to the PC via a serial port then covert to TCP to get the data on the network.

Link to comment
Share on other sites

6 hours ago, Hoops123 said:

Hi,

Has anyone attempted to convert modbus RTU to TCP using C# or any other PC based method?

We are about to purchase 40 energy meters that use modbus RTU for each of the machines on the shop floor, we are told by the saleman that we have to purchase modbus RTU to TCP converters to get the data on the network. At $200 each multiplied by 40, i wondering if I can get around having to buy them. Each machine has a normal PC connected to it, so I'm thinking I can send the RTU to the PC via a serial port then covert to TCP to get the data on the network.

I am pretty sure that there are already solutions for this, but the short answer is YES, there are Modbus libraries for pretty much anything.

also, which will be the end destination of the data? if it is only for data collection purposes, dumping everything into a database could be a good approach I suggest using Influx DB/Telegraf (Its free and open source self-hosted, or you could pay and use the cloud):

Modbus Master Monitoring | Influx Data

you could install a Telegraf client on each machine and configure the output plugin to dump the data into a single database.

other solution, could be use Node-red + the Modbus nodes, you could create a virtual Master to read from the physical slaves, then send the data over Modbus TCP to the real Master:

Node-RED (nodered.org).

Also, open source and easier since is No code" interface".

The only caveat using either of those suggestions is that you need to have the software running as services on starting in each computer.

 

 

 

 

Link to comment
Share on other sites

Let me know if it works, I have asked chat GPT for some stuff, but I don't really trust its results. at least as something that I could copy/paste and it work at the first try but if you know what you are doing then yes, with some tweaks you could make it work.

 

btw Ising Node-Red it should look like something like this:

the buffer-parser node just in case that you need to swap bytes or something like that.

 image.png.bff0eef2214eef8a886cbafc455b16ea.png

 

The beauty of Node-Red is that runs in the background, and you access thru a web interface. 
 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...