Advice for Modbus?

Up on now, my script is using the

  • node-red-contrib-modbus and
  • node-red-contrib-buffer-parser

to access several Modbus-TCP solar devices with and without SunSpec. The script runs fine and stable for month with my dashboard. Now, there are several more devices in the house what do not have ethernet interface and use RS485 for Modbus-RTU only:

Wachendorff URDR 001 what is a hardware PID regulator
(beside the NR script based PID) and a energy multi meter
Tense TPM04-SH also using Modbus-RTU.
For the hardware wiring, TCP is a benefit as the installation is distributed over 2 buildings and network switches are already present everywhere. This way, I hesitate to tackle trying the modbus RTU by use of serial interface COM or TTY access by NR. As a possible hardware solution, I found a chinese RS485 to Eth converter what claims to do a Modbus RTU to Modbus TCP conversion.

On the other hand, this converter can be used as a pair what converts RS485 to TCP and converts back to serial interface with a second hardware converter (schematic 2) or even a virtual serial software port (schematic 3). Possibly emulating a Modbus TCP device with only one converter is the most direct way what does not require any other NR libraries. (schematic 4)

Anybody here with experience for Modbus-RTU or is it better to try the TCP approach first without using RS485 serial connection before?

Here are the 4 imaginable possibilities for connection. For 1,2,3, NR access is to (virtual) serial interface while 4 is direct Modbus TCP.

I do a lot of modbus TCP/RtU with my solar and battery inverters and power meters.

I use 3 of the exact devices you have shown above (actually two the same as that and one with POE) and they have been flawless.

I also use a couple of the 4 port HF modules also

https://www.aliexpress.com/item/4001021845924.html?spm=a2g0o.productlist.main.42.7b5afAxifAxiBN&algo_pvid=e93d7d19-5d8d-49f2-a3a0-ccf13e9573ba&pdp_ext_f={"order"%3A"6"%2C"eval"%3A"1"%2C"fromPage"%3A"search"}&utparam-url=scene%3Asearch|query_from%3A|x_object_id%3A4001021845924|_p_origin_prod%3A

Craig

1 Like

If the existing Ethernet network is used for general purpose computing and not specifically industrial, then be mindful about mixing your industrial data in with this. It will work, but there are things to consider in terms of security and potential traffic issues.

A lot of industrial TCP devices that use Modbus may use 10/100Mbps, just check the specs.
Also, check timeout settings.

I would consider connecting the RS-485 devices up on a single multi-drop line and bring that back to where you have the control system. If you don't have a suitable RS-485 communications port on the controller being Modbus master, use the RS-485 to Ethernet converter at this point.

Modbus RTU has its place and works very reliably and there are situations where this is the better way rather than to simply push it all on Ethernet, unless you have separation between networks, a dedicated network for your industrial equipment.

Remember Modbus RTU over RS-485 will be quite robust and you will easily go longer distances than Ethernet when selecting the correct baud rates.

Another method is to look at special wireless devices, such as Advantech Wise 4200 series.
The AP unit has EThernet and will poll the remote slave devices which can have various I/O modules together with their own Modbus RTU port. This units again are robust and reliable and I have tested these to over 5km range. Advantech Wise 4210 Modules

I'm sure there are many other similar type devices.