Fluke PM3370B Hunting Equipment User Manual


 
THE CPL PROTOCOL 6 - 37
Example:
100 PRINT #1,"QW";74 :’Query waveform (m7.4)
110 GOSUB 1000 :’Sync on acknowledge
120 INPUT #1,NM$ :’Trace_name
130 INPUT #1,YUNIT$ :’Y_unit
140 INPUT #1,XUNIT$ :’X_unit
150 INPUT #1,YZERO :’Y_zero
160 INPUT #1,XZERO :’X_zero
170 INPUT #1,YRESOL :’Y_resolution
180 INPUT #1,XRESOL :’X_resolution
190 INPUT #1,YRANGE :’Y_range
200 INPUT #1,DT$ :’Date
210 INPUT #1,TM$ :’Time
220 INPUT #1,DTC :’Delta T correction
230 INPUT #1,MINMAX :’Min Max trace
240 INPUT #1,RES1$ :’Reserved field
250 INPUT #1,RES2$ :’Reserved field
260 INPUT #1,RES3$ :’Reserved field
270 INPUT #1,RES4$ :’Reserved field
280 INPUT #1,COUNT :’Sample_count
290 DIM WAVE(2*COUNT) :’Declare waveform array
300 SUM=0
310 PRINT "Reading trace samples ..." :’Display operator message
320 FOR I=1 TO 2*COUNT :’2 bytes per sample
330 WAVE(I)=ASC(INPUT$(1,#1)) :’Read each sample byte
340 SUM=(SUM+WAVE(I))MOD(256) :’Calculate checksum
350 NEXT I
360 CHECKSUM=ASC(INPUT$(1,#1)) :’Read checksum
370 IF SUM <> CHECKSUM THEN GOTO 380 :’Test checksum
380 END
390 PRINT "*** Checksum error ***" :’Display error message