FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
+1 vote
2,291 views 4 comments
by

Hello,

I have an application where i am reading from a Modbus RS485 (2-wire) slave device.  I know for certain that my slave device works correctly as i have connected to my PC using Modbus software and a USB to RS485 adapter. 

Steps i have taken:

  • I have enabled RS485 under Modbus Serial Master and set the correct baud, and other settings. 
  • I have also created and enabled the slave with the correct slave ID.
  • Edited the new slave device, set the data type, function, register and register count (it's a 32bit float, so i've tried both 1 and 2 registers, my assumption is that it should be 2 registers since each Modbus register is a 16 bit value)
  • It's a 2 wire system so i have jumpered D+/R+ and D-/R- (center and left pins) together and connected my slaved device to those jumpers.
  • My device has an optional 120ohm resistor, so i tried enabling and disabling that as well
  • Opened up the RUT955 to look for an internal resistor jumper but did not find anything.

With all those iterations i could not get a response from the slave. Again, the slave is working fine with other masters, so the problem is somewhere with the RUT955 or the configuration settings on the RUT955.

Does anyone have any troubleshooting tips? Is there any way to tell if the request is actually making it to my slave device and/or any sort of descriptive error log?

Thanks

by

Sir,

If you have RS485 to USB converter, I request you to test 955 with your PC (PC should have a modsim software ).

If it is working then test with your device as you said your device is working firne with the same RS485 to USB converter.
and take help of this link- https://wiki.teltonika.lt/view/RUT955_Modbus
and while testing make sure serial port is disable here - ServicesRS232/RS485> RS485

by
Thanks for the suggestion. Rather using Modsim, i used Simply Modbus which is much more detailed and has both client and slave modes.

I first tested my slave device from my PC, and checked the bytes coming from the PC to the slave and the response.

I then setup my PC in slave mode and checked the bytes coming from the RUT955 to the PC when requesting data. the PC received the data, sent a response and the RUT955 correctly received the response. this is great as it means that the RUT955 is definitely working in Modbus RS485 Master mode.

What's  very interesting is that the request bytes sent from the RUT955 to the PC match the request bytes sent from the PC to the slave when i'm running successful tests.  This means that for some reason my slave device is unable to send data back to the RUT955. I've tried with and without termination resistors on the slave and it doesn't seem to make a difference. I'm stumped.

From PC to slave: Request: [02 03 00 00 00 02 C4 38], Response [02 03 4B 69 C4 31 9D DF]  

From RUT955 to slave: Request: [02 03 00 00 02 C4 38], Response = error from RUT955 [No Response from slave]. I wish the test mode would show the actual bytes sent and received so i could confirm if the slave was even trying to respond. All the baud, parity, stop bits, data bits are all the same in all of my tests.  There is nothing i can see that would indicate that the slave would not respond to the RUT.  This slave also works with other hardware based modbus data loggers, so it seems to be something internal to the RUT.  I do not know if my PC USB-RS485 adapter has a built in termination resistor, but i assume that it does not.
by
Just FYI, i've gotten it to work. I added a 120ohm resistor on the RS485 port of the modem itself and everything was fine. It did not seem to matter whether or not i had a terminating resistor on my slave device. Thanks for the troubleshooting tips!

3 Answers

+1 vote
by anonymous

Just copying the comment to answer section:

Just FYI, i've gotten it to work. I added a 120ohm resistor on the RS485 port of the modem itself and everything was fine. It did not seem to matter whether or not i had a terminating resistor on my slave device. Thanks for the troubleshooting tips!

Best answer
by

Hello,

Can u please share the complete configuration you use for that.

Thanks in advance.

0 votes
by
Hello,

Can u please share the complete configuration you use for that.

Thanks in advance.
0 votes
by

I'm having similar problems with Modbus RS485 on the TRB245. I'm trying to connect a Produal HDH regulator. I've verified that the regulator is working both via a dedicated RS485-TCP/IP gateway and through a USB dongle with Modpoll.

My original settings were with 16bit INT, high byte first, Baud rate 9600, No parity, 1 Stop bit and no Flow control. I've also tried it with other parities to no success.

The most uncertain part to me is the wiring, but I've tried it this way with and without a resistor bridged between the 2 Wagos, as well as having reversed the 2 white cables that go to the regulator.

Could anyone give me pointers to what I may be doing wrong?