7-14
Return to
Section Topics
2308-900-01 Rev. A / July 2008
Section 7: Status Structure
Model 2308 Portable Device Battery/Charger Simulator User’s Manual
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,
Language specific
‘ talk to the instrument for the data.
FETCh:ARR?
‘ Request the buffer data from Model 2308
Language specific
‘ Talk Model 2308 for the array (buffer) data.
This slows down the responsiveness of the Model 2308 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 2308 is talked too
early for the buffer data, then a GPIB timeout may occur (see
Setting the GPIB timeout for
responses
).
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 Model 2308 for the array (buffer) data.
This method prevents the Model 2308 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
).
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 (
Figure 7-1
) shows how the two queues are structured with the
other registers.
Parameters:
<NRf> = 0 to 65535 decimal format
Table 7-6
Common and SCPI commands - event enable registers
Command Description
Default
Note: Power-up and STATus:PRESet resets all bits of all enable registers to 0. *CLS has no effect.
STATus:PRESet has no effect on settings for *ESE.
Summary of Contents for 2308
Page 2: ......
Page 12: ...This page left blank intentionally...
Page 32: ...This page left blank intentionally...
Page 106: ...This page left blank intentionally...
Page 140: ...This page left blank intentionally...
Page 208: ...This page left blank intentionally...
Page 220: ...This page left blank intentionally...