In order to perform a RS-485 two wire loopback in AUTO mode, you need to have two separate ports to communicate between. In this example, the two wire AUTO mode is programmatically set on both ports. The important part is the connection made between the two ports. Make sure to tie pins 4 and 8 (RXD+ and TXD+) together then wire this connection to pins 5 and 9 (RXD- and TXD-), which should also be tied together. This is refelected in the next two images.
Requires LabVIEW 8.0 or higher and the NI-VISA drivers.