Using the initiate and fetch? commands, Measure? example – Agilent Technologies 34401A User Manual

Page 121

Advertising
background image

C a u t i o n

If you send two query commands without reading the response from the
first, and then attempt to read the second response, you may receive some
data from the first response followed by the complete second response.
To avoid this, do not send a query command without reading the
response. When you cannot avoid this situation, send a device clear
before sending the second query command.

Using the INITiate and FETCh? Commands

The

INITiate

and

FETCh?

commands provide the lowest level of

control (with the most flexibility) of measurement triggering and
reading retrieval. Use the

INITiate

command after you have

configured the multimeter for the measurement. This changes the state
of the triggering system from the “idle” state to the “wait-for-trigger”
state. Measurements will begin when the specified trigger conditions
are satisfied after the

INITiate

command is received. The readings are

placed in the multimeter’s internal memory (up to 512 readings can be
stored). Readings are stored in memory until you are able to retrieve them.

Use the

FETCh?

command to transfer the readings from the

multimeter’s internal memory to the multimeter’s output buffer where
you can read them into your bus controller.

MEASure?
Example

The following program segment shows how to use the

MEASure?

command to make a measurement. This example configures the
multimeter for dc voltage measurements, automatically places the
multimeter in the “wait-for-trigger” state, internally triggers the
multimeter to take one reading, and then sends the reading to the
output buffer.

MEAS:VOLT:DC? 10,0.003
bus enter statement

This is the simplest way to take a reading. However, you do not have
any flexibility with

MEASure?

to set the trigger count, sample count,

trigger delay, etc. All measurement parameters except function, range,
and resolution are preset for you automatically (see the table on page 112).

4

Chapter 4 Remote Interface Reference
Simplified Programming Overview

115

Advertising