12
This example makes the computer press
SET
on controller #7, in the
sophisticated mode:
10 OPEN "COM1:2400,N,8,2" AS #1 'prepares communication port
20 PRINT #1,"#007";
'identification number 7
30 PRINT #1,"C1";
'
SET
key pressed
40 PRINT #1,CHR$(10);
'LF, command closed
Input of a value
: the direct input of values ("V" command) is only possible
when the instrument is running a routine where also a manual input of
these values could be made. If not, it will ignore any "V" command from
the computer!
Examples of allowed routines are:
∗
temperature input (e.g. manual temperature compensation).
∗
control parameter input such as Low, High, ...
∗
time settings.
∗
input of manual buffer values.
Examples of NOT allowed routines are:
∗
during measurements or controls.
∗
when values have to be selected rather than changed (e.g. buffer
values in memory).
∗
while an electrode is being calibrated.
A 16-bit value (2's complement) should be transmitted in the following
sequence:
1st character =
"V" (start a value input)
2nd character =
highest byte of the value in ASCII
3rd character =
lowest byte of the value in ASCII
4th character =
checksum of 2nd and 3rd character in ASCII
5th character =
LF, linefeed (ASCII-10)
When a correct checksum has been received, the instrument will send a
confirmation character "!" to the computer. If not, a question mark "?" is
sent. Both are eventually preceded by the identification number.
This example makes the computer to enter the value "1000" on controller
#7, in the sophisticated mode:
1000 = (H-byte 3)(x 256) + (L-byte 232)
10 OPEN "COM1:2400,N,8,2" AS #1
'prepares communication port
20 PRINT #1,"#007";
'identification number 7
30 PRINT #1,"V";
'start a value input
40 PRINT #1,CHR$(3);
'highest byte of value
50 PRINT #1,CHR$(232);
'lowest byte of value
60 PRINT #1,CHR$(235);
'checksum of both bytes
70 PRINT #1,CHR$(10);
'LF, closes command