Step 3. Initialize the interface and the test set

Last Updated: August 29, 2007

Refer to the following sections:

For more information on the conventions used in the programming examples click here.

General Information About This Step

To ensure consistent, repeatable performance, you need to start the program, computer, and test set in a known state. Without correct initialization, your program may run correctly in one instance and not in another. This might be due to changes made in configuration by previous program runs or from the front panel of the test set.

Initializing the computer and test set involves the following steps:

When using the Agilent VISA COM library, you can use the resource session object’s Clear method to clear the interface buffer. When you are using GPIB, the resource session object’s Clear method also resets the test set's parser. The parser is the program which reads in the instructions which you send it.

It is important to get the test set to a known state before each production session.

Sending the *RST command fully presets the test set, which ends all measurement processes and restores all values to defaults.

Before each production session, it is useful to clear the error queue of any old messages. That way, you know that any messages logged are relevant to the current production session.

Sending the *CLS command clears the error queue.

Programming Example

' Clear the interface buffer and reset the test set's parser.

TestSet.IO.Clear()

 

' Fully preset the test set.

TestSet.WriteString("*RST")

 

' Clear the test set's error queue.

TestSet.WriteString("*CLS")

 

Go to Step 4. Set up general operating conditions