'**************************************************************************** 'Module GPIB 'This module contains I/O subroutines for the GPIB board. ' 'Zachary Wolf '9/20/95 '**************************************************************************** SUB gpibinit (gpibin%, gpibout%) '**************************************************************************** 'This subroutine opens the communication files to the GPIB board. It then 'clears and resets the board. ' 'Output: ' gpibin%, file for gpib input ' gpibout%, file for gpib output ' 'Zack Wolf '2/22/94, 9/20/95 '**************************************************************************** 'Open a file to get data from the GPIB board. gpibin% = FREEFILE OPEN "\dev\ieeein" FOR INPUT AS #gpibin% 'Open a file to talk to the GPIB board. gpibout% = FREEFILE OPEN "\dev\ieeeout" FOR OUTPUT AS #gpibout% 'Reset the GPIB board. IOCTL #gpibout%, "BREAK" PRINT #gpibout%, "RESET" 'Clear the GPIB extender boxes, if used PRINT #gpibout%, "ABORT" 'Enable no data available error detection. PRINT #gpibout%, "FILL ERROR" 'Set the timeout period PRINT #gpibout%, "TIME OUT 20" 'Display a message PRINT PRINT "Resetting the GPIB..." 'Display software information PRINT #gpibout%, "HELLO" LINE INPUT #gpibin%, a$ PRINT a$ 'Display the status PRINT #gpibout%, "STATUS" LINE INPUT #gpibin%, a$ PRINT a$ END SUB