Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

serial command code

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(4,008 Views)

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? Smiley Surprised

 

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. 

0 Kudos
Message 2 of 6
(4,004 Views)

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

 

0 Kudos
Message 3 of 6
(4,000 Views)
Solution
Accepted by topic author sunshine921

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. 

Message 4 of 6
(3,995 Views)
Thanks very much for your help.  I was able to capture the data I wanted through the Advanced Serial read and write. Smiley Very Happy
0 Kudos
Message 5 of 6
(3,971 Views)

You should not mark your thank you as the solution.

 

To change the marked solution, click on 'Options' above the message body.

0 Kudos
Message 6 of 6
(3,965 Views)