Hardware Manual COMBILOG 1020
143
11.9 Sample Program
The task is: The measured value in channel 2 shall be read from
the sensor module with the address number 10. The value has
been configured with a field length of seven, two decimals, the
unit "°C" and the binary format "Integer".
Sample program for ASCII-transmission without check sum: (No-
tation in QBasic, V. 1.0):
OPEN "COM1: 9600,N,8,1,D50,RS"
FOR RANDOM AS #1
,
initialize interface
REQ$ = "$0AR2"+chr$(13)
,
configure telegram
PRINT #1, REQ$
,
send request telegram
RES$ = INPUT$(9,#1)
,
receive response telegram
VALUE$ = MID$(RES$,2,7)
,
determine measured value
PRINT "Temperature = ", VALUE$
,
output measured value
CLOSE ,
enable interface
END
, end program
Note:
In several programming languages the initialisation of the
serial interface with even parity and 8 data bits will not be sup-
ported. The COM-interface in the PC and the bus interface in the
datalogger have to be adjusted and configurated on "(N)o parity".
Summary of Contents for COMBILOG 1020
Page 1: ...COMBILOG 1020 Datalogger Hardware Manual Version 3 09...
Page 2: ...Hardware Manual COMBILOG 1020 2 Issue 03 11 2005 Technical data are subject to change...
Page 4: ...Hardware Manual COMBILOG 1020 4...
Page 6: ...Hardware Manual COMBILOG 1020 6...
Page 12: ...Hardware Manual COMBILOG 1020 12...
Page 86: ...Hardware Manual COMBILOG 1020 86 Bild 8 1 Example Master Slave System...
Page 169: ...Hardware Manual COMBILOG 1020 169...
Page 170: ...Hardware Manual COMBILOG 1020 170...