Hoops123 Posted March 24, 2023 Report Share Posted March 24, 2023 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 More sharing options...
MVP 2023 Flex727 Posted March 24, 2023 MVP 2023 Report Share Posted March 24, 2023 What PLC are you using? Link to comment Share on other sites More sharing options...
Hoops123 Posted March 24, 2023 Author Report Share Posted March 24, 2023 We use USC- B5-T42 for our projects but in this instance my question is just regarding modbus as I cant do anything with the macines that we have bought in. The energy meters are independant of the machine we just put the CT on the power in cable. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted March 24, 2023 MVP 2023 Report Share Posted March 24, 2023 If the energy meters Modbus RTU ports are RS485 and they are addressable you can daisy-chain them all together and run them into one Ethernet converter. What is the make and model number of the energy meter? Joe T. Link to comment Share on other sites More sharing options...
Fernando Castro Posted March 24, 2023 Report Share Posted March 24, 2023 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 More sharing options...
Hoops123 Posted March 27, 2023 Author Report Share Posted March 27, 2023 Thanks for your replies! The part number is WND-WR-MB from a company called Continental Control Systems. Maybe this is a sign of things to come. I opened a chatGPT account and asked it to write the C# code and it did. Just starting to test it now. Link to comment Share on other sites More sharing options...
Fernando Castro Posted March 27, 2023 Report Share Posted March 27, 2023 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. 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 More sharing options...
Hoops123 Posted March 27, 2023 Author Report Share Posted March 27, 2023 Thanks Fernando, this is the first I have heard of Node-red, I'll look into it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now