134
of 148
6.5.2 Sample program for the IEEE488 interface
‘
********************************************************************************************************************************************
‘* File Name: 2329_iec.bas Version: 1.0
‘*
‘* Developed by: M.Westermann
on 26.03.1997
‘* Changed by:
on dd.mm.yyyy
‘*
‘* Language: QBASIC 4.5 Operating system:
MS-DOS 6.22
‘*
‘* Description: Sample program for the 2329-IEEE488
‘*
‘* Note: To load the IEEE488 bus driver library, call up the
‘*
QB45 basic in a Batch file as follows:
‘*
"qb 2329_iec.bas /L c:\AT-GPIB\QBASIC\QBIB.QLB“
‘*
The creation of the QBIB.QLB is described in the Readme file
‘
accompanying the IEEE card.
‘*
The AT-GPIB/TNT made by National Instruments is used
‘*
in this example.
‘*
‘* Copyright by burster präzisionsmesstechnik, Gernsbach 07224-6450
‘********************************************************************************************************************************************
‘Declaration of the functions used
DECLARE FUNCTION CmdSenden (id2329%, CMD$)
‘Send command
DECLARE FUNCTION CmdEmpfangen (id2329%, antwort$)
DECLARE FUNCTION AbfrageSRQ (id2329%) ‘‘Request Status Operation Condition Register
DECLARE FUNCTION LeseOperEventReg (id2329%)
DECLARE FUNCTION LeseQuestReg (id2329%)
DECLARE FUNCTION LeseQuestFresReg (id2329%)
DECLARE SUB gpiberr (msg$)
‘Include file for the IEEE card
‘$INCLUDE: ‘d:\at-gpib\qbasic\qbdecl.bas’
‘Definition of the masks for register scanning
CONST EOC = &H100
‘Bit 8 of the Operation Status Register
CONST FRESError = &H200
‘Bit 9 of the Questionable Status Register
CONST TEMPError = &H10
‘Bit 4 of the Questionable Status Register
CONST SRQOperReg = &H80
‘Bit 7 of the SRQ Register
CONST SRQQuestReg = &H8
‘Bit 3 of the SRQ Register
CLS
‘Clear
screen
"DEMOPROGRAMM
"
PRINT "burster RESISTOMAT
®
Model 2329 "
PRINT "Control via IEC bus interface"
PRINT
INPUT "Enter the IEEE488 address of the RESISTOMAT
®
Model 2329:", adr
PRINT
PRINT "Measurement started. Press space bar to cancel"
PRINT