10 '----------------------- 20 ' Example 3: acquiring data for use with another program, 25 ' such as Lotus 1-2-3(tm), or a database manager. 30 '----------------------- 42 DEF SEG=0 ' find IEEE interface code memory location 43 IEEE=PEEK(&H182)+256*PEEK(&H183) 44 IF IEEE=0 THEN PRINT "BASIC488 not installed" : STOP 45 DEF SEG=IEEE 50 INITIALIZE=0 : SEND=9 : ENTER=21 ' offsets for PC<>488 routines 60 MY.ADDRESS%=21 : LEVEL%=0 ' make PC a controller at address 21 70 CALL INITIALIZE(MY.ADDRESS%,LEVEL%) 80 ADDRESS%=16 ' the instrument is at address 16 85 ' 90 OPEN "DATAFILE.PRN" FOR OUTPUT AS #1 ' open a file for storing the data 95 ' 100'---- Loop to acquire 100 values --- 110 FOR I=1 TO 100 120 R$=SPACE$(80) ' get up to 80 characters from device 130 CALL ENTER(R$,LENGTH%,ADDRESS%,STATUS%) 140 IF STATUS%<>0 THEN STOP ' test for errors in ENTER 150 PRINT #1,LEFT$(R$,LENGTH%) ' store the value in the FILE **** 160 NEXT I 170 CLOSE ' close the output file 180 ' 181 ' The data is now in the disk file. 182 ' For Lotus 1-2-3, use the /File Import Numbers command to read the data. 183 ' For a database manager, use the appropriate import ASCII data command. 190 END