Section Four A BASICA/QuickBASIC GPIB-PC Function Calls
©National Instruments Corp. 4A-107 GPIB-PC User Manual
790 REM
800 REM Since the DVM and GPIB-PC are still
810 REM addressed to talk and listen, the
815 REM measurement can be read
820 REM as follows.
825 REM
830 RD$ = SPACE$(16) : CALL IBRD (BRD0%,RD$)
840 IF IBSTA% < 0 THEN GOTO 3000
850 REM
860 REM To close out a programming sequence, send
870 REM IFC to initialize the bus and call the
880 REM IBONL function to place the GPIB-PC
885 REM offline.
890 REM
900 CALL IBSIC (BRD0%)
910 V% = 0 : CALL IBONL (BRD0%,V%) : STOP
2000 REM A routine at this location would
2010 REM notify you that the IBFIND call
2015 REM failed, and refer you to the handler
2020 REM software configuration procedures.
2040 PRINT "IBFIND ERROR" : STOP
3000 REM An error checking routine at this
3010 REM location would, among other things,
3020 REM check IBERR to determine the exact
3015 REM cause of the error condition and then
3030 REM take action appropriate to the
3040 REM application. For errors during data
3050 REM transfers, IBCNT may be examined to
3070 REM determine the actual number of bytes
3075 REM transferred.
3080 PRINT "GPIB ERROR" : STOP
4000 REM A routine at this location would
4010 REM analyze the fault code returned in the
4015 REM DVM's status byte
4020 REM and take appropriate action.
4040 PRINT "DVM ERROR" : STOP
5000 END