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

*CLS CONF:VOLT 15 VOLT:DC:NPLC 10 TRIG:COUN 10 TRIG:DEL .01 CALC:FUNC AVER CALC:STAT ON *SRE 16

INIT

FETC?

Reset the multimeter.

Clear the multimeter’s status registers. Configure for dc volts, expected input of 15V. Set number of power line cycles to 10. Multimeter will accept 10 triggers.

Use a 10ms delay before each measurement. Select a math function.

Enable the math operations.

Required by the E1312A to detect MAV bit in SPOLL. Puts multimeter in wait-for-trigger state; trigger source is "IMM"; internal trigger occurs "immediately" and measurements are stored in multimeter internal memory.

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.

62 HP E1312A/E1412A Multimeter Application Information

Chapter 2

Page 62
Image 62
HP WaterSkis E1312A, WaterSkis E1412A manual Synchmav Source Code File, RST Init FETC?