Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use RS485 for 2-wire network?

I am using 2 RS485 on PXI 8421 to simulate both modbus slave and modbus master. I found that, if I use 4-wire RS485, the master and slave works fine. But if I use 2-wire RS485, there will be an error saying "no communication response from modbus secondary". Could you please help me out?

My 2 wire connection of RS485 is Pin 5-9 (as -), 4-8(as +), and Pin 1(as ground). Then I connect - to -, + to +, GND to GND. Is it correct? Why not working?

Thank you for your help.

Steven
0 Kudos
Message 1 of 3
(3,818 Views)
Hello Steven,

Your wiring is correct to connect 2-wire devices together. Before getting the modbus software into the mix, it might be helpful to try to communicate using just the straight serial driver to see if the problem lies in some sort of hardware/lower serial driver issue or if it is in a higher layer.

You can test this by using either a terminal program such as hyperterminal. Set the wire mode to the appropriate 2 wire value (there are a few, check the knowledgebase linked below) and open up 2 windows, one attached to each 485 port that is connected together. You should be able to send data back and forth between the windows by typing in one and seeing it show up in the other.

If you do not see this behavior, concentrate on your connectors,
the wire mode settings, and the lower layer. If it does work, then perhaps there is some additional configuration in your modbus application.

Here is a link on the wire mode settings and what the meaning of the different 2-wire ones are:
http://digital.ni.com/public.nsf/websearch/E905D94CF3C0601D862565EF004D5D7F?OpenDocument

Scott B.
Applications Engineer
National Instruments
Message 2 of 3
(3,818 Views)
I got it. Thank you for your help.
0 Kudos
Message 3 of 3
(3,818 Views)