Kippzonen COMBILOG Data Logger Manuale Utente Pagina 141

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 173
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 140
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 con-
figured with a field length of seven, two decimals, the unit "°C"
and the binary format "Integer".
Sample program for ASCII-transmission without check sum:
(Notation 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
supported. The COM-interface in the PC and the bus interface
in the data logger have to be adjusted and configured on "(N)o
parity".
Hardware Manual COMBILOG 1022
141
Vedere la pagina 140
1 2 ... 136 137 138 139 140 141 142 143 144 145 146 ... 172 173

Commenti su questo manuale

Nessun commento