Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange Behavior with Serial Port Comms

I'm having a problem communicating with a device over RS-232 and would greatly appreciate some help.

 

I can communicate successfully with the device using hyperterm. I have replicated the same port settings in LabView as best I can, (9600, 8, none, 1 none), \r termination character for transmit, etc. and am passing down the identical commands. This work is taking place on a PXI chassis. Both hyperterminal and the exact same LV software control the DUT on a Dell desktop. The problem appears to be a LV port setting or driver issue as it interacts with the serial port on this PXI chassis. I have no reason to suspect the serial port because hyperterm works just fine. The software works just fine on another machine. Is there possibly a port configuration that I am missing with LV on the PXI chassis?

0 Kudos
Message 1 of 5
(3,803 Views)

Hi

A common misconception is that if you specify the termination character for transmit that it is also added to the output.

This is not true. You have to add the termination character to the output string and then send it.

greetings from the Netherlands
0 Kudos
Message 2 of 5
(3,782 Views)

Albert,

 

Thanks for the reply. I do attach the expect character at the end or my command "\r".

 

Mike

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

Another idea, just trying to help, struck my mind.

A number of visa updates have been around. Maybe you have an old version in the pxi chassis?

 

greetings from the Netherlands
0 Kudos
Message 4 of 5
(3,751 Views)

This is too late of a reply to help Mike, but someone else will undoubtedly have the same issue.

 

 

The likely solution is that he needed to send a CR LF (\r\n) instead of just a CR (\r) at the end of messages.

 

Hyperterminal normally sends out CRLF. It's the LF that signals the receiving device to send it's response. When you type commands in Hyperterminal (HT) the characters are either being echoed back by the serial device or locally by HT. Once you hit enter, HT sends CR to get back to the beginning of the line and then LF so that the response from the receiver is on the next line and does not overwrite the command you sent.

 

steve

 

www.ashfordsolutions.com

 

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 5
(3,499 Views)