Field Test Unit Software
5.1.2 DATA Message Format
There are one or more DATA messages used to store a data file. The for- mat of the DATA message is designed to be generated by a BASIC ‘PRINT’ statement and read by a BASIC ‘INPUT’ statement.
DATA messages - Line 2: onwards
data C/R L/F
data = up to 252 characters coded in Hexadecimal (2 characters per data logger byte). The characters are sent high order 4 bits followed by low order 4 bits such that the following BASIC instructions would have VALUE as the first data logger byte in the ASCII DATA message (STRING$)
VALUE = VAL ("&H" + LEFT$(STRING$,2))
5.1.3 END Message Format
A single line is used to terminate the data file.
END message -
END C/R L/F
5.2 HOST COMPUTER PROGRAM TO RECEIVE DATA
The following sample BASIC program will save the information sent by the COPY program via the
10 INPUT “Enter Filename for COPY data”;F$
20 OPEN F$ FOR OUTPUT AS #2
30 OPEN “COMl:1200,n,8,2,rs,cs,ds,cd” AS #l
40 INPUT #1,A$
50 IF A$ = “END” THEN 100
60 PRINT #2,A$
65 PRINT A$
70 GOT0 40
26 | Section 5. DATA STORAGE FORMAT |