Modbus data source setup
-
Hi there I am hoping someone can assist here
I am trying to add 2 MODBUS data sources but am getting a “No response from slave error” for each device. (however when I test in a Modbus test programme I am having no issue and am able to send commands and receive responses with no delay etc) I have double checked the settings on the devices match the Mango serial properties for each data source
1)The First device is a Level Meter connected on virtual com port via RS485 Modbus RTU (connected on a COM2)
It is not detected on the Modbus Node Scan and generates a ” error
2) The second Device is a Flow meter connected on a virtual COM port via RS485 Modbus on (COM1)
It is not detected on the Modbus Node Scan and generates a “no response from Slave 2” error
Are there settings elsewhere I need to configure in Mango?
-
@patd2020 said in Modbus data source setup:
(however when I test in a Modbus test programme I am having no issue and am able to send commands and receive responses with no delay etc)
Hello Pat,
The program you referenced, is this software that shipped with the device?
When you run this program, are you using the same computer and Comm ports on which you are running Mango?
If yes, then we know the comm ports and wiring are working.I find that scan node often doesn't work with devices. The better tool for troubleshooting in Mango I think is the Modbus read data tool.
Double check all your comm port settings, Baud rate, etc then verify you Register range. It seems like a lot of newer devices typically use Holding register. I would set the Number of registers from 100 to 1 or 2. Be sure to disable the data source while you are using the Read Data Tool.
Hope this helps!
-
Hi Woody, thank you for taking the time to reply. the modbus test software is generic not supplied with the device. i checked the comm port settings and they match. So I wonder if my serial to ethernet converters servers for some reason are not playing nice with Mango. Because they work with the test software.
Basically each modbus device is connector to a serial to ethernet converter see drawing (thetop part is description bottom part just icons of the same) and a virtual comm port is created for each device.They also support IP so I tried MODBUS IP and get the same no response error. but if I change the ip port from the real one to a random ip port I get a timeout error. Which makes me think the connection settings are right and the request to the slave is getting through but just not getting a response from the devi0_1466476518946_ConnectionDrawingt.pdf ce.
Any thoughts?
-
Try checking the Override timing box and leaving the settings as 0. This leaves the timing up to the adapter and can work much better. We are changing the way this works in the next release.
-
You probably need a longer timeout setting if this is going over the internet. I would try up to 5000 ms.
-
Thanks for your suggestion Joel but still getting the no response error
-
I think you'll need to run a Modbus packet capture software on the end of the virtual com port to verify what communication is or isn't coming out.
The error you are seeing in Mango just means Mango sent out a message and didn't get any response back from the device.
-
any recommendations
for this type of software? -
Here is a good free one: http://www.isquared.ca/English/downloads_CC.htm RS-485 spy
-
Hi Patd,
Some other thoughts as I'm also reading...
Is it possible the slave IDs are flipped / mistaken? I see COM1 trying to talk to slave 2, and COM2 trying to talk to slave 1. Sometimes operating systems can switch their identifier on you at a reboot and such.
You can try to make equivalent requests from your test software and Mango through Modbus IP to netcat, then compare (or if you're feeling serial you can cat -v /dev/ttyUSBN)...
[sudo] nc -l 900 > testSoftware *run query from test software pointed to this machines ip, port 900* [sudo] nc -l 900 > testMango *run query from Mango* hexdump -C testSoftware hexdump -C testMango
But alas you are probably using Windows with names like "COM1" :P You can do it if you have a Linux system on hand.
-
Thanks Joel & Phil. yes I see your point about the non matching slave/com port. I should have matched it to avoid confusion but that is actually how they are setup/ Slave 1 on Com2 and slave2 on COM1. Yes I am on Windows. I will attempt to run your suggested tests and report back
-
here is the RS485 Modbus guide for the Flow m0_1466480777062_FlowRS485.doc
-
Here is an update. I now can read the registers of both devices. the second device which had Modbsus ASCII as default I had to change to RTU. Now I need to figure out how to set up the data points
-
Sorry I meant to say I change the data source to MODBUS IP because I could not get the COM to to work