EasyManua.ls Logo

Chroma 19032 - Page 116

Default Icon
138 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Electrical Safety Analyzer 19032 Users Manual
5-50
Using Status Reporting by GPIB Using Basic
REM---------------------------------------------------------------------
REM run the ULI file before this program.
REM This program is that getting results through GPIB from the device.
REM Device GPIB address is 3
REM---------------------------------------------------------------------
CLS
PRINT "Program is running..."
OPEN "GPIB0" FOR OUTPUT AS #1 'set the talker
OPEN "GPIB 0" FOR INPUT AS #2 'set the listener
REM define the SRQ-handling routine
ON PEN GOSUB MySRQRoutine
REM Enable the on SRQ functionality
PEN ON
PRINT #1, "ABORT" 'initializing complete
PRINT #1, "GPIBEOS IN LF" 'set the end code
PRINT "waiting for SRQ from device"
PRINT #1, "OUTPUT 3;:SOURce:SAFEty:STOP" 'STOP the Device
PRINT #1, "OUTPUT 3;*SRE 32" 'set status enable register
PRINT #1, "OUTPUT 3;*ESE 60" 'set standard enable register
PRINT #1, "OUTPUT 3;:sdf" 'send undefined command
FOR I% = 1 TO 10000
PRINT " wait for SRQ ", I%
NEXT I%
PRINT "Program is stopped!"
GOTO END1
MySRQRoutine: 'SRQ interrupt
PEN OFF
PRINT "Running the SRQ"
PRINT #1, "OUTPUT 3;*ESR?"
PRINT #1, "ENTER 3"
INPUT #2, C% 'get the questionable state
IF C% = 32 THEN
PRINT "All Pass"
ELSE
PRINT " Fail "
END IF 'End of SRQ interrupt
END1:
CLOSE : SYSTEM
END

Table of Contents

Other manuals for Chroma 19032

Related product manuals