Bytes 3-5 contain the current dose rate reading in floating point notation, where bytes 3 and 4 contain
the 16 bit positive mantissa and byte 5 is the signed (-128...+127) 2-based exponent. The unit is µSv/h
(pulses per second for pulse rate indicating probes like 6150AD-k, AD-17, AD-19).
Byte 6 is the XOR (exclusive OR) of Bytes 2-5 and is intended to be used as a block check character to
detect transmission errors.
The following QBASIC program gives an example how to decode the string:
' ---------------------------------------------------------------------
' ---------------------------------------------------------------------
' Open COM: 4800 Bd, no parity, 8 data bits, 1 stop,
OPEN "com1:4800,n,8,1,rs,cs,ds,cd" FOR INPUT AS #1
' Main Loop: read and decode string
(6 characters including STX),
' display result, exit on any key.
WHILE ASC(INPUT$(1, #1)) <> STX: WEND 'wait for STX
sonde = ASC(INPUT$(1, #1)) 'type of detector/6150AD
mantlo = ASC(INPUT$(1, #1)) 'low order mantissa
manthi = ASC(INPUT$(1, #1)) 'high order mantissa
expon = ASC(INPUT$(1, #1)) 'exponent
IF expon > 127 THEN expon = expon - 256
bc = bc XOR ASC(INPUT$(1, #1)) 'block check
IF bc <> 0 THEN ERROR DEVERR 'block check error
mant = manthi * 256 + mantlo '16 bit mantissa
xdl = mant * 2 ^ (expon - 15) 'dose rate as floating point number
GOSUB GetProbe 'set ger$, det$ and unit$
PRINT TIME$; " Device: 6150"; ger$; " Detector: "; det$;
PRINT USING " Reading=########.### "; xdl;
LOOP WHILE LEN(INKEY$) = 0 'exit on any key
' ---------------------------------------------------------------------
' set ger$ / det$ / unit$ according to
' ---------------------------------------------------------------------
$ = "/E": sonde = sonde - 128
IF sonde >= 64 THEN ger$ = "AD1/3/5"
Technical Manual 6150AD Probe Connector