2
\$\begingroup\$

I have an RS485 USB converter connected with a temperature controller in the controller's datasheet it says that the 12 is (+) and 11 is (-) and in my USB converter there is A and B RS485 USB converter

Am not sure the D+ and the D- means , is that means that B supposed to be wired with (-) and A with (+)? Am asking all of that because am having communication problems with my device and am having timeout error in my Labview software that am using to read my controller's registers . My email is: [email protected] Thank you for your time.

\$\endgroup\$
5
  • \$\begingroup\$ Did you try the other polarity? Is there a common ground reference between devices, since the USB-RS485 clearly does not provide one? \$\endgroup\$
    – Justme
    Aug 14, 2020 at 22:15
  • \$\begingroup\$ I didn't try the polarity yet I wanted to ask first and get more informations about it and No it doesn't have a comon ground reference \$\endgroup\$
    – imy7
    Aug 14, 2020 at 22:20
  • 1
    \$\begingroup\$ If one or both devices are floating, it is likely that the RS485 common mode range is exceeded so the devices mot likely won't communicate unless they share a common ground reference. \$\endgroup\$
    – Justme
    Aug 14, 2020 at 22:31
  • \$\begingroup\$ I tried with another RS485 USB converter that has a ground reference but I had the same problem \$\endgroup\$
    – imy7
    Aug 14, 2020 at 23:47
  • \$\begingroup\$ Is the baud rate correct? Is the USB to Serial adapter opened in RS485 handshake mode in LabView or whatever program you are using to send and receive data? \$\endgroup\$
    – Justme
    Aug 15, 2020 at 6:43

1 Answer 1

2
\$\begingroup\$

After fixing signal ground issues, you need to confirm signal polarity by sending data packets and checking for confirmation. If a corrupted or messy packet is received, the receiver will request the packet be resent. If this happens continuously then reverse polarity and try again. If polarity is correct then data should flow in both directions per USB protocol.

RS-485 requires a separate signal ground to avoid too much DC offset in the signal, or baseline drift as some call it. Also with LabView you can use NI MAX to configure your Ni-DAQ and communication boards with arbitrary timeouts. This must be a USB issue, as USB does have 1 ms timeouts as it sends packets at a 1 ms rate.

RS-485 only has the timeout restrictions you put in it, but using USB as a source restricts you to USB protocols. RS-485 is a hardware standard, not a software protocol. You will need to make sure events on the RS-485 side return a "ACK" or similar USB response within 1 ms. This means short hops to each RS-485 node, and each node must respond within 1 ms. A saving grace would be if NI-MAX has control over USB functions such as timeouts.

Also with LabView it is easy to decimate data into fixed-rate packets before being sent to a USB port-->RS-485. Also USB high-speed uses 100 us time delay between packets. Check what USB standard is being used, and chose a slower data rate such as 48 mbps. This is where you may have to compromise to make things work - along with adding a signal ground wire (20 ga or 22 ga will work) that hops from node to node. Do NOT Earth ground the signal ground wire.

Try adding the signal ground wire first. Baseline drift can make many low-voltage differential communications work poorly or not at all.

Remember that NI-MAX and LabView are very expensive and powerful software tools. In an hours time you can create diagnostic indicators for polarity match, send inverted data, bit error rate, DC offset in data lines, etc. Build these to take the guess work out of the equation.

\$\endgroup\$
8
  • \$\begingroup\$ I don't particualry agree with the way you describe how the USB adapter would need delays. Sure, USB traffic happens every 1ms. It is up to the driver and chip hardware and most USB to serial devices have a configurable FIFO timeout in the drivers, typically 16ms. It can also take any amount for the other device to respond something back, there is no requirement of the other device responding on the RS485 bus within 1ms just because there is an USB to serial adapter. \$\endgroup\$
    – Justme
    Aug 15, 2020 at 6:56
  • \$\begingroup\$ @Justme What do you think I was writing about? How many times did I mention USB protocol? A USB connector is just a dumb connector. \$\endgroup\$
    – user105652
    Aug 15, 2020 at 7:17
  • \$\begingroup\$ @Justme I wish this OP had a USB packet analyzer instead of LabVIEW. Cost less than LabVIEW. \$\endgroup\$
    – user105652
    Aug 15, 2020 at 7:25
  • \$\begingroup\$ I am now even more confused. Do we even agree that the adapter is a perfectly standard and common USB to RS485 adapter, i.e. it contains an USB serial port UART chip and a RS485 tranceiver so it looks like a COM port in Windows? \$\endgroup\$
    – Justme
    Aug 15, 2020 at 7:28
  • \$\begingroup\$ @Justme. Yes I agree. The PC sees it as a com port with USB protocols. It is not aware of the RS-485 connection. LabVIEW sees it as a USB port. \$\endgroup\$
    – user105652
    Aug 15, 2020 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.