Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-RS485 comm problem

JasonS,

Thanks for clearing that up.  I was certain I had used programatic control in the recent past but had not had time to go back and confirm.

0 Kudos
Message 11 of 15
(1,771 Views)

RichB

I have 2wire/auto set programatically.  I had it set to that all along.

0 Kudos
Message 12 of 15
(1,768 Views)

RichB,

Since the cable is difficult to remove, I doubt a wire got moved around.  I would start by making sure that all settings for the COM port are done programatically.

Just another thought, does the Omega have a com setting for Echo?  If it does, make sure it is turned off.



Message Edited by centerbolt on 06-04-2008 09:03 AM
0 Kudos
Message 13 of 15
(1,754 Views)

Richb

The Omega does not appear to have echo capability.

I am setting all of the normal serial settings, and, as I mentioned, I am able to send but not receive.

0 Kudos
Message 14 of 15
(1,747 Views)
I think the first step to solving your problem is going to be determining why you are receiving an echo. Once that is solved you can focus on why you don't receive a response from the instrument.  Can you answer the following questions for me?

1. Which USB-485 interface you are using (1 port, 2 port, or 4 port)? If using a multi-port interface, which port are you connecting your instrument to?

2. Open the serial port in MAX or Device Manager. On your Advanced tab, what is the default wire mode specified?


There are only a few reasons you could receive an echo while in 2Wire/Auto mode:

  1. The device you are connected to is echoing the commands

  2. Your USB-485 interface is not disabling the receivers while transmitting (Meaning the hardware could be bad)

  3. You are using very long cables and they do not have proper terminating resistors installed. I would not normally expect the data to look clean when it was received back, but this is worth double checking.

The approach I would take is the following:

  1. Unplug the USB controller, reboot the computer, then plug the controller back in. If using a USB-485/4, you should also unplug the power to the box when you disconnect it from the computer. This will ensure that the firmware on the USB interface is completely reloaded. Try your application to see if the problem has been solved.

  2. I've attached a simple VI which you can use to determine if your wire modes are properly disabling the receivers.  This VI just transmits a word and tries to receive it on the same port in order to determine whether the receivers were disabled during transmission. Restart LabVIEW prior to running this VI, to ensure that LabVIEW doesn't have a stale VISA session open which may have changed the state of the serial port. I saved it in LabVIEW 8.2, but if you need something earlier you can easily reconstruct it from the picture I also attached. Go ahead and leave your instrument connected to make sure that this step fails for you. If it fails we will remove the instrument in the next step.

    • Set your VISA Resource to the appropriate COM Port

    • Select the RS485/Wire2-EchoDTR Wire Mode and run the VI - The read buffer should read "Test", indicating that the echo was received
           If you see an error on this test or the buffer does not read "Test", then you likely do not have a 2-wire cable connected to the interface.

    • Select the RS485/Wire2-CtrlDTR Wire Mode and run the VI - You should see a blank read buffer and an error
           If you see "Test", either your instrument is sending the echo, or your USB-485 is bad. Go to step 3 to diagnose.

    • Select the RS485/Wire2-Auto Wire Mode and run the VI - You should see a blank read buffer and an error
           If you see "Test", either your instrument is sending the echo, or your USB-485 is bad. Go to step 3 to diagnose.

    • If you did not see unexpected echoes, even with your instrument connected and powered on, then they are likely related to something the other application is doing.

  3. If you have not already done so, disconnect the instrument (but leave the cable attached to the USB-485, in order to connect the Tx and Rx lines together), and repeat step 2. If you still have unexpected echoes, then for some reason the receivers are not being disabled properly. You will probably need to have your USB-485 hardware repaired or replaced.
    • If removing the instrument removed the unexpected echoes, then your instrument is likely to be the source of the echoes. You will need to either figure out how to disable them, or update your application to expect them.

Please let me know what you find when you try this out.

Download All
0 Kudos
Message 15 of 15
(1,730 Views)