HP (Hewlett-Packard) E1412A Waterskis User Manual


 
62 HP E1312A/E1412A Multimeter Application Information Chapter 2
SYNCHMAV
Source Code File
This program has the multimeter take 10 measurements just like SYNCHOPC.
Readings are transferred to the output buffer by a
FETC? command. The
Message Available bit (MAV) in the status byte (see Figure 2-5 on page 60) is
monitored to detect when the measurements are complete and the Multimeter
has readings in the output buffer. Readings are retrieved by the computer when
the MAV bit in the status byte indicates the measurements are complete and
readings are available. The Multimeter then calculates the average, minimum
and maximum reading.
**** Set up the Multimeter ****
*RST
Reset the multimeter.
*CLS
Clear the multimeter’s status registers.
CONF:VOLT 15
Configure for dc volts, expected input of 15V.
VOLT:DC:NPLC 10
Set number of power line cycles to 10.
TRIG:COUN 10
Multimeter will accept 10 triggers.
TRIG:DEL .01
Use a 10ms delay before each
measurement.
CALC:FUNC AVER
Select a math function.
CALC:STAT ON
Enable the math operations.
*SRE 16
Required by the E1312A to detect MAV bit in SPOLL.
INIT
Puts multimeter in wait-for-trigger state; trigger
source is "IMM"; internal trigger occurs
"immediately" and measurements are stored in
multimeter internal memory.
FETC?
Transfer measurements from the multimeter internal
memory to the output buffer and retrieve them with
the computer.
Loop
SPOLL - read the multimeter’s status byte until bit 4 (MAV) goes
high to indicate there is a message available in the output buffer.
End Loop
** NOTE: If
TRIG:COUN is too big, FETC? can timeout before
measurements complete.
FETC? expects a response before the timeout
interval specified in the program code. Using the previous program
detecting the OPC bit is recommended.
Retrieve the
AVERage math operation response from the multimeter.
CALC:AVER:AVER?
Retrieve the average measurement value.
CALC:AVER:MAX?
Retrieve the maximum measurement value.
CALC:AVER:MIN?
Retrieve the minimum measurement value.
Check the multimeter for system errors.
SYST:ERR?
Retrieve the system error response from the
multimeter.