Model 2790 SourceMeter
®
Switch System Reference Manual
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 full.
IF N = 2 THEN GOTO HalfFull
' Branch when buffer 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 Full"
' Display full message.
GOTO WaitSRQ
' Return to WaitSRQ.
HalfFull: PRINT "Buffer Full"
' Display 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.
Summary of Contents for 2790
Page 3: ......
Page 7: ......
Page 105: ...2 48 Model 2790 SourceMeter Switch System Reference Manual...
Page 245: ...7 40 Model 2790 SourceMeter Switch System Reference Manual...
Page 265: ...8 20 Model 2790 SourceMeter Switch System Reference Manual...
Page 305: ...10 22 Model 2790 SourceMeter Switch System Reference Manual...
Page 328: ...12 CommonCommands...
Page 336: ...13 SCPISignalOriented MeasurementCommands...
Page 345: ...13 10 Model 2790 SourceMeter Switch System Reference Manual...
Page 355: ...14 10 Model 2790 SourceMeter Switch System Reference Manual...
Page 356: ...15 SCPIReferenceTables...
Page 419: ...16 38 Model 2790 SourceMeter Switch System Reference Manual...
Page 461: ...A 2 Specifications Model 2790 SourceMeter Switch System Reference Manual...
Page 462: ...Model 2790 SourceMeter Switch System Reference Manual Specifications A 3...
Page 463: ...A 4 Specifications Model 2790 SourceMeter Switch System Reference Manual...
Page 464: ...Model 2790 SourceMeter Switch System Reference Manual Specifications A 5...
Page 465: ...A 6 Specifications Model 2790 SourceMeter Switch System Reference Manual...
Page 466: ...Model 2790 SourceMeter Switch System Reference Manual Specifications A 7...
Page 471: ...A 12 Specifications Model 2790 SourceMeter Switch System Reference Manual...
Page 472: ...B StatusandErrorMessages...
Page 479: ...B 8 Model 2790 SourceMeter Switch System Reference Manual...
Page 493: ...C 14 Model 2790 SourceMeter Switch System Reference Manaul...
Page 509: ...E 6 Model 2790 SourceMeter Switch System Reference Manual...
Page 510: ...F IEEE 488BusOverview...
Page 525: ...F 16 Model 2790 SourceMeter Switch System Reference Manual...
Page 526: ...G CalibrationReference...