LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Com: Hyperterminal Works, LV does not

Hello.  I know there are a million posts on the topic, however, please know that I've spent hours looking through old posts and trying everything suggested to no avail. I need to control a Horiba Water Quality Monitor W-20XD via RS-232.  Right now, I am just trying to establish basic communication with the device over the serial port.  I can connect to the device with windows Hyperterminal using the following settings:

 

Bits per second: 2400

Data bits: 8

Parity: None

Stop bits: 1

Flow control: None

 

Once I connect, I go to File-->Properties, Settings tab,and click on ASCII Settings button.  I must check the following boxes (not checked by default) for any communication to occur:

 

Send line ends with line feeds

Echo typed characters locally

 

For the POWER ON request command, I am to type "OL,1" and get the answer "OK". Here is what it says exactly for the request command format from the manual.

 

OL, 1 [ CR ] [ LF ] 

 

Using the LabVIEW<-->Serial vi found in the labview examples, I have turned termination characters to false and typed "OL,1\r\n" in the String to Write field as shown in the figure. I have also used every variation of those characters you could possibly imagine"

 

"OL,1 \r\n"; "OL,1 \r \n"; "OL,1 \n\r"; "OL,1/r/n"; etc...

 

Every time I get no response, when every time I go back into Hyperterminal and check using the aforementioned settings, I get the correct response answer: "OK".

 

Attached is the code I am using.

 

Please help!

 

Thank you,

 

-Cameron

17641i84809A7A552A7D2D

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

You must not have looked at the shipping examples or the posts on setting the termination characters. You simply need to right click on the 'String to Write' and select '\' Codes Display. Otherwise, you are not sending CR or LF.

0 Kudos
Message 2 of 5
(3,262 Views)

Hi!

In order to use special characters you have to tick the string option " '\' Code display ".

It's seems to me that this option is not enabled at the moment.

Let me know if this fixes the problem.

 

Marco

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

Ok, not sure how I missed that. I guess I thought all the settings were adjusted on the block diagram.

 

Thanks Dennis

0 Kudos
Message 4 of 5
(3,256 Views)

 


@Dennis Knutson wrote:

You must not have looked at the shipping examples or the posts on setting the termination characters. You simply need to right click on the 'String to Write' and select '\' Codes Display. Otherwise, you are not sending CR or LF.


I should learn to type faster 😉

 

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