Model 2700 Multimeter/Switch System User’s Manual Status Structure 11-11
' $INCLUDE: 'ieeeqb.bi'
CLS ' Clear PC output screen.
CONST addr = 16 ' Set instrument address.
'
' Init GPIB.
'
CALL initialize(21, 0)
CALL transmit("unt unl listen " + STR$(addr) + " sdc unl", status%)' Send Device Clear.
CALL send(addr, "*rst", status%) ' Restore *rst defaults.
CALL send(addr, "trac:cle", status%) ' Clear buffer.
CALL send(addr, "trig:coun inf", status%) ' Infinite trigger count.
CALL send(addr, "trac:poin 2000", status%) ' Set buffer size to 2000.
CALL send(addr, "trac:not 1750", status%) ' Set Trace Notify bit on 1750th reading.
CALL send(addr, "trac:feed:cont next", status%) ' Enable buffer.
CALL send(addr, "stat:pres", status%) ' Reset measure enable bits.
CALL send(addr, "*cls", status%) ' Clear all event registers.
CALL send(addr, "stat:meas:enab 13120", status%)' Enable buffer bits; B6, B8, B9, B12, B13.
CALL send(addr, "*ese 0", status%) ' Disable standard events.
CALL send(addr, "*sre 1", status%) ' Enable measurement events.
CALL send(addr, "init", status%) ' Start measure/store process.
N = 0 ' Initialize quarter buffer counter.
WaitSRQ:
WHILE srq = 0: WEND ' Wait for GPIB SRQ line to go true.
CALL spoll(addr, poll%, status%) ' Clear rqs/mss bit in status byte
register.
CALL send(addr, "*cls", status%) ' Clear all event registers.
N = N + 1 ' Increment buffer counter.
IF N = 1 THEN GOTO QtrFull ' Branch when buffer G full.
IF N = 2 THEN GOTO HalfFull ' Branch when buffer H full.
IF N = 3 THEN GOTO ThreeQtrFull ' Branch when buffer I full.
IF N = 4 THEN GOTO 1750thReading ' Branch when 1750th reading stored.
PRINT "BUFFER FULL" ' Display buffer full message.
END
QtrFull: PRINT "Buffer G Full" ' Display G full message.
GOTO WaitSRQ ' Return to WaitSRQ.
HalfFull: PRINT "Buffer H Full" ' Display H full message.
GOTO WaitSRQ ' Return to WaitSRQ.
ThreeQtrFull: PRINT "Buffer I Full" ' Display I full message.
GOTO WaitSRQ ' Return to WaitSRQ.
1750thReading: PRINT "1750th reading stored" ' Display 1750th reading message.
GOTO WaitSRQ ' Return to WaitSRQ.