04-12-2010 09:51 AM
Hi
I have a general question about serial communication. I am trying to read output from a pH/O2 meter but I don't have the serial commands for the instrument. I have contacted the company but no one can tell me how to communicate with the instrument. Is it possible there are no serial commands for the instrument? Right now I am just reading the output by writing *IDN?\r\n to the instrument and getting lines of info that jump around and are not always the same so I can't consistently read the pH value from the line. Any information about general serial commands would be much appreciated. I am communication with the instument via a serial to USB converter.
Thanks
Tatiana
Solved! Go to Solution.
04-12-2010 10:02 AM
What does "getting lines of info that jump around" mean? The company can't tell you the commands or method used to communicate with the instrument? And it's still in business?
It's possible the meter has no specific commands, but rather continuously spits out information on the serial port. You really need to get a hold of the manual for it. If you specify the model of the meter maybe someone here might know something about it.
04-12-2010 10:18 AM
Hi
Thanks for your quick response. The instrument I am using is the Polestar Tech DSP 3000. The user manual is linked below:
http://www.polestartech.com/80-03003-08.pdf
I am continuously getting line of info like this:
pH 6.493 pH 21.0 deg C 760 mmHg 3234 AGC 1694 RAGC 02/29/2008 03:55:22
which is fine but the line doesn't stay in the same position and sometimes doesn't appear so when I try to scan this string and record the pH (6.493) I often get an error because the line is blank.
Thanks again for your help
Tatiana
04-12-2010 10:38 AM
Based on the manual it appears that the device just continuously spits out information on the serial port. Thus, you need to configure the serial communication parameters to indicate what character is used to indicate the end of the line. Most likely this is a linefeed. If you do a text file capture using HyperTerminal you should be able to figure it out by looking at the text file with a hex editor. Otherwise you can use PortMon. If you don't know how to do this just upload a captured file and someone here can tell you what the termination character is.
Knowing the termination character will allow you to read an entire line at once. If you open the "Advanced Serial Write and Read" example that ships with LabVIEW you can test this out. In your case you want the "write" toggle switch off. The very first read will likely not be a complete line since you may be catching the data in the middle of a line, but thereafter you should be able to read one line at a time.
04-12-2010 02:49 PM
04-12-2010 03:16 PM
You should not mark your thank you as the solution.
To change the marked solution, click on 'Options' above the message body.