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.
0 votes
404 views 9 comments
by anonymous
Can someone please show me a photo of how they have wired up the RS485 connection for half duplex operation?

I am having issues and I'm certain the slave device is configured correctly so want to double check the wiring arrangement on the TR145 side. Could anyone share an image?

Thanks heaps!

(Updated to include the figures discussed in the Answer).
by anonymous
Alternatively if there is another thread where this has been answered could someone please point me to it?

Thanks in advance!
by anonymous
Hey again,

I've continued my testing with your support and made some progress but i'm still getting issues in regards to the messages I am getting from the web portal which indicates and error but i cannot understand where the error is.

I have setup a modbus server (slave) on my PC connected via USB to serial (wiring as per Fig 0 and 1)

In the modbus server i get reasonable responses (Fig 2) but in the web portal (Fig 3) it still thinks there is no response from the slave device when there clearly is.

Is anything I'm doing wrong? Hard to understand why its so hard to get a feedback from the device when I can clearly see the modbus slave responding with Tx messages after recieving the RX message from the modbus master (TRB145).

Any advice would be amazing.

1 Answer

+1 vote
by anonymous

Hi,

Information regarding RS485 serial connector on TRB145 can be found HERE. Please, take a look at the pinout information.

As you have requested, here is an example of RS485 wiring:

A (D+) connects to D_P (D+) shorted with R_P (R+)

B (D-) connects to D_N (D-) shorted with R_N (R-)

A photo for reference:

Kind Regards,

Andzej

Best answer
by anonymous
This is awesome thank you so much. Can you confirm if the 120 Ohm resistor and ground wire are both needed? If so could you show that on an image too just to confirm?

Thank you so much!
by anonymous
Hi,

Usually, it is considered a good practice to put 120 Ohm resistors at both ends of the serial cable line. But, it is not always necessary and will depend on your implementation.

RS485 serial can handle distances of roughly 1.2 km. The baud rate at which your devices communicate is also important. RS485 speeds depend on the cable length. It can operate at over 30 Mbit/s on cable that is up to 10 meters long, and drops down to 100 kbit/s as the cable length is closer to 1200m.

The closer your implementation to these distances and speeds, the more important it becomes to have terminating resistors. Hence, if you only have 1 slave device with a cable of tens of meters long, operating at a 9600 - 115200 baud rate, the resistors can be neglected.

Regarding the grounding wire, it is not necessary in this case.

Kind Regards,

Andzej
by anonymous

Hey again,

I've continued my testing with your support and made some progress but i'm still getting issues in regards to the messages I am getting from the web portal which indicates and error but i cannot understand where the error is.

I have setup a modbus server (slave) on my PC connected via USB to serial (wiring as per Fig 0 and 1)

In the modbus server i get reasonable responses (Fig 2) but in the web portal (Fig 3) it still thinks there is no response from the slave device when there clearly is.

Is anything I'm doing wrong? Hard to understand why its so hard to get a feedback from the device when I can clearly see the modbus slave responding with Tx messages after recieving the RX message from the modbus master (TRB145).

Any advice would be amazing.

Note - Figures are included in top answer as I couldn't attach them here. 

by anonymous

Hi, 

Everything seems reasonable. Have you tried TCP or RTU?

There are a few things to check. 

  • If you are using TRB145 as a Modbus RTU Master, you need to use an additional package available from Services -> Package Manager called Modbus Serial Master.

      You can then access Modbus Serial Master settings by navigating to Services -> Modbus -> Modbus Serial Master. Take a look at THIS page, the Modbus Serial Master section in particular if you are using RTU.

  • Ensure that only one RS485 interface is enabled. What I mean is that RS485 needs to be enabled only in Modbus Serial Master RS485 settings and turned off in all others (for example, in services -> RS485 it needs to be off)
  • Ensure that client and server are using the same settings. Same baud rate, data bit, parity, stop bits and flow control.
  • Ensure that the correct serial COM port is used. To check which COM port is being used by your USB, you need to go to the device manager on windows (Windows key, type Device Manager) and find PORTS in the list of devices.
  • Ensure that both devices are configured to use either TCP/IP or RTU and RS232 or RS485.
  • Make sure you saved all the settings and tried rebooting your device.

If these steps are unsuccessful, you can send me a private message and include the following:

  • A troubleshoot file available for download via System -> Administration -> Troubleshoot.
  • A screenshot of the Modbus slave configuration.

Kind Regards,

Andzej

by anonymous

Hey Andzej,

Thank you so much this was an amazing help. I did have the packages installed but the issue was the RS485 was also enabled. 

As a result my Modbus monitor was seeing the messages coming in as correct Modbus polls, but the "TEST" feature in the device was not reading the values back properly as the lines were were being hijacked by the RS485 comms.

As soon as RS485 was disabled I could start seeing correct values coming back from the modbus monitor and the Modbus master "TEST". Then I could move the wiring over to my field device and it worked properly too. 

My next step is to finish mapping all the addresses and then I can move to the next step of the projec. 

At this point I would need to try to map my modbus RTU addresses over to the TCP connection so i can read them via modbus TCP.  Is there a guide that would explain how to map those through? 

My application is as follows:

  • SCADA system 4G modbus master TCP polling -> 
  • TRB145 (on cellular) as modbus slave -> 
  • TRB145 (serial) as modbus master ->
  • Power meter as mosbus serial slave

Thank you again for the ongoing support! 

Regards,

Craig. 

by anonymous

Hi Craig,

I see you created another thread with this question. I have posted an answer THERE

Kind Regards,

Andzej

by anonymous
Thank you so much Andzej! I'll check the other response.