TCP/IP Data Source, Talking to MOXA Serial RS232?
Hey Guys, long time no chat, Mango works so well I haven't had to touch the system I put in for running an irrigation system.
Now I have a case where I have the following setup:
Mango -> TCP/IP Data Source -> Moxa Ethernet to RS232 Converter -> Solar Reg (RS232)
I've tried a few things but struggling to get my head around the syntax required, I just don't get any response. The Moxa is in TCP Server Mode which connects to the serial port and waits for instruction from the TCP Port 4001.
I have to send the regulator the following commands for example:
AA 55 AA 55 AA 55 EB 90 EB 90 EB 90
I had a look at the wiki and tried a couple of things on there related to both serial data source and TCP/IP data source with no luck.
Any help would be much appreciated thanks :)
duncan last edited by duncan
I presume you are using one of the Moxa MGate series Modbus TCP gateways. We use these devices extensively with Mango and they are fairly easy to setup.
My advice is to ensure you have the correct wiring on the DB9 from your RS232 device to your Mgate. On the Moxa Mgate DB9 pin 2 is RxD, Pin 3 is TxD and pin 5 is ground.
Download and install the Mgate manager software. Configure the Mgate accordingly RTU slave or ASCI Slave.
Ensure you have the correct settings in the Serial section that corrspond to your RS232 device.
Ensure you have the correct IP settings. Save this configuration to the Mgate device. Check your IP settings on Mango as well.
Download a copy of Modscan or similar and test your Modbus connectivity. If you cant see any data then Mango cant either. The default port is 502 (TCP) on both Mango and the Mgate.
Hi Duncan, thanks for your reply. I too have a lot of MGate MODBUS units around, this setup unfortunately is direct serial and not MODBUS.
We are using NPort 5150's to convert RS232 serial to Ethernet, there is no MODBUS involved here. The Moxa listens on port 4001.
If it was MODBUS I'd probably have no issues as we've done it before many times. The regulator we need to talk to only talks serial.
The later models do support MODBUS but we are wanting to talk serial for the old ones.
Woody Beverley last edited by
Perhaps Wireshark can help you with this troubleshooting.
Shooting from the hip.....
We suspect maybe the issue is in sending HEX values. Since the datasource uses Strings maybe you are trying to send binary values but they are being transmitted as ASCII characters.
Pretty sure the data source converts the Read command and Write command to the UTF-8 charset. This makes sending 0xAA (170 decimal) a problem because there is no UTF-8 char for that value.
Hi Woody, thanks for that. I will investigate further.
I think we'll definitely have more luck with the newer regs that support just straight MODBUS over IP, much easier to setup ;)
phildunlap last edited by phildunlap
This post is deleted!