Campbell CS526 Instruction Manual - 8. Programming
CS526 ISFET pH Probe
This probe must be connected to the datalogger’s 5V
terminal (not 12V). Connecting to a higher voltage will
damage the probe beyond repair.
CAUTION
8. Programming
8.1 Get Data Command
The datalogger needs to send a “get data” serial command to the CS526 to get
the pH data. This command is sent to the CS526 via the SerialOut() CRBasic
instruction (see Section 8.2.2.2, SerialOut() Instruction). TABLE 8-1 shows
the “get data” command and its response.
TABLE 8-1. “Get Data” Command and Response
Command
Response
aMn!
Where:
a = probe address (factory
default is 1)
n = a single dummy character
(typically use 1)
a
Where:
a = probe address (factory default is 1)
digital counts).
8.2 CRBasic Programming
8.2.1 Instruction Sequence
A sequence of CRBasic instructions is used to measure the sensor. TABLE 8-2
shows the instruction sequence. Information about the instructions is provided
in Section 8.2.2, Instruction Descriptions, and an example program is provided
in Section 8.2.3, Example Program.
TABLE 8-2. Instruction Sequence
Instruction
Function
SerialOpen()
Set up a datalogger port for serial communication (see Section
8.2.2.1, SerialOpen() Instruction)
Scan()
Establish a scan rate
SerialOut()
Send “get data” command to the CS526.
See Section 8.1, Get Data Command, and 8.2.2.2, SerialOut()
Instruction, for more information.
SerialIn()
Set up the COM port to receive the incoming serial data (see
Section 8.2.2.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.
5