11-18-2008 08:31 PM
I have a pump that communicates by RS-232. I can use windows hyperterminal and communicate with the pump without any problems. I want to move the pump over to a LabView VI and to get started I tried using the basic serial write and read VI from the examples in LabView 8.5 but was not able to communicate with the pump. The hyperterminal settings are a standard bit per second: 9600, data bits: 8, Parity: None, stop bits 1, flow control: None. Then the manual has the hyperterminal set to select "terminal keys", Emulation set to Autodetect and 500 for Backscroll buffer lines, send line ends with line feed, echo typed characters locally and enter a line delay of 0 and Wrap lines that exceed terminal width are all selected.
Why does the hyperterminal work but not the RS-232 basic serial write example? The pump supports OEM communications protocol, Data terminal protocol and CAN. Since I have been using hyperterminal with the DT protocol I thought this would be the easiest to move to LabView?
Thanks
11-18-2008 09:13 PM
11-19-2008 10:50 AM
Hi Danny,
Dennis is correct, it sounds like an issue with termination characters. I just wanted to add that in the example, the string control is set to " '\' Codes Display ." This will enable you to write the non-printable characters such as \n, \r, \t, etc. (line feed, carrage return, tab respectively.) This is already set in the example, but if you begin to write your own VI you will need to set your string control to " '\' Codes Display ."
National Instruments
11-19-2008 02:04 PM
Dennis and Caleb, thanks for the help. The problem was that I didn't have the \r because I didn't think I needed it as the pump commands are required to end with an R. So to communicate with the pump all I had to do was change the end of the string from ...R\n to ..R\r\n.
Thanks again for the help.
Danny