Programming Example - Program And Read Measurement Event Register; Queues - Keithley 2302 Instruction Manual

Battery/charger simulator
Hide thumbs Also See for 2302:
Table of Contents

Advertisement

Programming example — program and read measurement event register
The following command sequence enables the battery channel (#1) buffer full bit (B9) of the
measurement register set, and then reads the event register. After the programmed number of
readings (average count) have been taken, reading the event register will return a value that has
bit 9 set (bit 9 has a decimal value of 512).
STAT:MEAS:ENAB 512
*TRG
STAT:MEAS?
FETCh:ARR?
Language specific
This slows down the responsiveness of the Model 2306 since while the unit is trying to fill the
buffer it has to respond to the STAT:MEAS? to let you know if the buffer is full. Once the buffer
is full, it may be talked for the array of data as shown in the example. If the Model 2306 is talked
too early for the buffer data, then a GPIB timeout may occur. (See "Setting the GPIB timeout
for Responses" in Section 6.)
The following command sequence enables the battery channel's (#1) buffer full bit (B9) of
the measurement register set, and then causes an SRQ when the buffer is full:
STAT:MEAS:ENAB 512
*SRE 1
READ:ARR?
Language specific
Language specific
This method prevents the Model 2306 from being talked too early for data. In addition, this
eliminates the concern of knowing the GPIB timeout setting. (See "Setting the GPIB timeout
for Responses" in Section 6.)

Queues

The power supply uses two queues, which are first-in, first-out (FIFO) registers:
• Output queue — Used to hold reading and response messages.
• Error queue — Used to hold error and status messages.
The power supply status model
the other registers.
Test Equipment Depot - 800.517.8431 - 99 Washington Street Melrose, MA 02176
TestEquipmentDepot.com
' Enable BF1 (Buffer Full for battery channel).
' Trigger buffer data.
' Read Measurement Event Register.
' Once STAT:MEAS? returns a value that has bit 9
' (bit 9 has a decimal value of 512) set,
' you may talk the instrument for the data.
' Request the buffer data from the 2306
' Talk the 2306 for the array (buffer) data.
' Enable BF1 (Buffer Full for battery channel).
' Enable MSB bit of status byte.
' Trigger buffer data.
' Wait for an SRQ on BF1.
' Talk the 2306 for the array (buffer) data.
(Figure
8-1) shows how the two queues are structured with
Status Structure 8-19

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

2302-pj23062306-vs2306-pj

Table of Contents