Download Model 2700 Multimeter/Switch System
Transcript
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 Table H-1 of Appendix H. The following command sequence programs and reads the measurement register set: STAT:MEAS:ENAB 512 STAT:MEAS:COND? STAT:MEAS? NOTE ' Enable BFL (buffer full). ' Read Measurement Condition Register. ' Read Measurement Event Register. 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 *CLS STAT:PRES STAT:MEAS:ENAB 32 INIT *STB? ' ' ' ' ' ' Put 2700 in “one-shot” mode. Clear measurement event register. Clear measurement event enable register. Enable RAV bit (B5) of the measurement event register. Trigger one measurement. 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 program 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)
Related documents
Manual - Test Equipment Depot
User`s Manual
Model 2701 Ethernet-Based DMM / Data Acquisition
User Manual
Model 27XXIntegra Series Quick Start Guide
Series 3700A System Switch/Multimeter User`s Manual
Keithley -- 2750 -
Training Manual - System Administration V4-7
Manual - Test Equipment Depot
Model 2790 Sourcemeter Switch system User`s Manual
User`s Manual
Manual