1- 14
Keysight E5260/E5270 Programming Guide, Edition 4
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.
Example
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
. The example uses the HP BASIC or Microsoft Visual Basic .NET language.
Example 1
For the HP BASIC users, use the ENTER statement.
ENTER @E5270 USING "#,3A,12D,X";Head$,Mdata
Example 2
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))
Example 3
For the VISA COM library users, use the ReadString or another method.
Содержание E5260 Series
Страница 1: ...Keysight Technologies E5260 E5270 Series of Parametric Measurement Solutions Programming Guide...
Страница 3: ...User s Guide B2900 9001x xxxx 201x Edition x...
Страница 13: ...1 Programming Basics...
Страница 63: ...2 Remote Mode Functions...
Страница 108: ...2 46 Keysight E5260 E5270 Programming Guide Edition 4 Remote Mode Functions Initial Settings...
Страница 109: ...3 Programming Examples...
Страница 185: ...4 Command Reference...
Страница 335: ...5 Error Messages...
Страница 349: ......