Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial communication

"Serial communication"

"Hello,
I’m trying to get data from the instrument (HMP230 series transmitter) and display on PC, using serial communication. I use write and read VISA to send the command to the port in order to read data back from the instrument, but whatever command I sent e.g. “R” or “SEND” to the port is what I received back. Does anyone know what the problem is?"
-posted by Se on 2/16/2003




--------------------------------------------------------------------------------
Ray K on 2/17/2003 answered:
"If you are using RS-485 then you may have configured your serial port to recieve echoes of your transmissions.For more infor, see the section on tranciever modes the Serial user man
ual
If you are using RS-232, then there may be a short between your transmit and recieve lines(pins 2&3).


Of course your instrument's normal operation procedure may be to echo back commands. For example, a normal response to "temp?\n" may be "temp?\n100C\n". In this case, you would read twice. The first read would get "temp?\n" and the second read would recieve the "100C\n"."





--------------------------------------------------------------------------------
Ray K on 2/19/2003 answered:
"Message from SE

"Thanks Ray,
I use terminal.exe from win 3.1 to send the command “SEND” to the port and the reading values of the instrument are returning back. Does it mean that there’s a problem with the transmit and receive line(2&3) or any other possible problems?"


Response from Ray K:
So from what I gather, you have VISA installed on a Win 3.1 machine. When you write and read with VISA, you read you own commands back, but when you use ter
minal.exe to communicate, you get numbers back?"


------------------------------------------------------
Yes, that's the problem. Is there a solution to this?
0 Kudos
Message 1 of 4
(3,901 Views)
As long as you are using the same serial cable with the same serial port, when you are communicating via terminal.exe and VISA, then the problem is not the cable. The only other explanation is that you are using an RS-485 port (native com ports are RS-232) and in Device Manager you have configured a tranciever mode of 2 wire with echo.

If the cable and port are the same, you are using a native com port on your computer, and you are using VISA 1.1; then best thing to do would be to upgrade your operating system to a 98, 2000, or XP.
0 Kudos
Message 2 of 4
(3,901 Views)

hey ,

I have the same problem as above.. That is , when i write temperature say "250/r/n".... i first read 250 and then from the hardware... As explained above i checked for the echo settings and they are not a problem as the same problem is not encountered in Hyperterminal (of PC) or Terminal Emulator of BASCOM used for programming the controller...  This problem is enountered only in LABVIEW ...Version used is 8.2

      What could be the problem then???

0 Kudos
Message 3 of 4
(3,665 Views)
You are probably not sending the termination characters (\r\n) correctly. Your string control/constant has to be set for '\' Codes Display. Right click on it to change it. Either that or you are sending /r/n as you have in your post.
Message 4 of 4
(3,652 Views)