To Read Error Code/Message; To Read Spot Measurement Data - Keysight Technologies E5260 Series Programming Manual

Parametric measurement solutions
Hide thumbs Also See for E5260 Series:
Table of Contents

Advertisement

Example
Example 1
Example 2
Example 3
Programming Basics
Getting Started

To Read Error Code/Message

If any error occurs, the E5260/E5270 will not put the measurement data into the data
output buffer. Hence, confirm that no error has occurred before reading the
measurement data. To read the error code, enter the ERR? command, and to read the
error message, enter the EMG? command.
OUTPUT @E5270;"ERR? 1"
ENTER @E5270;Code
IF Code<>0 THEN
OUTPUT @E5270;"EMG? ";Code
ENTER @E5270;Msg$
PRINT "ERROR: ";Msg$
ELSE
:
:
This example checks the error buffer, and prints the error message on the computer
screen if any error code is stored in the error buffer.

To Read Spot Measurement Data

After the spot measurements, the E5260/E5270 puts the measurement data into its
output data buffer. You can read the data as shown below. The examples read the
header information and the measurement data included in the ASCII data set by the
FMT5 command. For the data output format, see
1-22. The example uses the HP BASIC or Microsoft Visual Basic .NET language.
For the HP BASIC users, use the ENTER statement.
ENTER @E5270 USING "#,3A,12D,X";Head$,Mdata
For the VISA library users, use the viScanf, viRead, or another function.
Dim ret_rd As System.Text.StringBuilder = _
New System.Text.StringBuilder(3 + 12 + 1)
ret = viScanf(vi, "%t", ret_rd)
ret_val = ret_rd.ToString()
head = Left(ret_val, 3)
mdata = Val(Mid(ret_val, 4, 12))
For the VISA COM library users, use the ReadString or another method.
1- 14
Keysight E5260/E5270 Programming Guide, Edition 4
"Data Output Format" on page

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

E5270 seriesE5260aE5262aE5263aE5270b

Table of Contents