'**************************************************************************** 'Module GPIB 'This module contains I/O subroutines for the GPIB board. ' 'Zachary Wolf '5/8/95 '**************************************************************************** 'Open the parameter file REM $INCLUDE: 'param.inc' 'The required parameters are in 'GPIB ' 'The required parameters are 'gpibinP% 'gpiboutP% ' 'Sample GPIB parameters 'GPIB 'COMMON SHARED /gpib/ gpibinP%, gpiboutP% SUB gpibinit '**************************************************************************** 'This subroutine opens the communication files to the GPIB board. It then 'clears and resets the board. ' 'Outputs put in the /gpib/ common block: ' gpibinP%, file for gpib input ' gpiboutP%, file for gpib output ' 'Zack Wolf '2/22/94 '**************************************************************************** '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" '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$ 'Place the file numbers in the /gpib/ common block gpibinP% = gpibin% gpiboutP% = gpibout% END SUB