
11-20
Status Structure
Model 2700 Multimeter/Switch System User’s Manual
Programming examples
Example 1 – Program and read a register set
NOTE
The following example can be run from the KE2700 Instrument Driver using the
example named “Prmr” in
.
The following command sequence programs and reads the measurement register set:
STAT:MEAS:ENAB 512
' Enable BFL (buffer full).
STAT:MEAS:COND?
' Read Measurement Condition Register.
STAT:MEAS?
' Read Measurement Event Register.
NOTE
Examples 2 and 3 demonstrate the proper method to read an individual bit of an
event register. In general, the state of an event register bit is determined by
enabling the event bit, then reading the status byte (*STB?).
Example 2 – Read RAV bit of measurement event register
The following command sequence demonstrates the proper method to read the RAV bit of
the measurement event register:
*RST
' Put 2700 in “one-shot” mode.
*CLS
' Clear measurement event register.
STAT:PRES
' Clear measurement event enable register.
STAT:MEAS:ENAB 32
' Enable RAV bit (B5) of the measurement event register.
INIT
' Trigger one measurement.
*STB?
' Read status byte register.
*CLS and STAT:PRES resets the measurement register bits to zero. The :ENAB command
enables the reading available bit B5 (RAV) of the measurement event register. When a
reading is triggered and becomes available, bit B0 (MSB) of the status byte will set. INIT
triggers a reading and *STB? reads the status byte.
Since you are only interested in bit B0 of the status byte, it is recommended that your pro-
gram routine mask out the other bits, which may also be set. For example, *STB? may
return decimal “17”. The binary bit pattern for decimal 17 is as follows:
B7 B6 B5 B4 B3 B2 B1 B0
0
0
0
1
0
0
0
1
*STB? returns decimal “17” (B4 and B0 set)
If, in your program, you logically AND the above returned binary value with 00000001,
you will mask out bits B1 through B7:
B7 B6 B5 B4 B3 B2 B1 B0
0
0
0
1
0
0
0
1
*STB? returns decimal 17 (B0 and B4 set)
0
0
0
0
0
0
0
1
Mask to read B0 (decimal 1)
__________________________________
0
0 0
0
0 0
0
1
Result of logic AND operation (decimal 1)
Summary of Contents for 2700
Page 3: ......
Page 7: ......
Page 197: ...5 24 Rel Math Ratio Channel Average dB Model 2700 Multimeter Switch System User s Manual...
Page 213: ...6 16 Buffer Model 2700 Multimeter Switch System User s Manual...
Page 289: ...9 18 Limits and Digital I O Model 2700 Multimeter Switch System User s Manual...
Page 335: ...11 24 Status Structure Model 2700 Multimeter Switch System User s Manual...
Page 336: ...12 CommonCommands...
Page 344: ...13 SCPISignalOriented MeasurementCommands...
Page 353: ...13 10 SCPI Signal Oriented Commands Model 2700 Multimeter Switch System User s Manual...
Page 363: ...14 10 FORMat and Misc SYSTem Commands Model 2700 Multimeter Switch System User s Manual...
Page 364: ...15 SCPIReferenceTables...
Page 391: ...A 2 Specifications Model 2700 Multimeter Switch System User s Manual...
Page 392: ...Model 2700 Multimeter Switch System User s Manual Specifications A 3...
Page 393: ...A 4 Specifications Model 2700 Multimeter Switch System User s Manual...
Page 394: ...Model 2700 Multimeter Switch System User s Manual Specifications A 5...
Page 395: ...A 6 Specifications Model 2700 Multimeter Switch System User s Manual...
Page 400: ...B Model7700ConnectionGuide...
Page 411: ...B 12 Model 7700 Connection Guide Model 2700 Multimeter Switch System User s Manual...
Page 412: ...C StatusandErrorMessages...
Page 419: ...C 8 Status and Error Messages Model 2700 Multimeter Switch System User s Manual...
Page 420: ...D SignalProcessing SequenceandDataFlow...
Page 434: ...E MeasurementConsiderations...
Page 443: ...E 10 Measurement Considerations Model 2700 Multimeter Switch System User s Manual...
Page 454: ...G IEEE 488BusOverview...
Page 469: ...G 16 IEEE 488 Bus Overview Model 2700 Multimeter Switch System User s Manual...
Page 470: ...H KE2700InstrumentDriver Examples...
Page 489: ...H 20 KE2700 Instrument Driver Examples Model 2700 Multimeter Switch System User s Manual...
Page 499: ......