
Status Structure 8-19
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
‘ Enable BF1 (Buffer Full for battery channel).
*TRG
‘ Trigger buffer data.
STAT:MEAS?
‘ 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.
FETCh:ARR?
‘ Request the buffer data from the 2306
Language specific
‘ Talk the 2306 for the array (buffer) data.
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
‘ Enable BF1 (Buffer Full for battery channel).
*SRE 1
‘ Enable MSB bit of status byte.
READ:ARR?
‘ Trigger buffer data.
Language specific
‘ Wait for an SRQ on BF1.
Language specific
‘ Talk the 2306 for the array (buffer) data.
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 (
) shows how the two queues are structured with
the other registers.
Test Equipment Depot - 800.517.8431 - 99 Washington Street Melrose, MA 02176
TestEquipmentDepot.com
Summary of Contents for 2302
Page 2: ...Test Equipment Depot 800 517 8431 99 Washington Street Melrose MA 02176 TestEquipmentDepot com...
Page 4: ...Test Equipment Depot 800 517 8431 99 Washington Street Melrose MA 02176 TestEquipmentDepot com...
Page 16: ...Test Equipment Depot 800 517 8431 99 Washington Street Melrose MA 02176 TestEquipmentDepot com...
Page 22: ...Test Equipment Depot 800 517 8431 99 Washington Street Melrose MA 02176 TestEquipmentDepot com...
Page 344: ...Test Equipment Depot 800 517 8431 99 Washington Street Melrose MA 02176 TestEquipmentDepot com...
Page 346: ...Test Equipment Depot 800 517 8431 99 Washington Street Melrose MA 02176 TestEquipmentDepot com...
Page 347: ...Test Equipment Depot 800 517 8431 99 Washington Street Melrose MA 02176 TestEquipmentDepot com...