06-29-2010 07:31 AM
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
06-29-2010 07:41 AM
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.
06-29-2010 07:45 AM
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
06-29-2010 07:45 AM
Ok, not sure how I missed that. I guess I thought all the settings were adjusted on the block diagram.
Thanks Dennis
06-29-2010 07:47 AM
@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 😉