E-8 IEEE-488 and SCPI Conformance Information Model 6487 Reference Manual
SRQ when buffer fills with 200 readings
The following QuickBasic program (Figure E-2) will store 200 readings in the buffer.
When the buffer fills to the set amount (200 readings), an SRQ will occur and a message
will be displayed on the computer to indicate the event.
Figure E-2
Program example
' $INLCUDE: 'ieeeqb.bi'
CLS 'Clear PC output screen.
CONST addr = 22 'Set instrument address.
'
' Init GPIB
'
CALL initialize(21, 0)
CALL transmit("unt unl listen " + STR$(addr) + " sdc unl", status%)'Restore *rst defaults
CALL send(addr, "*rst", status%) 'Send Device Clear.
CALL send(addr, "trac:cle", status%) 'Clear buffer.
CALL send(addr, "trig:coun 200", status%) '200 trigger count.
CALL send(addr, "trac:poin 200", status%) 'Set buffer size to 200.
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 512", status%) 'Enable buffer bit B9.
CALL send(addr, "*ese 0", status%) 'Disable standard events.
CALL send(addr, "*sre 1", status%) 'Enable measurement events.
CALL send(addr, "syst:zch off", status%) 'Disable zero check.
CALL send(addr, "init", status%) 'Start measurement/store process.
WAITSRQ:
WHILE srq = 0:WEND 'Wait for GPIB SRQ line to go true.
CALL spoll(addr, poll%, status%) 'Clear rqs/mss bit in status bit
'register.
CALL send(addr, "*cls", status%) 'Clear all event registers.
PRINT "BUFFER FULL" 'Display buffer full message.
END