E-2 Example Programs
Program examples
All examples presume QuickBASIC version 4.5 or higher and a CEC IEEE-488 interface
card with CEC driver version 2.11 or higher, with the Model 2182 at address 7 on the IEEE-488
bus.
Changing function and range
The Model 2182 has independent range control for each of its two voltage measurement
functions. This means, for example, that autorange can be turned on for DCV1 while leaving it
off for DCV2.
Another difference is in the parameter to the range command. In other instruments, a single
number was used to denote each range. The parameter of the SCPI RANGe command is given
as "the maximum value to measure." The instrument interprets this parameter and goes to the
appropriate range. When you query the range with RANGe? the instrument sends back the full-
scale value of its present range.
The following example program illustrates changing function and range. It sets the range for
several functions, and then takes readings on each of those functions.
Note that the Model 2182 rounds the range parameter to an integer before choosing the
appropriate range. Sending SENSe:VOLTage:CHANnel1:RANGe 20.45 will set Channel 1 of
the Model 2182 to the 100V range.