HP34401A Getting Started

Provides an example of how to use the HP34401A subVIs programmatically. This VI initializes the instrument, configures a measurement, sets internal triggering, takes measurements, and closes the instrument.

Caution  If you are using the Serial interface, the pass/fail outputs (Pins 1 and 9) must not be enabled on the serial connector. Enabling these outputs might result in instrument damage.

Details

Samples specifies the number of readings to take each time a trigger from the selected trigger source is received. The default value is one sample per trigger. The valid range is 1 to 50,000 samples per trigger. If the value selected is not within the range, it is changed to the nearest acceptable value.
Manual Delay specifies a delay between the trigger signal and each sample that follows. The valid range is 0 to 3600 seconds. If the value you select is not within the range, the nearest acceptable value is used.
Source specifies the trigger source. The choices are external (hardware triggering), software triggering, or internal (auto triggering). The following are valid ranges:

0Internal (default)
1External
2Software
Interface specifies the interface, either GPIB or Serial. Use TRUE for a Serial interface, and use FALSE (default) for a GPIB interface. This control and the Address/Port control build the Instr. Descriptor string, which uniquely identifies the instrument to open or initialize. The following table shows the syntax for the Instr. Descriptor. Optional parameters are shown in square brackets ([ ]).

Interface Syntax
GPIB GPIB[bd]::prim addr[::sec addr]
Serial ASRL[port]::INSTR
The following table describes the parameters and default values:

Parameter Description (Default Value)
bd GPIB board (0)
prim addr GPIB primary address (1)
sec addr GPIB secondary address (none)
port serial port number (COM1 = 1, etc.)
Address/Port specifies the GPIB address of the instrument or the Serial port connected to the instrument. The default is 22. For GPIB, the default interface name is GPIB0.

The following are valid ranges:

  • GPIB Addresses: 1-31
  • Serial Port: Normally 1 and 2

This control and the Interface control build the Instr. Descriptor string, which uniquely identifies the instrument to open or initialize. The following table shows the syntax for the Inst. Descriptor. Optional parameters are shown in square brackets ([ ]).

Interface Syntax
GPIB GPIB[bd]::prim addr[::sec addr]
Serial ASRL[port]::INSTR
The following table describes the parameters and default values.

Parameter Description (Default Value)
bd GPIB board (0)
prim addr GPIB primary address (1)
sec addr GPIB secondary address (none)
port serial port number (COM1 = 1, etc.)
Range/Resolution selects automatic or manual ranging and resolution. You can set the resolution to 4, 5, or 6 full digits, plus a half-digit that can only be a 0 or 1. Use 6.5 digits for high accuracy or 4.5 digits for high speed. The default resolution is 5.5 digits. If TRUE (default), the VI uses automatic ranging and resolution. If FALSE, the VI uses manual ranging and resolution.
Function sets the function to be configured by the other control settings. The following are valid ranges:

0DC Voltage (default)
1AC Voltage
22-Wire Resistance
34-Wire Resistance
4DC Current
5AC Current
6Frequency
7Period
8Continuity
9Diode Testing
10VDC:VDC Ratio
Manual Res. is expressed in terms of the number of digits the multimeter can measure or display. You can set the resolution to 4, 5, or 6 full digits, plus a 1/2 digit, which can be only 0 or 1. Select 6.5 digits to increase measurement accuracy and improve noise rejection. Select 4.5 digits to increase measurement speed.

The following are valid ranges:

04.5 Digits
15.5 Digits (default)
26.5 Digits
error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurs before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a non-zero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
Manual Range specifies the desired range for the selected function. The valid range depends on the Function setting. Function can have the following settings:

  • AC Voltage: 0.1, 1, 10, 100, 1K Volts
  • DC Voltage: 0.1, 1, 10, 100, 1K Volts
  • 2-Wire Resistance: 100, 1K, 10K, 100K, 1M, 10M, 100M Ohms
  • 4-Wire Resistance: 100, 1K, 10K, 100K, 1M, 10M, 100M Ohms
  • DC Current: 0.01, 0.1, 1, 3 Amps
  • AC Current: 1, 3 Amps
  • Frequency: Auto ranging
  • Period: Auto ranging
  • Continuity: Auto ranging
  • Diode: Auto ranging
  • Ratio: Auto ranging
Timeout reads back the data from the multimeter. If the buffer is set to Internal, this value is the time needed to read the samples from the multimeter. If the buffer is set to Output, this value also includes the time required for the multimeter to measure the data. If the multimeter is set to external triggering, the time between external triggers must also be considered when setting this value.
Serial Port sets the parameters for the serial interface. These settings must match the actual instrument settings. You cannot change serial parameters remotely.
Baud Rate specifies the baud rate used by the serial interface (RS-232) to communicate with the instrument. These settings must match the actual instrument settings. Serial parameters cannot be changed remotely. The following table includes all valid values.

0300
1600
21200
32400
44800
59600 (default)
Parity and Data Bits sets the parity value and the number of data bits for the serial interface. These settings must match the actual instrument settings. Serial parameters cannot be changed remotely. The following table includes all valid values.

0Parity:None, 8 Bits
1Parity:Even, 7 Bits
2Parity:Odd, 7 Bits
Measurements displays the output of the selected function. This includes all mathematical operations except MIN/MAX. This array records all measurements taken when multiple triggers or samples are selected.
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a non-zero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.

HP34401A Getting Started Details

Note  You must have VISA version 2.0 or higher installed to use this instrument driver.

You can select autoranging, or set a manual range for all functions except frequency, period, continuity, diode check, or ratio. Selecting one of these functions sets autoranging by default. To optimize for speed, turn resolution to 4.5 digits, set a manual range, set trigger delay to minimum, and turn off error queries.

Note  The instrument is left in Remote mode when the instrument driver is closed. This is because if the instrument is put into Local mode there is a potential problem when running the instrument driver repeatedly with a large number of measurements. After doing an acquisition of 50,000 points in Serial Mode with a timeout of 990E+3 ms, the instrument took approximately 2.5 minutes to go from Local to Remote mode the next time the Getting Started VI was run.