Measurement Computing Micro 488/EX rev.2.1 User Manual
Page 61
Section 4
General Programming
4.19
190 GOSUB 570 ' get the output file name
200 PRINT:PRINT "Enter File Comment => ";: LINE INPUT C$
210 ' loop until serial input buffer is empty
220 WHILE NOT EOF(1) : A$ = INPUT$(1,1) : WEND
230 '
240 ' set up file header
250 '
260 PRINT: PRINT : PRINT "Reading Log Buffer.";
270 PRINT#2,"*"
280 PRINT#1,"Hello"
290 LINE INPUT #1,H$
300 PRINT#2,"* ";H$ ' send the Macro488's Hello Message to
the file
310 PRINT#1,"Day Date Time"
320 LINE INPUT#1, D$ ' send Day, Date and Time to the file
330 PRINT#2,"* ";D$
340 PRINT#2,"* ";C$ ' send the User's comment to the file
350 PRINT#2,"*" : PRINT#2,""
360 '
370 ' get the amount of data in the log buffer
380 '
390 PRINT#1,"Log Memory"
400 INPUT #1,COUNT
410 IF COUNT = 0 THEN PRINT :PRINT:PRINT "Log Buffer Is
Empty" : END
420 PRINT#1,"Read Log"
430 IF LOC(1) > 50 THEN GOSUB 480 ' get data
440 IF LOC(1) <> COUNT THEN GOTO 430
450 IF COUNT > 0 THEN GOSUB 480
460 PRINT:PRINT : PRINT "Operation Complete"
470 END
480 '
490 ' read data from Micro488/EX to disk file
500 '
510 PRINT "."; ' for visual indication
520 PRINT#1,CHR$(19); ' Send Xoff to avoid PC buffer overrun
530 A = LOC(1) : COUNT = COUNT - A
540 PRINT#2,INPUT$(A,1);
550 PRINT#1,CHR$(17); ' Send Xon
560 RETURN
570 '
580 ' get output file name
590 '
600 CLS
610 PRINT : PRINT"Send Log data to what file? => ";
620 LINE INPUT F$
630 IF F$ = "" THEN PRINT CHR$(7) : GOTO 600 ' try again
640 ' add extension if not included
650 IF INSTR(F$,".") THEN GOTO 660 ELSE F$ = F$ + ".log"
660 ' check if file already exists
670 ON ERROR GOTO 790