C-2 Example Programs Model 6485 and 6487 User’s Manual
Programming examples
This section contains example programs (pseudo-code) to achieve speed and buffer size
specifications.
1000 readings/second into internal buffer
NOTE This program configures the Model 6485/6487 to 0.01 PLC, digital filters off,
front panel off, auto-zero off, as well as takes and stores 2000 readings.
*RST ' Return 6485/6487 to RST defaults.
TRIG:DEL 0 ' Set trigger delay to zero seconds.
TRIG:COUN 2000 ' Set trigger count to 2000.
NPLC .01 ' Set integration rate to .01 PLC.
RANG .002 ' Use 2mA range.
SYST:ZCH OFF ' Turn zero check off.
SYST:AZER:STAT OFF ' Turn auto-zero off.
DISP:ENAB OFF ' Turn display off.
*CLS ' Clear status model.
TRAC:POIN 2000 ' Set buffer size to 2000.
TRAC:CLE ' Clear buffer.
TRAC:FEED:CONT NEXT ' Set storage control to start on next
' reading.
STAT:MEAS:ENAB 512 ' Enable buffer full measurement event.
*SRE 1 ' Enable SRQ on buffer full measurement
' event.
*OPC? ' Operation complete query
' (synchronize completion of commands).
read back result of *opc?
INIT ' Start taking and storing readings.
' Wait for GPIB SRQ line to go true.
DISP:ENAB ON ' Turn display back on.
TRAC:DATA? ' Request data from buffer.
read back result