Consort C731 Mode D'emploi page 18

Table des Matières

Publicité

Les langues disponibles

Les langues disponibles

This example continuously prints the measured values (pH and
temperature) on the computer screen:
10 ON ERROR GOTO 70
20 OPEN "COM1:2400,N,8,2" AS #1
30 PRINT #1,"8"
40 INPUT #1,V$
50 PRINT V$
60 GOTO 30
70 RUN
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.
∗ 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 instrument
#7, in the sophisticated mode:
1000 = (H-byte 3)(x 256) + (L-byte 232)
10 OPEN "COM1:2400,N,8,2" AS #1
20 PRINT #1,"V";
30 PRINT #1,CHR$(3);
40 PRINT #1,CHR$(232);
50 PRINT #1,CHR$(235);
60 PRINT #1,CHR$(10);
'makes sure no error occurs
'prepares computer input
'PRINT button pressed
'measured values transmitted
'received values printed
'repeat procedure
'prepares communication port
'start a value input
'highest byte of value
'lowest byte of value
'checksum of both bytes
'LF, closes command
15

Publicité

Table des Matières
loading

Table des Matières