Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Help Needed! RS232C communication failure

I am trying to remote control a circulator via RS232C cable.I am sure I made all the configuration match, and I checked the port and the 9-pin cable by loopback, they are working fine. But when the cable is connected to the circulator, the VISA write vi in LABVIEW showed a timeout error (while the VISA configuration vi before the VISA write has no error out). I know that might be something wrong with the command, but when I use a simple program provided by the circulator company itself to detect the circulator, it still cannot find the circulator. So I guess the problem maybe is caused by connection to the circulator. Is there anything that might cause the problem?

Also, I want to control a conductivity meter. This time VISA write in LABVIEW showes no error, but it seems the command had no control of the meter because nothing changed in the screen. I wonder if it is the command problem because they have strange format like >CE command with <CE answer. What's the meaning of this command? Where should I get the answer? In the VISA read vi?
0 Kudos
Message 1 of 5
(3,754 Views)

This might be some chattering signal problem when you have connected the cable.  By connecting/disconnecting the cable to/from the device, the device is likely receiving junk characters by chatter noize. 

Does your device have any "clear" command that can be sent through the serial port? It can be a "send-break" signal or empty string with Line-Feed (ASCII 0x0A) terminater, Ctrl-C character (ASCII 0x03), etc... Does the device have such command?  If the problem is caused by the above reason, clearing the device's serial interface immediately after connecting the cable may fix the problem. 

0 Kudos
Message 2 of 5
(3,742 Views)
It's also possible that if you are using hardware handshaking, you will get a timeout if you have the wrong type of serial cable. If you are using a null modem cable, switch to a straight through and vice versa. Doing a loopback test is only going to test whether you have a functioning serial port on the pc. It really doesn't confirm anything else.

Message Edited by Dennis Knutson on 04-22-2008 08:16 PM
0 Kudos
Message 3 of 5
(3,735 Views)
Thank you all! It turns out I should use a null-modem cable. Now everything communicates perfectly.
 
But I still cannot control the conductivity meter. I have tried different types of cables and it showes no error in VISA write vi (does this mean the device has actually connected to the computer?), but with timeout error in VISA read vi. I sent command like this: >CE\n, as said in the manual. Is there any other thing that might cause this problem?
0 Kudos
Message 4 of 5
(3,708 Views)

You seldom get any kind of an error with a write. A serial instrument could be disconnected and the write will not give an error. The exception is when handshaking is used.

If you are sure that the cable and com settings are correct, you need to verify that you are sending the correct command and that it is properly terminated. First, try using Hyperterminal instead of your LabVIEW program. If that doesn't work, then you can ask the vendor for help. All will have experience with Hyperterminal. Once that is working, try LabVIEW. If you send a termination character such as \n, the string control/constant has to set to '\' Code Display. Right click on it to select this. If you continue to have problems, post your code with the actual commands saved in a control. Do this by going to the Edit menu and selecting 'Make Current Values Default'. After doing this, save the VI and then post it. If you have an electronic copy of the manual or a link to one, provide that as well.

0 Kudos
Message 5 of 5
(3,694 Views)