Campbell CS526 Manuale Pagina 12

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 11
CS526 ISFET pH Probe
8.2.2 Instruction Descriptions
8.2.2.1 SerialOpen() Instruction
The SerialOpen() instruction has the following syntax:
SerialOpen(ComPort,BaudRate,Format,TXDelay,BufferSize)
ComPort the datalogger COM port to 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.
8.2.2.2 SerialOut Instruction
The SerialOut() instruction has the following syntax:
SerialOut(ComPort,OutString,WaitString,NumberTries,TimeOut)
ComPort the datalogger COM port in which the probe is connected.
OutString use "1M1!"+CHR(13) for the OutString when the default
probe address of 1 is used.
WaitString enter the null (“”) WaitString to tell the datalogger to wait
for the echo of each character in the OutString
NumberTries enter 0
TimeOut specifies the time, in 0.01 seconds, that the datalogger should
wait for the WaitString or echo of each character in the OutString (0
is used in the example program).
8.2.2.3 SerialIn Instruction
The SerialIn() instruction has the following syntax:
SerialIn(Dest,ComPort,TimeOut,TerminationChar,MaxNumChars)
Dest specifies the variable in which the incoming data will be stored.
Please note that in the beginning of the CRBasic program, this
variable needs to be declared as ASCII string format (see example
program in Section 8.2.3)
ComPort the datalogger COM port in which the probe is connected.
TimeOut 20 should be adequate, which gives a 200 ms maximum delay
time. The TimeOut parameter is used to specify the amount of time,
in 0.01 seconds, that the datalogger should wait before proceeding to
the next instruction.
TerminationChar enter 0
MaxNumChars 20 should be adequate (specify the maximum number
of characters to expect per input)
6
Vedere la pagina 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Commenti su questo manuale

Nessun commento