
User Manual
Table 7-2. “Get Data” Command and Response
Command Response
aMn!<CR>
Where:
a = probe address (factory
default is 1)
n = a single dummy character
(typically use 1)
a<value><CR><LF>
Where:
a = probe address (factory default is 1)
<value> = the probe’s reading for pH
(in digital counts).
7.2.2 CRBasic Instruction Sequence
A sequence of CRBasic instructions is used to measure the sensor. Table 7-3
shows the instruction sequence. Information about the instructions is provided in
Section 7.2.3, Instruction Descriptions, and an example program is provided in
Appendix B, Example Program.
Table 7-3. Instruction Sequence
Instruction Function
SerialOpen()
Set up a datalogger port for serial communication (see Section
7.2.3.1, SerialOpen() Instruction)
Scan()
Establish a scan rate
SerialOut()
Send “get data” command to the CS526.
See Section 7.2.1, Get Data Command, and 7.2.3.2,
SerialOut() Instruction, for more information.
SerialIn()
Set up the COM port to receive the incoming serial data (see
Section 7.2.3.3, SerialIn() Instruction).
Please note that in the beginning of the CRBasic program, the
variable used in the SerialIn() instruction needs to be
declared as an ASCII string format.
SplitStr()
Split out digital count value for pH from the input string.
Probe output is “Counts”. A corrected multiplier and offset are
required to provide an output in pH units (see Appendix C,
Calibration).
7.2.3 Instruction Descriptions
7.2.3.1 SerialOpen() Instruction
The SerialOpen() instruction has the following syntax:
SerialOpen(ComPort,BaudRate,Format,TXDelay,BufferSize)
ComPort — the datalogger COM port in which the probe is connected.
BaudRate — choose 2400
Format — choose 16, which is TTL Logic; No parity, one stop bit, 8 data
bits; No error checking
TXDelay — enter 0
BufferSize — enter at least twice the number of maximum expected
characters + 1, which is 41.
7
Commenti su questo manuale