Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB RS-485 adapters do not work when attached to hubs!

(I have redirected another issue here, when I became aware of the USB issues)

 

I have both a single-port USB-485 and a sual port USB-482/2 that I am using at 115200 bps and 2-wire auto mode.

 

Both work perfectly fine when the USB lines are connected directly to my Dell laptop.  If I connect them through a hub, I see some of the SENT bytes at the beginning of the READ buffer when making small (~10 byte) transactions.

 

I thought the problem was only in the dual port, but that's because that one was connected through a hub.  I have tried adding 80 and 120 Ohm resistors to the sockets on the dual port's PCB.  No effect.

 

I have tried connecting them, one at a time, through a small non-powered hub connected directly tomy laptop, and this fails.  I have also connectedthem through an industrial, powered hub with my other working equipment (including a CAN adapter and USB-6221) and this fails.

 

Any ideas how to deal with this?  Is there a possibility they will have problems if they are connected to a different PC?

0 Kudos
Message 1 of 6
(4,192 Views)

Hi Jed,

 

When you say you see some of the sent bytes at the beginning of the read buffer, do you mean that you see the same bytes you sent reflected back to your read buffer before the actual response arrives?

 

Cheers,

0 Kudos
Message 2 of 6
(4,152 Views)

Yes.  This error is only happening at 115200 baud, not at 38400 or 9600 (those are my only choices for this device).

 

If I send:ABCDEFGH

And I expect: LMNOPQRS

 

I am seeing the following responses (randomly, although I would say I see the correct one about 10-20% of the time):

  • ABCLMNOPQRS
  • ABLMNOPQRS
  • ALMNOPQRS
  • LMNOPQRS
0 Kudos
Message 3 of 6
(4,149 Views)

Hi Jed,

 

It sounds like this is some sort of signal reflection introduced by the hub.  I'll do some research and see if I can find a potential solution.

 

Cheers, 

0 Kudos
Message 4 of 6
(4,130 Views)

Hi Jed,

 

After doing a bit more research on this I have a few additional questions for you.

 

  1. What resistors did you add on the 485/2?  Did you add the bias resistors?  If so, these prevent noise from being registered as data.  However, this has no effect on reflections
  2. Have you tried adding termination resistors?  These are added to prevent signal reflection.  You would need to add 120ohm resistors on each end of the 2-wire cable between D+ and D- as close to the ends of the cable as possible. 
  3. I would like to see a spy capture of the behavior you described above.  Please see Performing a Good NI Spy Capture for Debugging/Troubleshooting
  4. What version of the NI-Serial driver do you have?
Cheers,
0 Kudos
Message 5 of 6
(4,098 Views)

Unfortunately, I had to deliver the system and no longer have access to the serial interfaces.  I did create the SPY captures last week:

 

 http://dl.dropbox.com/u/130499/RS485-GOOD.spy

 http://dl.dropbox.com/u/130499/RS485-BAD.spy

 

(The good files showes the transactions when the unit is connected directly,  I ran the "bad" setup several times).

 

I understand that resistors may be required.  What I don't understand is that they may be required only when I am connected through a hub.  That indicates to me that the USB root hub may also cause problems, and that moving this setup to another PC and plugging it into its USB ports may produce different results.

0 Kudos
Message 6 of 6
(4,094 Views)