LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS485 Loopback

I'm trying to do a loopback test with my RS485 port. I go to NI MAX>VISA Test Panel and then do a query of the message but I receive an error when I do. I wired up my port according to this knowledge base article (only the red ones). I also went to go to my attributes tab and it says the 'Is Port Connected' is not defined or supported by the referenced resource. Does anybody know what I'm doing wrong and how I can fix it? Thanks, in advance.

Download All
0 Kudos
Message 1 of 11
(8,177 Views)

I wouldn't worry about "Is Port Connected".  Probably a property that only applies to certain types of ports.

 

But what exactly is an RS-485 loopback?

 

An RS-232 is a common loop back where the transmit lines and receive lines are tied together to so whatever is transmitted is immediately received back.

 

And RS-485 4-wire loop back is theoretically possible, though I have not hear of it, where the transmit pair and receive pair are connected.

 

I doubt an RS-485 2 wire loop back is possible.  2-wire is considered half duplex which means it can only send or receive on the same pair of wires, not both at once.  A 2-wire device will usually shut down the receive portion of its circuit so it doesn't get echoes when it is actively sending on the transmit part of its circuit.

 

So, what is your situation in more detail?

0 Kudos
Message 2 of 11
(8,127 Views)

I'm trying to just check to see if my RS485 is working properly because I'll be using it for a flow meter to measure mass flow rate. I want to know if I can send and receive messages from it. 

 

And I forgot to put this in my original post but this was the knowledge base article I was looking at to do it.

http://www.ni.com/tutorial/3450/en/

 

0 Kudos
Message 3 of 11
(8,107 Views)

So is your RS-485 port set up for 2-wire communication or 4-wire?

0 Kudos
Message 4 of 11
(8,078 Views)

I'm not sure. Is there a way to check this?

0 Kudos
Message 5 of 11
(8,030 Views)

The manual for your RS-485 port.

0 Kudos
Message 6 of 11
(8,026 Views)

it says

Transmission modes: 2-wire auto, 4-wire

0 Kudos
Message 7 of 11
(8,024 Views)

That sounds like options you can take, not instructions on telling you how to set the option.

 

As I said earlier, if you have 2-wire, you probably will not be able to technically loopback because good RS-485 2-wire ports will shut down the receive buffers on their port while they are in the process of transmitting so that it doesn't receive the data as it is sending it out.

 

You said you just want to see if the port is working properly.  The best way to do that is just have it try communicating with the device, not messing with loopbacks.

0 Kudos
Message 8 of 11
(8,020 Views)

Okay, I'll try to see if I can just hook up the flow meter and see if it works then.

0 Kudos
Message 9 of 11
(8,018 Views)

You may need configure it to 2-wire mode first. The NI converter comes wired as 4-wire mode.  To use 2-wire mode simply install a jumper between pins 4-8 (+) and 5-9 (-) on your DB9 and  Connect (+), (-), and ground (pin-1) to your device. 

0 Kudos
Message 10 of 11
(7,904 Views)