3000 Series Prog guideEXP
3000 Series Prog guideEXP
3000 Series Prog guideEXP
Programmer's Guide
40 Programming Examples
VISA COM Examples / 1174
VISA Examples / 1207
VISA.NET Examples / 1260
SICL Examples / 1279
SCPI.NET Examples / 1299
Example programs are ASCII text files that can be cut from the help file and pasted
into your favorite text editor.
See Also • You can find additional programming examples for the InfiniiVision
3000 X-Series oscilloscopes on the Keysight Technologies website at:
www.keysight.com/find/3000X-Series-examples
1173
40 Programming Examples
Option Explicit
'
' Main Program
' -------------------------------------------------------------------
Sub Main()
Exit Sub
VisaComError:
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End
End Sub
'
' Initialize the oscilloscope to a known state.
' -------------------------------------------------------------------
Exit Sub
VisaComError:
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End
End Sub
'
' Capture the waveform.
' -------------------------------------------------------------------
' Set trigger mode (EDGE, PULSe, PATTern, etc., and input source.
DoCommand ":TRIGger:MODE EDGE"
Debug.Print "Trigger mode: " + _
DoQueryString(":TRIGger:MODE?")
DoQueryString(":TIMebase:POSition?")
Exit Sub
VisaComError:
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End
End Sub
'
' Analyze the captured waveform.
' -------------------------------------------------------------------
DoCommand ":MEASure:FREQuency"
varQueryResult = DoQueryNumber(":MEASure:FREQuency?")
MsgBox "Frequency:" + vbCrLf + _
FormatNumber(varQueryResult / 1000, 4) + " kHz"
DoCommand ":MEASure:VAMPlitude"
varQueryResult = DoQueryNumber(":MEASure:VAMPlitude?")
MsgBox "Vertical amplitude:" + vbCrLf + _
FormatNumber(varQueryResult, 4) + " V"
' -----------------------------------------------------------------
' Get screen image.
DoCommand ":HARDcopy:INKSaver OFF"
Dim byteData() As Byte
byteData = DoQueryIEEEBlock_UI1(":DISPlay:DATA? PNG, COLor")
' Choose the format of the data returned (WORD, BYTE, ASCII):
DoCommand ":WAVeform:FORMat BYTE"
Debug.Print "Waveform format: " + _
DoQueryString(":WAVeform:FORMat?")
Preamble() = DoQueryNumbers(":WAVeform:PREamble?")
intFormat = Preamble(0)
intType = Preamble(1)
lngPoints = Preamble(2)
lngCount = Preamble(3)
dblXIncrement = Preamble(4)
dblXOrigin = Preamble(5)
lngXReference = Preamble(6)
sngYIncrement = Preamble(7)
sngYOrigin = Preamble(8)
lngYReference = Preamble(9)
If intFormat = 0 Then
Debug.Print "Waveform format: BYTE"
ElseIf intFormat = 1 Then
Debug.Print "Waveform format: WORD"
ElseIf intFormat = 4 Then
Debug.Print "Waveform format: ASCii"
End If
If intType = 0 Then
Debug.Print "Acquisition type: NORMal"
ElseIf intType = 1 Then
Debug.Print "Acquisition type: PEAK"
ElseIf intType = 2 Then
Debug.Print "Acquisition type: AVERage"
ElseIf intType = 3 Then
Debug.Print "Acquisition type: HRESolution"
End If
Next lngI
Exit Sub
VisaComError:
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
End
End Sub
myScope.WriteString command
CheckInstrumentErrors
Exit Sub
VisaComError:
MsgBox "VISA COM Error: " + vbCrLf + CStr(Err.Number) + ", " + _
Err.Source + ", " + _
Err.Description, vbExclamation, "VISA COM Error"
End
End Sub
Exit Sub
VisaComError:
MsgBox "VISA COM Error: " + vbCrLf + CStr(Err.Number) + ", " + _
Err.Source + ", " + _
Err.Description, vbExclamation, "VISA COM Error"
End
End Sub
myScope.WriteString query
DoQueryString = myScope.ReadString
CheckInstrumentErrors
Exit Function
VisaComError:
MsgBox "VISA COM Error: " + vbCrLf + CStr(Err.Number) + ", " + _
Err.Source + ", " + _
Err.Description, vbExclamation, "VISA COM Error"
End
End Function
myScope.WriteString query
DoQueryNumber = myScope.ReadNumber
CheckInstrumentErrors
Exit Function
VisaComError:
MsgBox "VISA COM Error: " + vbCrLf + CStr(Err.Number) + ", " + _
Err.Source + ", " + _
Err.Description, vbExclamation, "VISA COM Error"
End
End Function
myScope.WriteString query
DoQueryNumbers = myScope.ReadList
CheckInstrumentErrors
Exit Function
VisaComError:
MsgBox "VISA COM Error: " + vbCrLf + CStr(Err.Number) + ", " + _
Err.Source + ", " + _
Err.Description, vbExclamation, "VISA COM Error"
End
End Function
myScope.WriteString query
DoQueryIEEEBlock_UI1 = myScope.ReadIEEEBlock(BinaryType_UI1)
CheckInstrumentErrors
Exit Function
VisaComError:
MsgBox "VISA COM Error: " + vbCrLf + CStr(Err.Number) + ", " + _
Err.Source + ", " + _
Err.Description, vbExclamation, "VISA COM Error"
End
End Function
End If
Exit Sub
VisaComError:
MsgBox "VISA COM Error: " + vbCrLf + Err.Description
End Sub
For more information, see the VISA COM Help that comes with Keysight IO
Libraries Suite.
/*
* Keysight VISA COM Example in C#
* -------------------------------------------------------------------
* This program illustrates a few commonly used programming
* features of your Keysight oscilloscope.
* -------------------------------------------------------------------
*/
using System;
using System.IO;
using System.Text;
using Ivi.Visa.Interop;
using System.Runtime.InteropServices;
namespace InfiniiVision
{
class VisaComInstrumentApp
{
private static VisaComInstrument myScope;
VisaComInstrument("USB0::0x0957::0x17A6::US50210029::0::INSTR"
);
myScope.SetTimeoutSeconds(10);
// Capture data.
Capture();
/*
* Initialize the oscilloscope to a known state.
* --------------------------------------------------------------
*/
private static void Initialize()
{
string strResults;
/*
* Capture the waveform.
* --------------------------------------------------------------
*/
private static void Capture()
{
// Use auto-scale to automatically configure oscilloscope.
myScope.DoCommand(":AUToscale");
// Set trigger mode (EDGE, PULSe, PATTern, etc., and input source.
myScope.DoCommand(":TRIGger:MODE EDGE");
Console.WriteLine("Trigger mode: {0}",
myScope.DoQueryString(":TRIGger:MODE?"));
myScope.DoCommand(":TRIGger:EDGE:LEVel 1.5");
Console.WriteLine("Trigger edge level: {0}",
myScope.DoQueryString(":TRIGger:EDGE:LEVel?"));
myScope.DoCommand(":TRIGger:EDGE:SLOPe POSitive");
Console.WriteLine("Trigger edge slope: {0}",
myScope.DoQueryString(":TRIGger:EDGE:SLOPe?"));
myScope.DoCommand(":CHANnel1:OFFSet -1.5");
Console.WriteLine("Channel 1 vertical offset: {0}",
myScope.DoQueryString(":CHANnel1:OFFSet?"));
myScope.DoCommand(":TIMebase:POSition 0.0");
Console.WriteLine("Timebase position: {0}",
myScope.DoQueryString(":TIMebase:POSition?"));
myScope.DoCommand(":ACQuire:TYPE NORMal");
Console.WriteLine("Acquire type: {0}",
myScope.DoQueryString(":ACQuire:TYPE?"));
/*
* Analyze the captured waveform.
* --------------------------------------------------------------
*/
private static void Analyze()
{
byte[] ResultsArray; // Results array.
int nLength; // Number of bytes returned from instrument.
string strPath;
double fResult;
myScope.DoCommand(":MEASure:FREQuency");
fResult = myScope.DoQueryNumber(":MEASure:FREQuency?");
Console.WriteLine("Frequency: {0:F4} kHz", fResult / 1000);
myScope.DoCommand(":MEASure:VAMPlitude");
fResult = myScope.DoQueryNumber(":MEASure:VAMPlitude?");
Console.WriteLine("Vertical amplitude: {0:F2} V", fResult);
class VisaComInstrument
{
private ResourceManagerClass m_ResourceManager;
private FormattedIO488Class m_IoObject;
private string m_strVisaAddress;
// Constructor.
public VisaComInstrument(string strVisaAddress)
{
// Save VISA address in member variable.
m_strVisaAddress = strVisaAddress;
m_IoObject.WriteString(strQuery, true);
m_IoObject.WriteString(":SYSTem:ERRor?", true);
strInstrumentError = m_IoObject.ReadString();
if (!strInstrumentError.ToString().StartsWith("+0,"))
{
if (bFirstError)
{
Console.WriteLine("ERROR(s) for command '{0}': ",
strCommand);
bFirstError = false;
}
Console.Write(strInstrumentError);
}
} while (!strInstrumentError.ToString().StartsWith("+0,"));
}
try
{
Marshal.ReleaseComObject(m_IoObject);
}
catch { }
try
{
Marshal.ReleaseComObject(m_ResourceManager);
}
catch { }
}
}
}
For more information, see the VISA COM Help that comes with Keysight IO
Libraries Suite.
'
' Keysight VISA COM Example in Visual Basic .NET
' -------------------------------------------------------------------
' This program illustrates a few commonly used programming
' features of your Keysight oscilloscope.
' -------------------------------------------------------------------
Imports System
Imports System.IO
Imports System.Text
Imports Ivi.Visa.Interop
Imports System.Runtime.InteropServices
Namespace InfiniiVision
Class VisaComInstrumentApp
Private Shared myScope As VisaComInstrument
)
myScope.SetTimeoutSeconds(10)
End Sub
' Set trigger mode (EDGE, PULSe, PATTern, etc., and input source.
myScope.DoCommand(":TRIGger:MODE EDGE")
Console.WriteLine("Trigger mode: {0}", _
myScope.DoQueryString(":TRIGger:MODE?"))
myScope.DoCommand(":TRIGger:EDGE:LEVel 1.5")
Console.WriteLine("Trigger edge level: {0}", _
myScope.DoQueryString(":TRIGger:EDGE:LEVel?"))
myScope.DoCommand(":TRIGger:EDGE:SLOPe POSitive")
Console.WriteLine("Trigger edge slope: {0}", _
myScope.DoQueryString(":TRIGger:EDGE:SLOPe?"))
myScope.DoCommand(":CHANnel1:OFFSet -1.5")
Console.WriteLine("Channel 1 vertical offset: {0}", _
myScope.DoQueryString(":CHANnel1:OFFSet?"))
myScope.DoCommand(":TIMebase:POSition 0.0")
Console.WriteLine("Timebase position: {0}", _
myScope.DoQueryString(":TIMebase:POSition?"))
strPath = "c:\scope\config\setup.stp"
DataArray = File.ReadAllBytes(strPath)
nBytesWritten = DataArray.Length
End Sub
myScope.DoCommand(":MEASure:FREQuency")
fResult = myScope.DoQueryNumber(":MEASure:FREQuency?")
Console.WriteLine("Frequency: {0:F4} kHz", fResult / 1000)
myScope.DoCommand(":MEASure:VAMPlitude")
fResult = myScope.DoQueryNumber(":MEASure:VAMPlitude?")
Console.WriteLine("Vertical amplitude: {0:F2} V", fResult)
' Choose the format of the data returned (WORD, BYTE, ASCII):
myScope.DoCommand(":WAVeform:FORMat BYTE")
Console.WriteLine("Waveform format: {0}", _
myScope.DoQueryString(":WAVeform:FORMat?"))
End Sub
End Class
Class VisaComInstrument
Private m_ResourceManager As ResourceManagerClass
Private m_IoObject As FormattedIO488Class
Private m_strVisaAddress As String
' Constructor.
Public Sub New(ByVal strVisaAddress As String)
End Sub
End Sub
End Sub
Public _
Function DoQueryIEEEBlock(ByVal strQuery As String) As Byte()
' Send the query.
m_IoObject.WriteString(strQuery, True)
Try
Marshal.ReleaseComObject(m_IoObject)
Catch
End Try
Try
Marshal.ReleaseComObject(m_ResourceManager)
Catch
End Try
End Sub
End Class
End Namespace
#
# Keysight VISA COM Example in Python using "comtypes"
# *********************************************************
# This program illustrates a few commonly used programming
# features of your Keysight oscilloscope.
# *********************************************************
# =========================================================
# Initialize:
# =========================================================
def initialize():
# Get and display the device's *IDN? string.
idn_string = do_query_string("*IDN?")
print "Identification string '%s'" % idn_string
# =========================================================
# Capture:
# =========================================================
def capture():
do_command(":TRIGger:EDGE:SOURce CHANnel1")
qresult = do_query_string(":TRIGger:EDGE:SOURce?")
print "Trigger edge source: %s" % qresult
do_command(":TRIGger:EDGE:LEVel 1.5")
qresult = do_query_string(":TRIGger:EDGE:LEVel?")
print "Trigger edge level: %s" % qresult
do_command(":TRIGger:EDGE:SLOPe POSitive")
qresult = do_query_string(":TRIGger:EDGE:SLOPe?")
print "Trigger edge slope: %s" % qresult
do_command(":CHANnel1:OFFSet -1.5")
qresult = do_query_number(":CHANnel1:OFFSet?")
print "Channel 1 offset: %f" % qresult
do_command(":TIMebase:POSition 0.0")
qresult = do_query_string(":TIMebase:POSition?")
print "Timebase position: %s" % qresult
# =========================================================
# Analyze:
# =========================================================
def analyze():
# Make measurements.
# --------------------------------------------------------
do_command(":MEASure:SOURce CHANnel1")
qresult = do_query_string(":MEASure:SOURce?")
print "Measure source: %s" % qresult
do_command(":MEASure:FREQuency")
qresult = do_query_string(":MEASure:FREQuency?")
print "Measured frequency on channel 1: %s" % qresult
do_command(":MEASure:VAMPlitude")
qresult = do_query_string(":MEASure:VAMPlitude?")
print "Measured vertical amplitude on channel 1: %s" % qresult
acq_type_dict = {
0 : "NORMal",
1 : "PEAK",
2 : "AVERage",
3 : "HRESolution",
}
(
wav_form,
acq_type,
wfmpts,
avgcnt,
x_increment,
x_origin,
x_reference,
y_increment,
y_origin,
y_reference
) = do_query_numbers(":WAVeform:PREamble?")
# =========================================================
# Send a command and check for errors:
# =========================================================
def do_command(command):
myScope.WriteString("%s" % command, True)
check_instrument_errors(command)
# =========================================================
# Send a command and check for errors:
# =========================================================
def do_command_ieee_block(command, data):
myScope.WriteIEEEBlock(command, data, True)
check_instrument_errors(command)
# =========================================================
# Send a query, check for errors, return string:
# =========================================================
def do_query_string(query):
myScope.WriteString("%s" % query, True)
result = myScope.ReadString()
check_instrument_errors(query)
return result
# =========================================================
# Send a query, check for errors, return string:
# =========================================================
def do_query_ieee_block(query):
myScope.WriteString("%s" % query, True)
result = myScope.ReadIEEEBlock(VisaComLib.BinaryType_UI1, \
False, True)
check_instrument_errors(query)
return result
# =========================================================
# Send a query, check for errors, return values:
# =========================================================
def do_query_number(query):
myScope.WriteString("%s" % query, True)
result = myScope.ReadNumber(VisaComLib.ASCIIType_R8, True)
check_instrument_errors(query)
return result
# =========================================================
# Send a query, check for errors, return values:
# =========================================================
def do_query_numbers(query):
myScope.WriteString("%s" % query, True)
result = myScope.ReadList(VisaComLib.ASCIIType_R8, ",;")
check_instrument_errors(query)
return result
# =========================================================
# Check for instrument errors:
# =========================================================
def check_instrument_errors(command):
while True:
myScope.WriteString(":SYSTem:ERRor?", True)
error_string = myScope.ReadString()
if error_string: # If there is an error string value.
# =========================================================
# Main program:
# =========================================================
rm = CreateObject("VISA.GlobalRM", \
interface=VisaComLib.IResourceManager)
myScope = CreateObject("VISA.BasicFormattedIO", \
interface=VisaComLib.IFormattedIO488)
myScope.IO = \
rm.Open("TCPIP0::a-mx3104a-90028.cos.is.keysight.com::inst0::INSTR")
VISA Examples
• "VISA Example in C" on page 1207
• "VISA Example in Visual Basic" on page 1216
• "VISA Example in C#" on page 1226
• "VISA Example in Visual Basic .NET" on page 1237
• "VISA Example in Python (PyVISA 1.5 and older)" on page 1247
• "VISA Example in Python (PyVISA 1.6 and newer)" on page 1253
VISA Example in C
To compile and run this example in Microsoft Visual Studio 2008:
1 Open Visual Studio.
2 Create a new Visual C++, Win32, Win32 Console Application project.
3 In the Win32 Application Wizard, click Next >. Then, check Empty project, and
click Finish.
4 Cut-and-paste the code that follows into a file named "example.c" in the
project directory.
5 In Visual Studio 2008, right-click the Source Files folder, choose Add > Add
Existing Item..., select the example.c file, and click Add.
6 Edit the program to use the VISA address of your oscilloscope.
7 Choose Project > Properties.... In the Property Pages dialog, update these project
settings:
a Under Configuration Properties, Linker, Input, add "visa32.lib" to the
Additional Dependencies field.
b Under Configuration Properties, C/C++, Code Generation, select
Multi-threaded DLL for the Runtime Library field.
c Click OK to close the Property Pages dialog.
8 Add the include files and library files search paths:
a Choose Tools > Options....
b In the Options dialog, under Projects and Solutions, select VC++ Directories.
c Show directories for Include files, and add the include directory (for example,
Program Files (x86)\IVI Foundation\VISA\WinNT\Include).
d Show directories for Library files, and add the library files directory (for
example, Program Files (x86)\IVI Foundation\VISA\WinNT\lib\msc).
e Click OK to close the Options dialog.
9 Build and run the program.
/*
* Keysight VISA Example in C
* ------------------------------------------------------------------
* This program illustrates a few commonly-used programming
* features of your Keysight oscilloscope.
*/
/* Function prototypes */
void initialize(void); /* Initialize to known state. */
void capture(void); /* Capture the waveform. */
void analyze(void); /* Analyze the captured waveform. */
/* Global variables */
ViSession defaultRM, vi; /* Device session ID. */
ViStatus err; /* VISA function return value. */
char str_result[256] = {0}; /* Result from do_query_string(). */
double num_result; /* Result from do_query_number(). */
unsigned char ieeeblock_data[IEEEBLOCK_SPACE]; /* Result from
do_query_ieeeblock(). */
double dbl_results[10]; /* Result from do_query_numbers(). */
/* Main Program
* --------------------------------------------------------------- */
void main(void)
{
/* Open the default resource manager session. */
err = viOpenDefaultRM(&defaultRM);
if (err != VI_SUCCESS) error_handler();
/* Capture data. */
capture();
/* Set trigger mode (EDGE, PULSe, PATTern, etc., and input source. */
do_command(":TRIGger:MODE EDGE");
do_query_string(":TRIGger:MODE?");
printf("Trigger mode: %s\n", str_result);
do_command(":TRIGger:EDGE:LEVel 1.5");
do_query_string(":TRIGger:EDGE:LEVel?");
printf("Trigger edge level: %s\n", str_result);
do_command(":TRIGger:EDGE:SLOPe POSitive");
do_query_string(":TRIGger:EDGE:SLOPe?");
printf("Trigger edge slope: %s\n", str_result);
do_command(":CHANnel1:OFFSet -1.5");
do_query_string(":CHANnel1:OFFSet?");
printf("Channel 1 offset: %s\n", str_result);
do_command(":TIMebase:POSition 0.0");
do_query_string(":TIMebase:POSition?");
printf("Timebase position: %s\n", str_result);
FILE *fp;
int num_bytes; /* Number of bytes returned from instrument. */
int i;
do_command(":MEASure:FREQuency");
do_query_number(":MEASure:FREQuency?");
printf("Frequency: %.4f kHz\n", num_result / 1000);
do_command(":MEASure:VAMPlitude");
do_query_number(":MEASure:VAMPlitude?");
printf("Vertical amplitude: %.2f V\n", num_result);
wav_format = dbl_results[0];
if (wav_format == 0.0)
{
printf("Waveform format: BYTE\n");
}
else if (wav_format == 1.0)
{
printf("Waveform format: WORD\n");
}
else if (wav_format == 2.0)
{
printf("Waveform format: ASCii\n");
}
acq_type = dbl_results[1];
if (acq_type == 0.0)
{
printf("Acquire type: NORMal\n");
}
else if (acq_type == 1.0)
{
printf("Acquire type: PEAK\n");
}
else if (acq_type == 2.0)
{
printf("Acquire type: AVERage\n");
}
else if (acq_type == 3.0)
{
printf("Acquire type: HRESolution\n");
}
wav_points = dbl_results[2];
printf("Waveform points: %e\n", wav_points);
avg_count = dbl_results[3];
printf("Waveform average count: %e\n", avg_count);
x_increment = dbl_results[4];
printf("Waveform X increment: %e\n", x_increment);
x_origin = dbl_results[5];
printf("Waveform X origin: %e\n", x_origin);
x_reference = dbl_results[6];
printf("Waveform X reference: %e\n", x_reference);
y_increment = dbl_results[7];
printf("Waveform Y increment: %e\n", y_increment);
y_origin = dbl_results[8];
printf("Waveform Y origin: %e\n", y_origin);
y_reference = dbl_results[9];
printf("Waveform Y reference: %e\n", y_reference);
strcpy(message, command);
strcat(message, "\n");
err = viPrintf(vi, message);
if (err != VI_SUCCESS) error_handler();
check_instrument_errors();
}
char *command;
int num_bytes;
{
char message[80];
int data_length;
strcpy(message, command);
strcat(message, " #8%08d");
err = viPrintf(vi, message, num_bytes);
if (err != VI_SUCCESS) error_handler();
check_instrument_errors();
return(data_length);
}
strcpy(message, query);
strcat(message, "\n");
check_instrument_errors();
}
strcpy(message, query);
strcat(message, "\n");
check_instrument_errors();
}
strcpy(message, query);
strcat(message, "\n");
check_instrument_errors();
}
strcpy(message, query);
strcat(message, "\n");
err = viPrintf(vi, message);
if (err != VI_SUCCESS) error_handler();
data_length = IEEEBLOCK_SPACE;
err = viScanf(vi, "%#b\n", &data_length, ieeeblock_data);
if (err != VI_SUCCESS) error_handler();
if (data_length == IEEEBLOCK_SPACE )
{
printf("IEEE block buffer full: ");
printf("May not have received all data.\n");
}
check_instrument_errors();
return(data_length);
}
{
strcat(str_out, ", ");
strcat(str_out, str_err_val);
err = viQueryf(vi, ":SYSTem:ERRor?\n", "%t", str_err_val);
if (err != VI_SUCCESS) error_handler();
}
if (strcmp(str_out, "") != 0)
{
printf("INST Error%s\n", str_out);
err = viFlush(vi, VI_READ_BUF);
if (err != VI_SUCCESS) error_handler();
err = viFlush(vi, VI_WRITE_BUF);
if (err != VI_SUCCESS) error_handler();
}
}
'
' Keysight VISA Example in Visual Basic
' -------------------------------------------------------------------
' This program illustrates a few commonly-used programming
' features of your Keysight oscilloscope.
' -------------------------------------------------------------------
Option Explicit
' Declare fixed length string variable to hold string value returned
' by viVScanf/viVQueryf.
Public strQueryResult As String * 200
'
' Main Program
' -------------------------------------------------------------------
Sub Main()
End Sub
'
' Initialize the oscilloscope to a known state.
' -------------------------------------------------------------------
End Sub
'
' Capture the waveform.
' -------------------------------------------------------------------
' Set trigger mode (EDGE, PULSe, PATTern, etc., and input source.
DoCommand ":TRIGger:MODE EDGE"
Debug.Print "Trigger mode: " + _
DoQueryString(":TRIGger:MODE?")
End Sub
'
' Analyze the captured waveform.
' -------------------------------------------------------------------
DoCommand ":MEASure:FREQuency"
dblQueryResult = DoQueryNumber(":MEASure:FREQuency?")
MsgBox "Frequency:" + vbCrLf + _
FormatNumber(dblQueryResult / 1000, 4) + " kHz"
DoCommand ":MEASure:VAMPlitude"
dblQueryResult = DoQueryNumber(":MEASure:VAMPlitude?")
MsgBox "Vertical amplitude:" + vbCrLf + _
FormatNumber(dblQueryResult, 4) + " V"
' Choose the format of the data returned (WORD, BYTE, ASCII):
DoCommand ":WAVeform:FORMat BYTE"
Debug.Print "Waveform format: " + _
DoQueryString(":WAVeform:FORMat?")
intFormat = dblArray(0)
intType = dblArray(1)
lngPoints = dblArray(2)
lngCount = dblArray(3)
dblXIncrement = dblArray(4)
dblXOrigin = dblArray(5)
lngXReference = dblArray(6)
sngYIncrement = dblArray(7)
lngYOrigin = dblArray(8)
lngYReference = dblArray(9)
If intFormat = 0 Then
Debug.Print "Waveform format: BYTE"
ElseIf intFormat = 1 Then
Debug.Print "Waveform format: WORD"
ElseIf intFormat = 2 Then
Debug.Print "Waveform format: ASCii"
End If
If intType = 0 Then
Debug.Print "Acquisition type: NORMal"
ElseIf intType = 1 Then
Debug.Print "Acquisition type: PEAK"
ElseIf intType = 2 Then
Debug.Print "Acquisition type: AVERage"
ElseIf intType = 3 Then
Debug.Print "Acquisition type: HRESolution"
End If
FormatNumber(((lngDataValue - lngYReference) _
* sngYIncrement) + lngYOrigin)
Next lngI
End Sub
CheckInstrumentErrors
End Sub
retCount = lngBlockSize
DoCommandIEEEBlock = retCount
CheckInstrumentErrors
End Function
DoQueryString = strResult
CheckInstrumentErrors
End Function
DoQueryNumber = dblResult
CheckInstrumentErrors
End Function
CheckInstrumentErrors
End Function
CheckInstrumentErrors
End Function
Wend
End If
Exit Sub
ErrorHandler:
End Sub
End Sub
VISA Example in C#
To compile and run this example in Microsoft Visual Studio 2008:
1 Open Visual Studio.
2 Create a new Visual C#, Windows, Console Application project.
3 Cut-and-paste the code that follows into the C# source file.
4 Edit the program to use the VISA address of your oscilloscope.
5 Add Keysight's VISA header file to your project:
a Right-click the project you wish to modify (not the solution) in the Solution
Explorer window of the Microsoft Visual Studio environment.
b Click Add and then click Add Existing Item...
c Navigate to the header file, visa32.cs (installed with Keysight IO Libraries
Suite and found in the Program Files (x86)\IVI Foundation\VISA\WinNT\
Include directory), select it, but do not click the Open button.
d Click the down arrow to the right of the Add button, and choose Add as Link.
You should now see the file underneath your project in the Solution Explorer.
It will have a little arrow icon in its lower left corner, indicating that it is a
link.
6 Build and run the program.
For more information, see the tutorial on using VISA in Microsoft .NET in the VISA
Help that comes with Keysight IO Libraries Suite.
/*
* Keysight VISA Example in C#
* -------------------------------------------------------------------
* This program illustrates a few commonly used programming
* features of your Keysight oscilloscope.
* -------------------------------------------------------------------
*/
using System;
using System.IO;
using System.Text;
namespace InfiniiVision
{
class VisaInstrumentApp
{
private static VisaInstrument myScope;
// Capture data.
Capture();
}
catch (System.ApplicationException err)
{
Console.WriteLine("*** VISA Error Message : " + err.Message);
}
catch (System.SystemException err)
{
Console.WriteLine("*** System Error Message : " + err.Message);
}
catch (System.Exception err)
{
System.Diagnostics.Debug.Fail("Unexpected Error");
Console.WriteLine("*** Unexpected Error : " + err.Message);
}
finally
{
myScope.Close();
}
}
/*
* Initialize the oscilloscope to a known state.
* --------------------------------------------------------------
*/
private static void Initialize()
{
StringBuilder strResults;
myScope.DoCommand("*CLS");
myScope.DoCommand("*RST");
}
/*
* Capture the waveform.
* --------------------------------------------------------------
*/
private static void Capture()
{
// Use auto-scale to automatically configure oscilloscope.
myScope.DoCommand(":AUToscale");
// Set trigger mode (EDGE, PULSe, PATTern, etc., and input source.
myScope.DoCommand(":TRIGger:MODE EDGE");
Console.WriteLine("Trigger mode: {0}",
myScope.DoQueryString(":TRIGger:MODE?"));
myScope.DoCommand(":TRIGger:EDGE:LEVel 1.5");
Console.WriteLine("Trigger edge level: {0}",
myScope.DoQueryString(":TRIGger:EDGE:LEVel?"));
myScope.DoCommand(":TRIGger:EDGE:SLOPe POSitive");
Console.WriteLine("Trigger edge slope: {0}",
myScope.DoQueryString(":TRIGger:EDGE:SLOPe?"));
myScope.DoCommand(":CHANnel1:OFFSet -1.5");
Console.WriteLine("Channel 1 vertical offset: {0}",
myScope.DoQueryString(":CHANnel1:OFFSet?"));
myScope.DoCommand(":TIMebase:POSition 0.0");
Console.WriteLine("Timebase position: {0}",
myScope.DoQueryString(":TIMebase:POSition?"));
/*
* Analyze the captured waveform.
* --------------------------------------------------------------
*/
private static void Analyze()
{
byte[] ResultsArray; // Results array.
int nLength; // Number of bytes returned from instrument.
string strPath;
double fResult;
myScope.DoCommand(":MEASure:FREQuency");
fResult = myScope.DoQueryNumber(":MEASure:FREQuency?");
Console.WriteLine("Frequency: {0:F4} kHz", fResult / 1000);
myScope.DoCommand(":MEASure:VAMPlitude");
fResult = myScope.DoQueryNumber(":MEASure:VAMPlitude?");
Console.WriteLine("Vertical amplitude: {0:F2} V", fResult);
writer.WriteLine("{0:f9}, {1:f6}",
fXorigin + ((float)i * fXincrement),
(((float)ResultsArray[i] - fYreference) *
fYincrement) + fYorigin);
class VisaInstrument
{
private int m_nResourceManager;
private int m_nSession;
private string m_strVisaAddress;
// Constructor.
public VisaInstrument(string strVisaAddress)
{
// Save VISA address in member variable.
m_strVisaAddress = strVisaAddress;
nLength = DataArray.Length;
strCommandAndLength = String.Format("{0} #8%08d",
strCommand);
nLength);
CheckVisaStatus(nViStatus);
return nBytesWritten;
}
return strResults;
}
return fResults;
}
{
double[] fResultsArray;
fResultsArray = new double[10];
return fResultsArray;
}
return length;
}
if (!strInstrumentError.ToString().StartsWith("+0,"))
{
if (bFirstError)
{
Console.WriteLine("ERROR(s) for command '{0}': ",
strCommand);
bFirstError = false;
}
Console.Write(strInstrumentError);
}
} while (!strInstrumentError.ToString().StartsWith("+0,"));
}
You should now see the file underneath your project in the Solution Explorer.
It will have a little arrow icon in its lower left corner, indicating that it is a
link.
e Right-click the project again and choose Properties; then, select
"InfiniiVision.VisaInstrumentApp" as the Startup object.
6 Build and run the program.
For more information, see the tutorial on using VISA in Microsoft .NET in the VISA
Help that comes with Keysight IO Libraries Suite.
'
' Keysight VISA Example in Visual Basic .NET
' -------------------------------------------------------------------
' This program illustrates a few commonly-used programming
' features of your Keysight oscilloscope.
' -------------------------------------------------------------------
Imports System
Imports System.IO
Imports System.Text
Namespace InfiniiVision
Class VisaInstrumentApp
Private Shared myScope As VisaInstrument
'
' Initialize the oscilloscope to a known state.
' --------------------------------------------------------------
End Sub
'
' Capture the waveform.
' --------------------------------------------------------------
' Set trigger mode (EDGE, PULSe, PATTern, etc., and input source.
myScope.DoCommand(":TRIGger:MODE EDGE")
Console.WriteLine("Trigger mode: {0}", _
myScope.DoQueryString(":TRIGger:MODE?"))
myScope.DoCommand(":TRIGger:EDGE:LEVel 1.5")
Console.WriteLine("Trigger edge level: {0}", _
myScope.DoQueryString(":TRIGger:EDGE:LEVel?"))
myScope.DoCommand(":TRIGger:EDGE:SLOPe POSitive")
Console.WriteLine("Trigger edge slope: {0}", _
myScope.DoQueryString(":TRIGger:EDGE:SLOPe?"))
myScope.DoCommand(":CHANnel1:OFFSet -1.5")
Console.WriteLine("Channel 1 vertical offset: {0}", _
myScope.DoQueryString(":CHANnel1:OFFSet?"))
myScope.DoCommand(":TIMebase:POSition 0.0")
Console.WriteLine("Timebase position: {0}", _
myScope.DoQueryString(":TIMebase:POSition?"))
End Sub
'
' Analyze the captured waveform.
' --------------------------------------------------------------
myScope.DoCommand(":MEASure:FREQuency")
fResult = myScope.DoQueryNumber(":MEASure:FREQuency?")
Console.WriteLine("Frequency: {0:F4} kHz", fResult / 1000)
myScope.DoCommand(":MEASure:VAMPlitude")
fResult = myScope.DoQueryNumber(":MEASure:VAMPlitude?")
Console.WriteLine("Vertical amplitude: {0:F2} V", fResult)
' Choose the format of the data returned (WORD, BYTE, ASCII):
myScope.DoCommand(":WAVeform:FORMat BYTE")
Console.WriteLine("Waveform format: {0}", _
myScope.DoQueryString(":WAVeform:FORMat?"))
End Sub
End Class
Class VisaInstrument
Private m_nResourceManager As Integer
Private m_nSession As Integer
Private m_strVisaAddress As String
' Constructor.
Public Sub New(ByVal strVisaAddress As String)
' Save VISA address in member variable.
m_strVisaAddress = strVisaAddress
End Sub
nLength = DataArray.Length
strCommandAndLength = [String].Format("{0} #8{1:D8}", _
strCommand, nLength)
Return nBytesWritten
End Function
Return strResults
End Function
Return fResults
End Function
Return fResultsArray
End Function
' Write and read buffers need to be flushed after IEEE block?
nViStatus = visa32.viFlush(m_nSession, visa32.VI_WRITE_BUF)
CheckVisaStatus(nViStatus)
Return length
End Function
End If
End Sub
# *********************************************************
# This program illustrates a few commonly-used programming
# features of your Keysight oscilloscope.
# *********************************************************
# Import modules.
# ---------------------------------------------------------
import visa
import string
import struct
import sys
# =========================================================
# Initialize:
# =========================================================
def initialize():
idn_string = do_query_string("*IDN?")
print "Identification string: '%s'" % idn_string
# =========================================================
# Capture:
# =========================================================
def capture():
do_command(":TRIGger:EDGE:LEVel 1.5")
qresult = do_query_string(":TRIGger:EDGE:LEVel?")
print "Trigger edge level: %s" % qresult
do_command(":TRIGger:EDGE:SLOPe POSitive")
qresult = do_query_string(":TRIGger:EDGE:SLOPe?")
print "Trigger edge slope: %s" % qresult
f = open("setup.stp", "wb")
f.write(sSetup)
f.close()
print "Setup bytes saved: %d" % len(sSetup)
do_command(":CHANnel1:OFFSet -1.5")
qresult = do_query_values(":CHANnel1:OFFSet?")[0]
print "Channel 1 offset: %f" % qresult
qresult = do_query_string(":TIMebase:SCALe?")
print "Timebase scale: %s" % qresult
do_command(":TIMebase:POSition 0.0")
qresult = do_query_string(":TIMebase:POSition?")
print "Timebase position: %s" % qresult
# =========================================================
# Analyze:
# =========================================================
def analyze():
# Make measurements.
# --------------------------------------------------------
do_command(":MEASure:SOURce CHANnel1")
qresult = do_query_string(":MEASure:SOURce?")
print "Measure source: %s" % qresult
do_command(":MEASure:FREQuency")
qresult = do_query_string(":MEASure:FREQuency?")
print "Measured frequency on channel 1: %s" % qresult
do_command(":MEASure:VAMPlitude")
qresult = do_query_string(":MEASure:VAMPlitude?")
print "Measured vertical amplitude on channel 1: %s" % qresult
preamble_string = do_query_string(":WAVeform:PREamble?")
(
wav_form, acq_type, wfmpts, avgcnt, x_increment, x_origin,
x_reference, y_increment, y_origin, y_reference
) = string.split(preamble_string, ",")
y_reference = do_query_values(":WAVeform:YREFerence?")[0]
f.close()
print "Waveform format BYTE data written to waveform_data.csv."
# =========================================================
# Send a command and check for errors:
# =========================================================
def do_command(command, hide_params=False):
if hide_params:
(header, data) = string.split(command, " ", 1)
if debug:
print "\nCmd = '%s'" % header
else:
if debug:
print "\nCmd = '%s'" % command
InfiniiVision.write("%s\n" % command)
if hide_params:
check_instrument_errors(header)
else:
check_instrument_errors(command)
# =========================================================
# Send a query, check for errors, return string:
# =========================================================
def do_query_string(query):
if debug:
print "Qys = '%s'" % query
result = InfiniiVision.ask("%s\n" % query)
check_instrument_errors(query)
return result
# =========================================================
# Send a query, check for errors, return values:
# =========================================================
def do_query_values(query):
if debug:
print "Qyv = '%s'" % query
results = InfiniiVision.ask_for_values("%s\n" % query)
check_instrument_errors(query)
return results
# =========================================================
# Check for instrument errors:
# =========================================================
def check_instrument_errors(command):
while True:
error_string = InfiniiVision.ask(":SYSTem:ERRor?\n")
if error_string: # If there is an error string value.
# =========================================================
# Returns data from definite-length block.
# =========================================================
def get_definite_length_block_data(sBlock):
return sData
# =========================================================
# Main program:
# =========================================================
InfiniiVision = visa.instrument("TCPIP0::130.29.70.139::inst0::INSTR")
InfiniiVision.timeout = 15
InfiniiVision.term_chars = ""
InfiniiVision.clear()
# *********************************************************
# This program illustrates a few commonly-used programming
# features of your Keysight oscilloscope.
# *********************************************************
# Import modules.
# ---------------------------------------------------------
import visa
import string
import struct
import sys
# =========================================================
# Initialize:
# =========================================================
def initialize():
idn_string = do_query_string("*IDN?")
print "Identification string: '%s'" % idn_string
# =========================================================
# Capture:
# =========================================================
def capture():
do_command(":TRIGger:EDGE:LEVel 1.5")
qresult = do_query_string(":TRIGger:EDGE:LEVel?")
print "Trigger edge level: %s" % qresult
do_command(":TRIGger:EDGE:SLOPe POSitive")
qresult = do_query_string(":TRIGger:EDGE:SLOPe?")
print "Trigger edge slope: %s" % qresult
f = open("setup.stp", "wb")
f.write(sSetup)
f.close()
print "Setup bytes saved: %d" % len(sSetup)
do_command(":CHANnel1:OFFSet -1.5")
qresult = do_query_string(":CHANnel1:OFFSet?")
print "Channel 1 offset: %s" % qresult
do_command(":TIMebase:POSition 0.0")
qresult = do_query_string(":TIMebase:POSition?")
print "Timebase position: %s" % qresult
# =========================================================
# Analyze:
# =========================================================
def analyze():
# Make measurements.
# --------------------------------------------------------
do_command(":MEASure:SOURce CHANnel1")
qresult = do_query_string(":MEASure:SOURce?")
print "Measure source: %s" % qresult
do_command(":MEASure:FREQuency")
qresult = do_query_string(":MEASure:FREQuency?")
print "Measured frequency on channel 1: %s" % qresult
do_command(":MEASure:VAMPlitude")
qresult = do_query_string(":MEASure:VAMPlitude?")
print "Measured vertical amplitude on channel 1: %s" % qresult
preamble_string = do_query_string(":WAVeform:PREamble?")
(
wav_form, acq_type, wfmpts, avgcnt, x_increment, x_origin,
x_reference, y_increment, y_origin, y_reference
) = string.split(preamble_string, ",")
sData = do_query_ieee_block(":WAVeform:DATA?")
f.close()
print "Waveform format BYTE data written to waveform_data.csv."
# =========================================================
# Send a command and check for errors:
# =========================================================
def do_command(command, hide_params=False):
if hide_params:
(header, data) = string.split(command, " ", 1)
if debug:
print "\nCmd = '%s'" % header
else:
if debug:
print "\nCmd = '%s'" % command
InfiniiVision.write("%s" % command)
if hide_params:
check_instrument_errors(header)
else:
check_instrument_errors(command)
# =========================================================
# Send a command and binary values and check for errors:
# =========================================================
def do_command_ieee_block(command, values):
if debug:
print "Cmb = '%s'" % command
InfiniiVision.write_binary_values("%s " % command, values, datatype='c'
)
check_instrument_errors(command)
# =========================================================
# Send a query, check for errors, return string:
# =========================================================
def do_query_string(query):
if debug:
print "Qys = '%s'" % query
result = InfiniiVision.query("%s" % query)
check_instrument_errors(query)
return result
# =========================================================
# Send a query, check for errors, return floating-point value:
# =========================================================
def do_query_number(query):
if debug:
print "Qyn = '%s'" % query
results = InfiniiVision.query("%s" % query)
check_instrument_errors(query)
return float(results)
# =========================================================
# Send a query, check for errors, return binary values:
# =========================================================
def do_query_ieee_block(query):
if debug:
print "Qys = '%s'" % query
result = InfiniiVision.query_binary_values("%s" % query, datatype='s')
check_instrument_errors(query)
return result[0]
# =========================================================
# Check for instrument errors:
# =========================================================
def check_instrument_errors(command):
while True:
error_string = InfiniiVision.query(":SYSTem:ERRor?")
if error_string: # If there is an error string value.
# =========================================================
# Main program:
# =========================================================
rm = visa.ResourceManager()
InfiniiVision= rm.open_resource("TCPIP0::130.29.70.139::inst0::INSTR")
InfiniiVision.timeout = 15000
InfiniiVision.clear()
VISA.NET Examples
These programming examples show how to use the VISA.NET drivers that come
with Keysight IO Libraries Suite.
• "VISA.NET Example in C#" on page 1260
• "VISA.NET Example in Visual Basic .NET" on page 1266
• "VISA.NET Example in IronPython" on page 1273
VISA.NET Example in C#
To compile and run this example in Microsoft Visual Studio 2013:
1 Open Visual Studio.
2 Choose FILE > New > Project....
3 In the New Project dialog box, select .NET Framework 4.5.2.
4 Create a new Visual C#, Console Application project.
5 Cut-and-paste the code that follows into the C# source file.
6 Edit the program to use the VISA address of your oscilloscope.
7 Add a reference to the VISA.NET driver:
a Right-click the project you wish to modify (not the solution) in the Solution
Explorer window of the Microsoft Visual Studio environment.
b Choose Add Reference....
c In the Reference Manager dialog box, under Assemblies, select Extensions.
d In the "Targeting: .NET Framework 4.5.2" list, select the Ivi.Visa Assembly
check box; then, click OK.
8 Build and run the program.
For more information, see the VISA.NET Help that comes with Keysight IO
Libraries Suite.
/*
* Keysight VISA.NET Example in C#
* -------------------------------------------------------------------
* This program illustrates a few commonly used programming
* features of your Keysight InfiniiVision oscilloscope.
* -------------------------------------------------------------------
*/
using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
using Ivi.Visa;
using Ivi.Visa.FormattedIO;
namespace Example
{
class Program
{
session.TimeoutMilliseconds = 20000;
// Capture data.
// ==============================================================
// Set trigger mode (EDGE, PULSe, PATTern, etc., and input source.
myScope.WriteLine(":TRIGger:MODE EDGE");
myScope.WriteLine(":TRIGger:MODE?");
strResults = myScope.ReadLine();
Console.WriteLine("Trigger mode: {0}", strResults);
myScope.WriteLine(":TRIGger:EDGE:LEVel 1.5");
myScope.WriteLine(":TRIGger:EDGE:LEVel?");
strResults = myScope.ReadLine();
Console.WriteLine("Trigger edge level: {0}", strResults);
myScope.WriteLine(":TRIGger:EDGE:SLOPe POSitive");
myScope.WriteLine(":TRIGger:EDGE:SLOPe?");
strResults = myScope.ReadLine();
Console.WriteLine("Trigger edge slope: {0}", strResults);
myScope.WriteLine(":CHANnel1:OFFSet -1.5");
myScope.WriteLine(":CHANnel1:OFFSet?");
strResults = myScope.ReadLine();
Console.WriteLine("Channel 1 vertical offset: {0}", strResults);
myScope.WriteLine(":TIMebase:SCALe?");
strResults = myScope.ReadLine();
Console.WriteLine("Timebase scale: {0}", strResults);
myScope.WriteLine(":TIMebase:POSition 0.0");
myScope.WriteLine(":TIMebase:POSition?");
strResults = myScope.ReadLine();
Console.WriteLine("Timebase position: {0}", strResults);
double fResult;
myScope.WriteLine(":MEASure:FREQuency");
myScope.WriteLine(":MEASure:FREQuency?");
fResult = myScope.ReadLineDouble();
Console.WriteLine("Frequency: {0:F4} kHz", fResult / 1000);
myScope.WriteLine(":MEASure:VAMPlitude");
myScope.WriteLine(":MEASure:VAMPlitude?");
fResult = myScope.ReadLineDouble();
Console.WriteLine("Vertical amplitude: {0:F2} V", fResult);
myScope.WriteLine(":HARDcopy:INKSaver OFF");
}
}
}
For more information, see the VISA.NET driver help that comes with Keysight
Command Expert.
'
' Keysight VISA.NET Example in VB.NET
' -------------------------------------------------------------------
' This program illustrates a few commonly used programming
' features of your Keysight InfiniiVision oscilloscope.
' -------------------------------------------------------------------
Imports System
Imports System.IO
Imports System.Collections.Generic
Imports System.Text
Imports Ivi.Visa
Imports Ivi.Visa.FormattedIO
Namespace Example
Class Program
' Create a formatted I/O object which will help us format the
' data we want to send/receive to/from the instrument
Dim myScope As New MessageBasedFormattedIO(session)
' For Serial and TCP/IP socket connections enable the read
' Termination Character, or read's will timeout
If session.ResourceName.Contains("ASRL") OrElse _
session.ResourceName.Contains("SOCKET") Then
session.TerminationCharacterEnabled = True
End If
session.TimeoutMilliseconds = 20000
' Set trigger mode (EDGE, PULSe, PATTern, etc., and input source.
myScope.WriteLine(":TRIGger:MODE EDGE")
myScope.WriteLine(":TRIGger:MODE?")
strResults = myScope.ReadLine()
Console.WriteLine("Trigger mode: {0}", strResults)
myScope.WriteLine(":TRIGger:EDGE:LEVel 1.5")
myScope.WriteLine(":TRIGger:EDGE:LEVel?")
strResults = myScope.ReadLine()
Console.WriteLine("Trigger edge level: {0}", strResults)
myScope.WriteLine(":TRIGger:EDGE:SLOPe POSitive")
myScope.WriteLine(":TRIGger:EDGE:SLOPe?")
strResults = myScope.ReadLine()
Console.WriteLine("Trigger edge slope: {0}", strResults)
myScope.WriteLine(":CHANnel1:OFFSet -1.5")
myScope.WriteLine(":CHANnel1:OFFSet?")
strResults = myScope.ReadLine()
Console.WriteLine("Channel 1 vertical offset: {0}", strResults)
myScope.WriteLine(":TIMebase:POSition 0.0")
myScope.WriteLine(":TIMebase:POSition?")
strResults = myScope.ReadLine()
Console.WriteLine("Timebase position: {0}", strResults)
myScope.WriteLine(":MEASure:VAMPlitude")
myScope.WriteLine(":MEASure:VAMPlitude?")
fResult = myScope.ReadLineDouble()
Console.WriteLine("Vertical amplitude: {0:F2} V", fResult)
' Choose the format of the data returned (WORD, BYTE, ASCII):
myScope.WriteLine(":WAVeform:FORMat BYTE")
myScope.WriteLine(":WAVeform:FORMat?")
strResults = myScope.ReadLine()
Console.WriteLine("Waveform format: {0}", strResults)
End Sub
End Class
End Namespace
#
# Keysight VISA.NET Example in IronPython
# *********************************************************
# This program illustrates a few commonly used programming
# features of your Keysight InfiniiVision oscilloscope.
# *********************************************************
# =========================================================
# Initialize:
# =========================================================
def initialize():
# =========================================================
# Capture:
# =========================================================
def capture():
myScope.WriteLine(":TRIGger:EDGE:LEVel 1.5")
myScope.WriteLine(":TRIGger:EDGE:LEVel?")
qresult = myScope.ReadLine()
print "Trigger edge level: %s" % qresult
myScope.WriteLine(":TRIGger:EDGE:SLOPe POSitive")
myScope.WriteLine(":TRIGger:EDGE:SLOPe?")
qresult = myScope.ReadLine()
print "Trigger edge slope: %s" % qresult
myScope.WriteLine(":CHANnel1:OFFSet -1.5")
myScope.WriteLine(":CHANnel1:OFFSet?")
qresult = myScope.ReadLine()
print "Channel 1 offset: %s" % qresult
myScope.WriteLine(":TIMebase:POSition 0.0")
myScope.WriteLine(":TIMebase:POSition?")
qresult = myScope.ReadLine()
print "Timebase position: %s" % qresult
# =========================================================
# Analyze:
# =========================================================
def analyze():
# Make measurements.
# --------------------------------------------------------
myScope.WriteLine(":MEASure:SOURce CHANnel1")
myScope.WriteLine(":MEASure:SOURce?")
qresult = myScope.ReadLine()
print "Measure source: %s" % qresult
myScope.WriteLine(":MEASure:FREQuency")
myScope.WriteLine(":MEASure:FREQuency?")
qresult = myScope.ReadLineDouble()
print "Measured frequency on channel 1: %f" % qresult
myScope.WriteLine(":MEASure:VAMPlitude")
myScope.WriteLine(":MEASure:VAMPlitude?")
qresult = myScope.ReadLineDouble()
print "Measured vertical amplitude on channel 1: %f" % qresult
nLength = len(image_bytes)
fStream = File.Open("screen_image.png", FileMode.Create)
fStream.Write(image_bytes, 0, nLength)
fStream.Close()
print "Screen image written to screen_image.png."
myScope.WriteLine(":WAVeform:PREamble?")
(
wav_form, acq_type, wfmpts, avgcnt, x_increment, x_origin,
x_reference, y_increment, y_origin, y_reference
) = string.split(myScope.ReadLine(), ",")
# =========================================================
# Main program:
# =========================================================
addr = "TCPIP0::141.121.230.6::inst0::INSTR"
session = GlobalResourceManager.Open(addr)
session.TimeoutMilliseconds = 20000
myScope = MessageBasedFormattedIO(session)
SICL Examples
• "SICL Example in C" on page 1279
• "SICL Example in Visual Basic" on page 1288
SICL Example in C
To compile and run this example in Microsoft Visual Studio 2008:
1 Open Visual Studio.
2 Create a new Visual C++, Win32, Win32 Console Application project.
3 In the Win32 Application Wizard, click Next >. Then, check Empty project, and
click Finish.
4 Cut-and-paste the code that follows into a file named "example.c" in the
project directory.
5 In Visual Studio 2008, right-click the Source Files folder, choose Add > Add
Existing Item..., select the example.c file, and click Add.
6 Edit the program to use the SICL address of your oscilloscope.
7 Choose Project > Properties.... In the Property Pages dialog, update these project
settings:
a Under Configuration Properties, Linker, Input, add "sicl32.lib" to the
Additional Dependencies field.
b Under Configuration Properties, C/C++, Code Generation, select
Multi-threaded DLL for the Runtime Library field.
c Click OK to close the Property Pages dialog.
8 Add the include files and library files search paths:
a Choose Tools > Options....
b In the Options dialog, select VC++ Directories under Projects and Solutions.
c Show directories for Include files, and add the include directory (for example,
Program Files\Agilent\IO Libraries Suite\include).
d Show directories for Library files, and add the library files directory (for
example, Program Files\Agilent\IO Libraries Suite\lib).
e Click OK to close the Options dialog.
9 Build and run the program.
/*
* Keysight SICL Example in C
* ------------------------------------------------------------------
* This program illustrates a few commonly-used programming
* features of your Keysight oscilloscope.
*/
/* Function prototypes */
void initialize(void); /* Initialize to known state. */
void capture(void); /* Capture the waveform. */
void analyze(void); /* Analyze the captured waveform. */
/* Global variables */
INST id; /* Device session ID. */
char str_result[256] = {0}; /* Result from do_query_string(). */
double num_result; /* Result from do_query_number(). */
unsigned char ieeeblock_data[IEEEBLOCK_SPACE]; /* Result from
do_query_ieeeblock(). */
double dbl_results[10]; /* Result from do_query_numbers(). */
/* Main Program
* --------------------------------------------------------------- */
void main(void)
{
/* Install a default SICL error handler that logs an error message
* and exits. On Windows 98SE or Windows Me, view messages with
* the SICL Message Viewer. For Windows 2000 or XP, use the Event
* Viewer.
*/
ionerror(I_ERROR_EXIT);
if (id == 0)
{
printf ("Oscilloscope iopen failed!\n");
}
else
{
printf ("Oscilloscope session opened!\n");
}
/* Capture data. */
capture();
/* Set trigger mode (EDGE, PULSe, PATTern, etc., and input source. */
do_command(":TRIGger:MODE EDGE");
do_query_string(":TRIGger:MODE?");
printf("Trigger mode: %s\n", str_result);
do_command(":TRIGger:EDGE:LEVel 1.5");
do_query_string(":TRIGger:EDGE:LEVel?");
do_command(":TRIGger:EDGE:SLOPe POSitive");
do_query_string(":TRIGger:EDGE:SLOPe?");
printf("Trigger edge slope: %s\n", str_result);
do_command(":CHANnel1:OFFSet -1.5");
do_query_string(":CHANnel1:OFFSet?");
printf("Channel 1 offset: %s\n", str_result);
do_command(":TIMebase:POSition 0.0");
do_query_string(":TIMebase:POSition?");
printf("Timebase position: %s\n", str_result);
printf("c:\\scope\\config\\setup.stp.\n");
FILE *fp;
int num_bytes; /* Number of bytes returned from instrument. */
int i;
do_command(":MEASure:FREQuency");
do_query_number(":MEASure:FREQuency?");
printf("Frequency: %.4f kHz\n", num_result / 1000);
do_command(":MEASure:VAMPlitude");
do_query_number(":MEASure:VAMPlitude?");
printf("Vertical amplitude: %.2f V\n", num_result);
wav_format = dbl_results[0];
if (wav_format == 0.0)
{
printf("Waveform format: BYTE\n");
}
else if (wav_format == 1.0)
{
printf("Waveform format: WORD\n");
}
else if (wav_format == 2.0)
{
printf("Waveform format: ASCii\n");
}
acq_type = dbl_results[1];
if (acq_type == 0.0)
{
printf("Acquire type: NORMal\n");
}
else if (acq_type == 1.0)
{
printf("Acquire type: PEAK\n");
}
else if (acq_type == 2.0)
{
printf("Acquire type: AVERage\n");
}
else if (acq_type == 3.0)
{
printf("Acquire type: HRESolution\n");
}
wav_points = dbl_results[2];
printf("Waveform points: %e\n", wav_points);
avg_count = dbl_results[3];
printf("Waveform average count: %e\n", avg_count);
x_increment = dbl_results[4];
printf("Waveform X increment: %e\n", x_increment);
x_origin = dbl_results[5];
printf("Waveform X origin: %e\n", x_origin);
x_reference = dbl_results[6];
printf("Waveform X reference: %e\n", x_reference);
y_increment = dbl_results[7];
printf("Waveform Y increment: %e\n", y_increment);
y_origin = dbl_results[8];
printf("Waveform Y origin: %e\n", y_origin);
y_reference = dbl_results[9];
printf("Waveform Y reference: %e\n", y_reference);
strcpy(message, command);
strcat(message, "\n");
iprintf(id, message);
check_instrument_errors();
}
strcpy(message, command);
strcat(message, " #8%08d");
iprintf(id, message, num_bytes);
ifwrite(id, ieeeblock_data, num_bytes, 1, &data_length);
check_instrument_errors();
return(data_length);
}
strcpy(message, query);
strcat(message, "\n");
iprintf(id, message);
check_instrument_errors();
}
strcpy(message, query);
strcat(message, "\n");
iprintf(id, message);
check_instrument_errors();
strcpy(message, query);
strcat(message, "\n");
iprintf(id, message);
check_instrument_errors();
}
strcpy(message, query);
strcat(message, "\n");
iprintf(id, message);
data_length = IEEEBLOCK_SPACE;
iscanf(id, "%#b", &data_length, ieeeblock_data);
if (data_length == IEEEBLOCK_SPACE )
{
printf("IEEE block buffer full: ");
printf("May not have received all data.\n");
}
check_instrument_errors();
return(data_length);
}
if (strcmp(str_out, "") != 0)
{
printf("INST Error%s\n", str_out);
iflush(id, I_BUF_READ | I_BUF_WRITE);
}
}
Option Explicit
' Declare fixed length string variable to hold string value returned
' by ivscanf.
Public strQueryResult As String * 200
'
' Main Program
' -------------------------------------------------------------------
Sub Main()
Exit Sub
ErrorHandler:
End Sub
'
' Initialize the oscilloscope to a known state.
' -------------------------------------------------------------------
Exit Sub
ErrorHandler:
End Sub
'
' Capture the waveform.
' -------------------------------------------------------------------
' Set trigger mode (EDGE, PULSe, PATTern, etc., and input source.
DoCommand ":TRIGger:MODE EDGE"
Debug.Print "Trigger mode: " + _
DoQueryString(":TRIGger:MODE?")
Exit Sub
ErrorHandler:
End Sub
'
' Analyze the captured waveform.
' -------------------------------------------------------------------
DoCommand ":MEASure:FREQuency"
dblQueryResult = DoQueryNumber(":MEASure:FREQuency?")
MsgBox "Frequency:" + vbCrLf + _
FormatNumber(dblQueryResult / 1000, 4) + " kHz"
DoCommand ":MEASure:VAMPlitude"
dblQueryResult = DoQueryNumber(":MEASure:VAMPlitude?")
MsgBox "Vertical amplitude:" + vbCrLf + _
FormatNumber(dblQueryResult, 4) + " V"
' Choose the format of the data returned (WORD, BYTE, ASCII):
DoCommand ":WAVeform:FORMat BYTE"
Debug.Print "Waveform format: " + _
DoQueryString(":WAVeform:FORMat?")
Preamble() = DoQueryNumbers(":WAVeform:PREamble?")
intFormat = Preamble(0)
intType = Preamble(1)
lngPoints = Preamble(2)
lngCount = Preamble(3)
dblXIncrement = Preamble(4)
dblXOrigin = Preamble(5)
lngXReference = Preamble(6)
sngYIncrement = Preamble(7)
sngYOrigin = Preamble(8)
lngYReference = Preamble(9)
If intFormat = 0 Then
Debug.Print "Waveform format: BYTE"
ElseIf intFormat = 1 Then
Debug.Print "Waveform format: WORD"
ElseIf intFormat = 2 Then
Debug.Print "Waveform format: ASCii"
End If
If intType = 0 Then
Debug.Print "Acquisition type: NORMal"
ElseIf intType = 1 Then
Debug.Print "Acquisition type: PEAK"
ElseIf intType = 2 Then
Debug.Print "Acquisition type: AVERage"
ElseIf intType = 3 Then
Debug.Print "Acquisition type: HRESolution"
End If
Next lngI
Exit Sub
ErrorHandler:
End Sub
CheckInstrumentErrors
Exit Sub
ErrorHandler:
End Sub
CheckInstrumentErrors
Exit Function
ErrorHandler:
End Function
CheckInstrumentErrors
Exit Function
ErrorHandler:
End Function
CheckInstrumentErrors
Exit Function
ErrorHandler:
End Function
CheckInstrumentErrors
Exit Function
ErrorHandler:
End Function
CheckInstrumentErrors
Exit Function
ErrorHandler:
End Function
End If
Exit Sub
ErrorHandler:
End Sub
SCPI.NET Examples
You can also program the oscilloscope using the SCPI.NET drivers that come with
Keysight's free Command Expert software.
While you can write code manually using the SCPI.NET drivers, you can also use
the Command Expert software to:
• Connect to instruments and control them interactively using SCPI command
sets.
• Quickly prototype and test command sequences.
• Generate C#, VB.NET, or C/C++ code for command sequences.
• Find, download, and install SCPI command sets.
• Browse command trees, search for commands, and view command
descriptions.
The Command Expert suite also comes with Add-ons for easy instrument control
and measurement data retrieval in NI LabVIEW, Microsoft Excel, Keysight VEE, and
Keysight SystemVue.
To download the Keysight Command Expert software, see:
http://www.keysight.com/find/commandexpert
For more on programming with the SCPI.NET drivers, see "Using SCPI.NET
Drivers" in the help that comes with Keysight Command Expert.
code, :TIMebase:DELay, 1120 common command headers, 1167 cursors track measurements, 459
code, :TIMebase:MODE, 893 common logarithm math function, 337 cursors, how autoscale affects, 199
code, :TIMebase:RANGe, 895 completion criteria for an acquisition, 235, cursors, X1, X2, Y1, Y2, 390
code, :TIMebase:REFerence, 896 236 cycle count base, FLEXray frame
code, :TRIGger:MODE, 912 compound command headers, 1167 trigger, 700
code, :TRIGger:SLOPe, 931 compound header, 1169 cycle count repetition, FLEXray frame
code, :TRIGger:SOURce, 932 computer control examples, 1173 trigger, 701
code, :VIEW and :BLANk, 231 conditions for external trigger, 327 cycle measured, 439, 442
code, :WAVeform, 1006 conditions, reset, 182, 877 cycle time, 449
code, :WAVeform:DATA, 993 conduction calculation method for switching cycles analyzed, number of, 582, 583
code, :WAVeform:POINts, 997 loss, 603
code, :WAVeform:PREamble, 1001 Config softkey, 58
code, :WAVeform:SEGMented, 241 configurations, oscilloscope, 177, 181, D
code, :WGEN:ARBitrary:DATA, 1024 185, 888
code, *RST, 184 Configure softkey, 58 D- source, 979
code, SICL library example in C, 1279 connect oscilloscope, 57 D+ source, 980
code, SICL library example in Visual connect sampled data points, 1083 data, 728, 730, 993
Basic, 1288 Connection Expert, 59 data (waveform) maximum length, 640
code, VISA COM library example in constants for making automatic data 2, 731
C#, 1183 measurements, 278 data acquisition types, 985
code, VISA COM library example in constants for scaling display factors, 278 data conversion, 987
Python, 1200 constants for setting trigger levels, 278 data format for transfer, 988
code, VISA COM library example in Visual controller initialization, 64 data output order, 991
Basic, 1174 copy display, 221 data pattern length, 682, 747
code, VISA COM library example in Visual copyright, 2 data pattern, ARINC 429 trigger, 662, 823
Basic .NET, 1192 core commands, 1164 data pattern, CAN trigger, 681
code, VISA library example in C, 1207 count, 992 data point index, 1015
code, VISA library example in C#, 1226 count values, 236 data points, 238
code, VISA library example in count, Edge Then Edge trigger, 919 data record, measurement, 998
Python, 1247, 1253 count, Nth edge of burst, 923 data record, raw acquisition, 998
code, VISA library example in Visual counter, 427 data required to fill time buckets, 235
Basic, 1216 coupling, 928 DATA source, I2S, 712
code, VISA library example in Visual Basic COUPling demo signal, 290 data source, setup and hold trigger, 960
.NET, 1237 coupling for channels, 272 data structures, status reporting, 1133
code, VISA.NET library example in create automask, 511 data, saving and recalling, 306
C#, 1260 crest factor, 491, 579 date, calibration, 259
code, VISA.NET library example in CSV (Comma Separated Values) waveform date, system, 871
IronPython, 1273 data format, 638 dB versus frequency, 336
code, VISA.NET library example in Visual cumulative edge activity, 1077 DC coupling for edge trigger, 928
Basic .NET, 1266 current harmonics analysis fail count, 557 DC input coupling for specified
colon, root commands prefixed by, 196 current harmonics analysis results, channel, 272
color palette for hardcopy, 381 save, 634 DC offset correction for integrate
color palette for image, 630 current harmonics analysis run count, 560 input, 353
Comma Separated Values (CSV) waveform current harmonics analysis, apply, 554 DC RMS measured on waveform, 438, 479
data format, 638 current harmonics results data, 555 DC waveform generator output, 1034
command classifications, 1164 current harmonics results display, 556 DDE (Device Dependent Error) status
command differences from 7000B Series current logic levels on digital bit, 172, 174
oscilloscopes, 51 channels, 197 decision chart, status reporting, 1151
command errors detected in Standard Event current oscilloscope configuration, 177, default conditions, 182, 877
Status, 174 181, 185, 888 define channel labels, 276
Command Expert, 1260, 1299 current probe, 286, 331 define glitch trigger, 939
command header, 1165 CURRent segment waveform save define logic thresholds, 1079
command headers, common, 1167 option, 641 define measurement, 429
command headers, compound, 1167 current source, 598 define measurement source, 460
command headers, simple, 1167 cursor mode, 391 define trigger, 940, 948, 949, 951
command strings, valid, 1165 cursor position, 392, 394, 396, 399, 403 defined as, 163
commands quick reference, 77 cursor readout, 1096, 1100, 1101 definite-length block query response, 72
commands sent over interface, 170 cursor reset conditions, 182, 877 definite-length block response data, 164
commands, more about, 1163 cursor source, 393, 395 delay measured to calculate phase, 450
commands, obsolete and cursor time, 1096, 1100, 1101 delay measurement, 429
discontinued, 1071 cursor units, X, 397, 398 delay measurements, 468
common (*) commands, 3, 167, 169 cursor units, Y, 404, 405 delay parameters for measurement, 431
delay time, Edge Then Edge trigger, 918 display for channels, 273 edge slope, 931
DELay trigger commands, 915 display frequency span, 345 edge source, 932
delay, how autoscale affects, 199 display measurements, 420, 459 edge string for OR'ed edge trigger, 943
delayed time base, 893 display order, 1084 EDGE trigger commands, 927
delayed window horizontal scale, 901 display persistence, 317 edge triggering, 904
delete mask, 521 display reference, 894, 896 edges (activity) on digital channels, 197
delta time, 1096 display reference waveforms, 1064 edges in measurement, 429
delta voltage measurement, 1104 display reset conditions, 183, 878 efficiency, 492
delta X cursor, 390 display serial number, 226 efficiency power analysis, apply, 552
delta Y cursor, 390 display vectors, 318 elapsed time in mask test, 518
demo, 289 display wave position, 1084 ellipsis, 164
DEMO commands, 289 display, lister, 387 enable channel labels, 315
demo signal, 291 display, measurement statistics on/off, 463 enabling calibration, 262
demo signal function, 290 display, oscilloscope, 299, 317, 343, 541, enabling channel display, 273
demo signal phase angle, 294 873 enabling status register bits, 172, 186
demo signals output control, 295 display, serial decode bus, 648 end of string (EOS) terminator, 1166
deskew for power measurements, 551 displaying a baseline, 914 end of text (EOT) terminator, 1166
destination, remote command logging, 882 displaying unsynchronized signal, 914 end or identify (EOI), 1166
detecting probe types, 1082, 1086 divide math function, 336, 357 energy loss, 493
device-defined error queue clear, 171 DNS IP, 58 EOI (end or identify), 1166
DIFF source for function, 1087 domain, 58 EOS (end of string) terminator, 1166
differences from 7000B Series oscilloscope domain, network printer, 377 EOT (end of text) terminator, 1166
commands, 51 driver, printer, 1093 erase data, 311
differential probe heads, 279 DSO models, 6 erase measurements, 1095
differential signal type, 282 duplicate mnemonics, 1169 erase screen, 1085
differentiate math function, 336, 357, duration, 948, 949, 951 error counter (ARINC 429), 654
1005 duration for glitch trigger, 935, 936, 940 error counter (ARINC 429), reset, 655
digital channel commands, 298, 299, 300, duration of power analysis, 584, 585, 586, error frame count (CAN), 670
301, 303 587, 588, 589 error frame count (UART), 778
digital channel data, 989 duration qualifier, trigger, 948, 949 error messages, 874, 1123
digital channel labels, 316 duration triggering, 904 error number, 874
digital channel order, 1084 duty cycle measurement, 65, 420, 439, error queue, 874, 1143
digital channel source for glitch 442 error, measurement, 420
trigger, 941 Duty Cycle, power modulation ESB (Event Status Bit), 187, 189
digital channels, 6 analysis, 569 ESE (Standard Event Status Enable
digital channels, activity and logic levels DVM commands, 319 Register), 172, 1142
on, 197 DVM displayed value, 321 ESR (Standard Event Status Register), 174,
digital channels, groups of, 539, 541, 543 DVM enable/disable, 322 1141
digital pod, stop displaying, 204 DVM frequency value, 323 ETE demo signal, 291
digital reset conditions, 183, 878 DVM input source, 325 event status conditions occurred, 189
DIGital<d> commands, 297 DVM mode, 324 Event Status Enable Register (ESE), 172,
digitize channels, 205 1142
DIGitize command, 64, 69, 986 Event Status Register (ESR), 174, 230,
digits, 164 E 1141
disable front panel, 875 example code, :ACQuire:COMPlete, 235
disable function, 1088 EBURst trigger commands, 922 example code, :ACQuire:SEGMented, 241
disabling calibration, 262 ECL channel threshold, 1079 example code, :ACQuire:TYPE, 246
disabling channel display, 273 ECL threshold voltage for digital example code, :AUToscale, 200
disabling status register bits, 172, 186 channels, 303 example code, :CHANnel<n>:LABel, 276
discontinued and obsolete ECL trigger threshold voltage, 1121 example code, :CHANnel<n>:PROBe, 278
commands, 1071 edge activity, 1077 example code, :CHANnel<n>:RANGe, 284
display annotation, 307 edge counter, Edge Then Edge trigger, 919 example code, :DIGitize, 206
display annotation background, 308 edge counter, Nth edge of burst, 923 example code, :DISPlay:DATA, 312
display annotation color, 309 edge coupling, 928 example code, :DISPlay:LABel, 315
display annotation text, 310 edge fall time, 440 example code, :DISPlay:ORDer, 1084
display channel labels, 315 edge parameter for delay example code, :MEASure:PERiod, 460
display clear, 311 measurement, 431 example code, :MEASure:RESults, 454
DISPlay commands, 305 edge preshoot measured, 452 example code, :MEASure:TEDGe, 469
display commands introduction, 306 edge rise time, 457 example code, :MTESt, 507
display connect, 1083 EDGE SEARch commands, 800 example code, :POD<n>:THReshold, 543
display date, 871 edge search slope, 801 example code, :RUN/:STOP, 225
display factors scaling, 278 edge search source, 802 example code, :SYSTem:SETup, 888
example code, :TIMebase:DELay, 1120 filename for hardcopy, 1090 frequency measurements with X
example code, :TIMebase:MODE, 893 filename for recall, 616, 1032 cursors, 397
example code, :TIMebase:RANGe, 895 filename for save, 625 frequency resolution, 347
example code, :TIMebase:REFerence, 896 filter for frequency reject, 930 frequency span of display, 345
example code, :TRIGger:MODE, 912 filter for high frequency reject, 907 frequency versus dB, 336
example code, :TRIGger:SLOPe, 931 filter for noise reject, 913 Frequency, power modulation analysis, 569
example code, :TRIGger:SOURce, 932 filter used to limit bandwidth, 271, 328 front panel mode, 914
example code, :VIEW and :BLANk, 231 filters to Fast Fourier Transforms, 347 front panel Single key, 227
example code, :WAVeform, 1006 filters, math, 337 front panel Stop key, 229
example code, :WAVeform:DATA, 993 fine horizontal adjustment (vernier), 898 front-panel lock, 875
example code, :WAVeform:POINts, 997 fine vertical adjustment (vernier), 287 FSK modulation type, waveform
example code, finish pending device operations, 178 generator, 1050
:WAVeform:PREamble, 1001 first point displayed, 1015 FSK rate, waveform generator
example code, FLATtop window for amplitude modulation, 1045
:WAVeform:SEGMented, 241 measurements, 347 full-scale horizontal time, 895, 900
example code, FLEXray autoset for event trigger, 697 full-scale vertical axis defined, 359
:WGEN:ARBitrary:DATA, 1024 FLEXray autosetup, 687 function, 231, 343, 344, 345, 347, 356,
example code, *RST, 184 FlexRay demo signal, 292 357, 359, 360, 361, 1087, 1088
example programs, 5, 1173 FlexRay frame counters, reset, 691 FUNCtion commands, 333
examples on the website, 1173 FLEXray SEARch commands, 832 function memory, 228
EXE (Execution Error) status bit, 172, 174 FlexRay serial search, cycle, 833 function turned on or off, 1088
execution error detected in Standard Event FlexRay serial search, data, 834 function, demo signal, 290
Status, 174 FlexRay serial search, data length, 835 function, first source input, 362
exponential fall waveform generator FlexRay serial search, frame, 836 function, second source input, 364
output, 1035 FlexRay serial search, mode, 837 function, waveform generator, 1033
exponential math function, 337, 357 FLEXray source, 694 functions, 1005
exponential notation, 163 FLEXray trigger, 695
exponential rise waveform generator FLEXray trigger commands, 685
output, 1035 FM burst demo signal, 290 G
extended video triggering license, 973 FM modulation type, waveform
external glitch trigger source, 941 generator, 1050 g(t) source, first input channel, 351
external range, 330 force trigger, 906 g(t) source, math operation, 350
external trigger, 327, 329, 932 format, 995, 1000 g(t) source, second input channel, 352
EXTernal trigger commands, 327 format (word), ARINC 429, 657 gain for Ax + B math operation, 354
EXTernal trigger level, 929 format for block data, 177 gateway IP, 58
external trigger probe attenuation format for generic video, 969, 973 gaussian pulse waveform generator
factor, 329 format for hardcopy, 1089 output, 1035
external trigger probe sensing, 1086 format for image, 628 general SBUS<n> commands, 647
EXTernal trigger source, 932 format for waveform data, 638 general SEARch commands, 796
external trigger units, 331 FormattedIO488 object, 67 general trigger commands, 905
formfeed for hardcopy, 368, 372 GENeric, 969, 973
formulas for data conversion, 987 generic video format, 969, 973
F frame, 763 Generic video trigger, edge number, 974
frame counters (CAN), error, 670 Generic video trigger, greater than sync
fail count, current harmonics analysis, 557 frame counters (CAN), overload, 671 pulse width time, 977
fail/pass status (overall) for current frame counters (CAN), reset, 672 Generic video trigger, horizontal sync
harmonics analysis, 562 frame counters (CAN), total, 673 control, 975
failed waveforms in mask test, 516 frame counters (FlexRay), null, 690, 692 Generic video trigger, horizontal sync pulse
failure, self test, 191 frame counters (FlexRay), reset, 691 time, 976
fall time measurement, 420, 440 frame counters (FlexRay), total, 693 glitch demo signal, 291
Fall Time, power modulation analysis, 569 frame counters (UART), error, 778 glitch duration, 940
falling edge count measurement, 443 frame counters (UART), reset, 779 glitch qualifier, 939
falling pulse count measurement, 444 frame counters (UART), Rx frames, 780 GLITch SEARch commands, 803
Fast Fourier Transform (FFT) frame counters (UART), Tx frames, 781 glitch search, greater than value, 804
functions, 336, 344, 345, 347, 1087 frame ID, FLEXray BSS event trigger, 698 glitch search, less than value, 805
FF values in waveform data, 993 frame ID, FLEXray frame trigger, 702 glitch search, polarity, 806
FFT (Fast Fourier Transform) functions, 336, frame type, FLEXray frame trigger, 703 glitch search, qualifier, 807
344, 345, 347, 1087 framing, 761 glitch search, range, 808
FFT (Fast Fourier Transform) frequency deviation, waveform generator FM glitch search, source, 809
operation, 357, 1005 modulation, 1042 glitch source, 941
FFT vertical units, 346 frequency measurement, 65, 420, 441 GLITch trigger commands, 933
fifty ohm impedance, disable setting, 880 glitch trigger duration, 935
invert graticule colors for hardcopy, 373, LIN SEARch commands, 851 M1553 trigger type, 755
1092 LIN serial decode bus parity bits, 737 magnify math function, 337, 357
invert graticule colors for image, 629 LIN serial search, data, 854 magnitude of occurrence, 470
inverted masks, bind levels, 532 LIN serial search, data format, 856 main sweep range, 899
inverting input for channels, 275 LIN serial search, data length, 855 main time base, 1120
IO library, referencing, 66 LIN serial search, frame ID, 852 main time base mode, 893
IP address, 58 LIN serial search, mode, 853 making measurements, 420
IronPython, VISA.NET example, 1273 LIN source, 740 MAN option for probe sense, 1082, 1086
LIN standard, 741 manual cursor mode, 391
LIN sync break, 742 MARKer commands, 389
K LIN trigger, 743, 747 marker mode, 399
LIN trigger commands, 735 marker position, 401
key disable, 875 LIN trigger definition, 1118 marker readout, 1100, 1101
key press detected in Standard Event Status LIN triggering, 646 marker set for voltage measurement, 1105,
Register, 174 line frequency setting for current harmonics 1106
Keysight Interactive IO application, 61 analysis, 558 marker sets start time, 1097
Keysight IO Control icon, 59 line glitch trigger source, 941 marker time, 1096
Keysight IO Libraries Suite, 6, 55, 66, 68 line number for TV trigger, 969 markers for delta voltage
Keysight IO Libraries Suite, installing, 56 line terminator, 163 measurement, 1104
knob disable, 875 LINE trigger level, 929 markers track measurements, 459
known state, 182, 877 LINE trigger source, 932 markers, command overview, 390
list of channel labels, 316 markers, mode, 391
LISTer commands, 385 markers, time at start, 1101
L lister display, 387 markers, time at stop, 1100
lister time reference, 388 markers, X delta, 396
label, 1078 ln (natural logarithm) math function, 357 markers, X1 position, 392
label command, bus, 254 ln math function, 337 markers, X1Y1 source, 393
label list, 276, 316 load utilization (CAN), 674 markers, X2 position, 394
label reference waveforms, 1065 local lockout, 875 markers, X2Y2 source, 395
label, ARINC 429 trigger, 661, 665, 821 lock, 875 markers, Y delta, 403
label, digital channel, 300 lock mask to signal, 523 markers, Y1 position, 399
labels, 276, 315, 316 lock, analog channel protection, 880 markers, Y2 position, 401
labels to store calibration information, 260 lockout message, 875 mask, 172, 186
labels, specifying, 306 log (common logarithm) math function, 357 mask command, bus, 255
LAN instrument, 60 log file name, remote command mask statistics, reset, 517
LAN interface, 57, 59 logging, 881, 884 mask test commands, 505
LAN Settings softkey, 58 log math function, 337 Mask Test Event Enable Register
landscape layout for hardcopy, 374 logic level activity, 1077 (MTEenable), 207
language for program examples, 63 long form, 1166 mask test event event register, 209
layout for hardcopy, 374 low frequency sine with glitch demo Mask Test Event Event Register
leakage into peak spectrum, 347 signal, 290 (:MTERegister[:EVENt]), 209, 1148
learn string, 177, 888 low pass filter math function, 337 mask test run mode, 524
least significant byte first, 991 low trigger level, 911 mask test termination conditions, 524
left reference, 896 lower threshold, 449 mask test, all channels, 510
legal values for channel offset, 277 lower threshold voltage for mask test, enable/disable, 522
legal values for frequency span, 345 measurement, 1094 mask, delete, 521
legal values for offset, 356, 360 lowercase characters in commands, 1165 mask, get as binary block data, 520
length for waveform data, 639 low-frequency reject filter, 930 mask, load from binary block data, 520
less than qualifier, 939 low-level voltage, waveform mask, lock to signal, 523
less than time, 936, 940, 949, 951 generator, 1058 mask, recall, 617
less than value for glitch search, 805 low-pass filter cutoff frequency, 349 mask, save, 631, 632
level for trigger voltage, 929, 937 low-pass filter math function, 357 masks, bind levels, 532
LF coupling, 928 low-pass filter used to limit master summary status bit, 189
license information, 179 bandwidth, 270, 271, 328 math filters, 337
limit bandwidth, 270 LRN (Learn Device Setup), 177 math function, stop displaying, 204
limits for line number, 969 lsbfirst, 991 math operators, 336
LIN acknowledge, 738 math transforms, 336
LIN baud rate, 739 math visualizations, 337
LIN demo signal, 292
M MAV (Message Available), 171, 187, 189
LIN identifier, 744 maximum duration, 936, 948, 949
LIN pattern data, 745 M1553 SEARch commands, 857 maximum position, 894
LIN pattern format, 748 M1553 trigger commands, 749 maximum range for zoomed window, 900
maximum scale for zoomed window, 901 measurements, rising edge count, 448 modulation analysis source (voltage or
maximum vertical value measurement, 475 measurements, rising pulse count, 451 current), 568
maximum vertical value, time of, 483, measurements, show, 459 modulation analysis, type of, 569
1098 measurements, snapshot all, 422 modulation type, waveform
maximum waveform data length, 640 measurements, source channel, 460 generator, 1050
MEASure commands, 407 measurements, standard deviation, 458 MOSI data pattern width, 769
measure mask test failures, 525 measurements, start marker time, 1100 MOSI data pattern, SPI trigger, 768
measure overshoot, 446 measurements, stop marker time, 1101 MOSI data source, SPI trigger, 765, 1119
measure period, 449 measurements, thresholds, 1097 most significant byte first, 991
measure phase between channels, 450 measurements, time between start and stop move cursors, 1100, 1101
MEASure power commands, 485 markers, 1096 msbfirst, 991
measure preshoot, 452 measurements, time between trigger and MSG (Message), 187, 189
measure start voltage, 1105 edge, 468 MSO models, 6
measure stop voltage, 1106 measurements, time between trigger and MSS (Master Summary Status), 189
measure value at a specified time, 480 vertical value, 470 MTEenable (Mask Test Event Enable
measure value at top of waveform, 481 measurements, time between trigger and Register), 207
measurement error, 420 voltage level, 1102 MTERegister[:EVENt] (Mask Test Event Event
measurement record, 998 measurements, upper threshold Register), 209, 1148
measurement setup, 420, 460 value, 1103 MTESt commands, 505
measurement source, 460 measurements, vertical amplitude, 434, multi-channel waveform data, save, 633
measurement statistics results, 454 472 multiple commands, 1169
measurement statistics, display on/off, 463 measurements, vertical peak-to-peak, 437, multiple queries, 73
measurement trend math function, 337, 477 multiply math function, 336, 357, 1005
357 measurements, voltage difference, 1104 multiply math function as g(t) source, 350
measurement window, 482 memory setup, 185, 888
measurements, AC RMS, 438, 479 menu, system, 876
measurements, area, 423, 433 message available bit, 189 N
measurements, average value, 435, 473 message available bit clear, 171
measurements, base value, 436, 474 message displayed, 189 N2820A high sensitivity current probe, 38,
measurements, built-in, 65 message error, 1123 433, 434, 435, 436, 437, 438
measurements, burst width, 425 message queue, 1140 N8900A InfiniiView oscilloscope analysis
measurements, clear, 426, 1095 messages ready, 189 software, 633
measurements, command overview, 420 midpoint of thresholds, 449 name channels, 276
measurements, counter, 427 MIL-STD-1553 demo signal, 292 name list, 316
measurements, DC RMS, 438, 479 MIL-STD-1553 serial decode base, 751 natural logarithm math function, 337
measurements, definition setup, 429 MIL-STD-1553 serial search, data, 859 negative glitch trigger polarity, 938
measurements, delay, 431 MIL-STD-1553 serial search, mode, 858 negative pulse width, 445
measurements, duty cycle, 439 MIL-STD-1553 serial search, Remote negative pulse width measurement, 65
measurements, fall time, 440 Terminal Address, 860 negative pulse width, power modulation
measurements, falling edge count, 443 MIL-STD-1553, dual demo signal, 292 analysis, 569
measurements, falling pulse count, 444 minimum duration, 935, 948, 949, 951 negative slope, 759, 931
measurements, frequency, 441 minimum vertical value measurement, 476 negative slope, Nth edge in burst, 925
measurements, how autoscale affects, 199 minimum vertical value, time of, 484, 1099 negative TV trigger polarity, 971
measurements, lower threshold level, 1094 MISO data pattern width, 767 network domain password, 378
measurements, maximum vertical MISO data pattern, SPI trigger, 766 network domain user name, 380
value, 475 MISO data source, SPI trigger, 764 network printer address, 375
measurements, maximum vertical value, MISO data, SPI, 1009 network printer domain, 377
time of, 483, 1098 mixed-signal demo signals, 291 network printer slot, 379
measurements, minimum vertical mixed-signal oscilloscopes, 6 network printer, apply connection
value, 476 mnemonics, duplicate, 1169 settings, 376
measurements, minimum vertical value, mode, 391, 893, 970 new line (NL) terminator, 163, 1166
time of, 484, 1099 mode, serial decode, 649 new load current, transient response
measurements, negative duty cycle, 442 model number, 176 analysis, 611
measurements, overshoot, 446 models, oscilloscope, 3 NL (new line) terminator, 163, 1166
measurements, period, 449 modes for triggering, 912 noise floor, 604, 607
measurements, phase, 450 Modify softkey, 58 noise reject filter, 913
measurements, preshoot, 452 modulating signal frequency, waveform noise waveform generator output, 1034
measurements, pulse width, negative, 445 generator, 1041, 1043 noise, adding to waveform generator
measurements, pulse width, positive, 453 modulation (waveform generator), output, 1048
measurements, ratio of AC RMS enabling/disabling, 1049 noisy sine waveform demo signal, 290
values, 478 modulation analysis, 567 non-core commands, 1164
measurements, rise time, 457 non-interlaced GENeric mode, 973
non-volatile memory, label list, 254, 300, OPT (Option Identification), 179 parametric measurements, 420
316 optional syntax terms, 163 parity, 783
normal acquisition type, 233, 986 options, 179 parity bits, LIN serial decode bus, 737
normal trigger sweep mode, 903 OR trigger commands, 942 parser, 196, 1169
notices, 2 order of digital channels on display, 1084 pass, self test, 191
NR1 number format, 163 order of output, 991 pass/fail status (overall) for current
NR3 number format, 163 oscilloscope connection, opening, 67 harmonics analysis, 562
Nth edge burst trigger source, 926 oscilloscope connection, verifying, 59 password, network domain, 378
Nth edge burst triggering, 904 oscilloscope external trigger, 327 path information, recall, 618
Nth edge in a burst idle, 924 oscilloscope models, 3 path information, save, 635
Nth edge in burst slope, 925 oscilloscope rate, 244 pattern, 729, 730, 731
Nth edge of burst counter, 923 oscilloscope, connecting, 57 pattern data, I2S, 717
Nth edge of Edge Then Edge trigger, 919 oscilloscope, initialization, 64 pattern data, LIN, 745
NTSC, 969, 973 oscilloscope, operation, 6 pattern duration, 935, 936, 948, 949
null frame count (FlexRay), 690 oscilloscope, program structure, 64 pattern for pattern trigger, 945
null offset, 604 oscilloscope, setting up, 57 pattern format, I2S, 719
NULL string, 873 oscilloscope, setup, 68 pattern format, LIN, 748
number format, 163 output control, demo signals, 295 pattern length, 682, 747
number of points, 238, 996, 998 output control, waveform generator, 1052 PATTern trigger commands, 944
number of time buckets, 996, 998 output load impedance, waveform pattern trigger format, 947
numeric variables, 72 generator, 1053 pattern trigger qualifier, 950
numeric variables, reading query results into output messages ready, 189 pattern triggering, 904
multiple, 74 output power, 498 pattern width, 767, 769
nwidth, 445 output queue, 178, 1139 peak current, 499
output queue clear, 171 peak data, 987
output ripple, 503 peak detect, 245
O output ripple analysis, 580 peak detect acquisition type, 234, 987
output sequence, 991 peak-to-peak vertical value
obsolete and discontinued overall pass/fail status for current harmonics measurement, 437, 477
commands, 1071 analysis, 562 pending operations, 178
obsolete commands, 1164 overlapped commands, 1172 percent of waveform overshoot, 446
occurrence reported by magnitude, 1102 overload, 283 percent thresholds, 429
offset, 337 Overload Event Enable Register (OVL), 217 period measured to calculate phase, 450
offset for Ax + B math operation, 355 Overload Event Register period measurement, 65, 420, 449
offset value for channel voltage, 277 (:OVLRegister), 1147 Period, power modulation analysis, 569
offset value for selected function, 356, 360 Overload Event Register (OVLR), 219 period, waveform generator, 1054
offset, waveform generator, 1059 overload frame count (CAN), 671 persistence, waveform, 306, 317
one values in waveform data, 993 overload protection, 217, 219 phase angle, 579
OPC (Operation Complete) command, 178 overshoot of waveform, 446 phase angle, demo signals, 294
OPC (Operation Complete) status bit, 172, overshoot percent for transient response phase measured between channels, 450
174 analysis, 591 phase measurements, 468
OPEE (Operation Status Enable overvoltage, 283 phase measurements with X cursors, 397
Register), 211 OVL (Overload Event Enable Register), 217 phase shifted demo signals, 290
Open method, 67 OVLR (Overload Event Register), 219 PNG format screen image data, 312
operating configuration, 177, 888 OVLR bit, 213, 215 pod, 539, 541, 542, 543, 1005, 1079
operating state, 185 OVLRegister (Overload Event POD commands, 539
operation complete, 178 Register), 1147 POD data format, 989
operation status condition register, 213 pod, stop displaying, 204
Operation Status Condition Register points, 238, 996, 998
(:OPERegister:CONDition), 213, 1145 P points in waveform data, 986
operation status conditions occurred, 189 polarity, 784, 971
Operation Status Enable Register P1080L24HZ, 969, 973 polarity for glitch search, 806
(OPEE), 211 P1080L25HZ, 969, 973 polarity for glitch trigger, 938
operation status event register, 215 P1080L50HZ, 969, 973 polarity, runt search, 811
Operation Status Event Register P1080L60HZ, 969, 973 polarity, runt trigger, 953
(:OPERegister[:EVENt]), 215, 1144 P480L60HZ, 969, 973 polling synchronization with timeout, 1156
operations for function, 357 P720L60HZ, 969, 973 polling wait, 1154
operators, math, 336 PAL, 969, 973 PON (Power On) status bit, 172, 174
OPERegister:CONDition (Operation Status palette for hardcopy, 381 portrait layout for hardcopy, 374
Condition Register), 213, 1145 palette for image, 630 position, 301, 394, 894, 899
OPERegister[:EVENt] (Operation Status PAL-M, 969, 973 position cursors, 1100, 1101
Event Register), 215, 1144 parameters for delay measurement, 431 position in zoomed view, 899
position waveforms, 1084 program message terminator, 1166 range, 337, 900
positive glitch trigger polarity, 938 program structure, 64 range for channels, 284
positive pulse width, 453 programming examples, 5, 1173 range for duration trigger, 951
positive pulse width measurement, 65 protecting against calibration, 262 range for external trigger, 330
positive pulse width, power modulation protection, 217, 219, 283 range for full-scale vertical axis, 359
analysis, 569 protection lock, 880 range for glitch search, 808
positive slope, 759, 931 pulse waveform generator output, 1034 range for glitch trigger, 940
positive slope, Nth edge in burst, 925 pulse width, 445, 453 range for time base, 895
positive TV trigger polarity, 971 pulse width duration trigger, 935, 936, range of offset values, 277
positive width, 453 940 range qualifier, 939
power analysis, enabling, 553 pulse width measurement, 65, 420 range, I2S, 720
POWer commands, 545 pulse width trigger, 913 ranges, value, 164
Power Event Enable Register pulse width trigger level, 937 rate, 244
(PWRenable), 222 pulse width triggering, 904 ratio measurements with X cursors, 397
power event event register, 224 pulse width, waveform generator, 1037 ratio measurements with Y cursors, 404
Power Event Event Register pwidth, 453 ratio of AC RMS values measured between
(:PWRRegister[:EVENt]), 224, 1149 PWRenable (Power Event Enable channels, 478
power factor, 494, 579 Register), 222 Ratio, power modulation analysis, 569
power factor for IEC 61000-3-2 Standard PWRRegister[:EVENt] (Power Event Event raw acquisition record, 998
Class C, 559 Register), 224, 1149 RCL (Recall), 181
power loss, 500 Python, VISA COM example, 1200 Rds (dynamic ON resistance)
power phase angle, 488 Python, VISA example, 1247, 1253 waveform, 603
power quality analysis, 578 PyVISA 1.5 and older, 1247 Rds(on) value for conduction
power quality type, 579 PyVISA 1.6 and newer, 1253 calculation, 605
power supply rejection ratio (PSRR), 574, reactive power, 501, 579
575, 576, 577 read configuration, 177
preamble data, 1000 Q ReadIEEEBlock method, 67, 71, 73
preamble metadata, 985 ReadList method, 67, 71
predefined logic threshold, 1079 qualifier, 940 ReadNumber method, 67, 71
predefined threshold voltages, 1121 qualifier for glitch search, 807 readout, 1096
present working directory, recall qualifier, runt search, 812 ReadString method, 67, 71
operations, 618 qualifier, runt trigger, 954 real (actual) power, 579
present working directory, save qualifier, transition search, 816 real power, 502
operations, 635 qualifier, transition trigger, 964 real-time acquisition mode, 237
preset conditions, 877 qualifier, trigger duration, 948, 949 recall, 181, 614, 888
preshoot measured on waveform, 452 qualifier, trigger pattern, 950 recall arbitrary waveform, 615
previously stored configuration, 181 queries, multiple, 73 RECall commands, 613
print command, 221 query error detected in Standard Event recall filename, 616, 1032
print job, start, 383 Status, 174 recall mask, 617
print mask test failures, 526 query responses, block data, 72 recall path information, 618
print query, 1115 query responses, reading, 71 recall reference waveform, 620
printer driver for hardcopy, 1093 query results, reading into numeric recall setup, 619
printer, active, 370 variables, 72 recalling and saving data, 306
printing, 368 query results, reading into string receiver width, I2S, 710
printing in grayscale, 1091 variables, 72 RECTangular window for transient
probe, 929 query return values, 1171 signals, 347
probe attenuation affects channel voltage query setup, 368, 390, 420, 888 reference, 337, 896
range, 284 query subsystem, 248, 298 reference for time base, 1120
probe attenuation factor (external querying setup, 269 reference waveform save source, 642
trigger), 329 querying the subsystem, 904 reference waveform, recall, 620
probe attenuation factor for selected queues, clearing, 1150 reference waveform, save, 643
channel, 278 quick reference, commands, 77 reference waveforms, clear, 1063
probe head type, 279 quoted ASCII string, 164 reference waveforms, display, 1064
probe ID, 280 QYE (Query Error) status bit, 172, 174 reference waveforms, label, 1065
probe sense for oscilloscope, 1082, 1086 reference waveforms, save to, 1066
probe skew value, 281, 1080 reference waveforms, skew, 1067
process sigma, mask test run, 529 R reference waveforms, Y offset, 1068
program data, 1166 reference waveforms, Y range, 1069
program data syntax rules, 1168 ramp symmetry, waveform generator, 1038 reference waveforms, Y scale, 1070
program initialization, 64 ramp symmetry, waveform generator reference, lister, 388
program message, 67, 170 modulating signal, 1047 registers, 174, 181, 185, 198, 207, 209,
program message syntax, 1165 ramp waveform generator output, 1034 211, 213, 215, 217, 219, 222, 224
registers, clearing, 1150 runt search polarity, 811 SEARch commands, GLITch, 803
reject filter, 930 runt search qualifier, 812 SEARch commands, I2S, 838
reject high frequency, 907 runt search source, 813 SEARch commands, IIC, 844
reject noise, 913 runt search, pulse time, 814 SEARch commands, LIN, 851
relative standard deviation, 467 RUNT trigger commands, 952 SEARch commands, M1553, 857
remote command logging, runt trigger polarity, 953 SEARch commands, RUNT, 810
enable/disable, 881, 885 runt trigger qualifier, 954 SEARch commands, SPI, 861
remote control examples, 1173 runt trigger source, 955 SEARch commands, TRANsition, 815
Remote Terminal Address (RTA), M1553 runt trigger time, 956 SEARch commands, UART, 865
trigger, 754 Rx frame count (UART), 780 search mode, 798
remove cursor information, 391 Rx source, 785 search state, 799
remove labels, 315 search, edge slope, 801
remove message from display, 873 search, edge source, 802
reorder channels, 199 S SECAM, 969, 973
repetitive acquisitions, 225 seconds per division, 897
report errors, 874 sample rate, 244 segmented waveform save option, 641
report transition, 468, 470 sampled data, 1083 segments, analyze, 239
reporting status, 1131 sampled data points, 993 segments, count of waveform, 1003
reporting the setup, 904 SAV (Save), 185 segments, setting number of memory, 240
request service, 189 save, 185, 623 segments, setting the index, 241
Request-for-OPC flag clear, 171 save arbitrary waveform, 624 segments, time tag, 1004
reset, 182 SAVE commands, 621 select measurement channel, 460
reset conditions, 182 save current harmonics analysis self-test, 191
reset defauts, waveform generator, 1055 results, 634 sensing a channel probe, 1082
reset mask statistics, 517 save filename, 625 sensing a external trigger probe, 1086
reset measurements, 311 save image, 626 sensitivity of oscilloscope input, 278
resolution of printed copy, 1091 save image with inksaver, 629 sequential commands, 1172
resource session object, 67 save mask, 631, 632 serial clock, 727, 762
ResourceManager object, 67 save mask test failures, 527 serial data, 728
restore configurations, 177, 181, 185, 888 save path information, 635 serial decode bus, 645
restore labels, 315 save reference waveform, 643 serial decode bus display, 648
restore setup, 181 save setup, 636 serial decode mode, 649
return values, query, 1171 save to reference waveform location, 1066 serial frame, 763
returning acquisition type, 245 save waveform data, 637 serial number, 226
returning number of data points, 238 saved image, area, 1117 service request, 189
RF burst demo signal, 290 saving and recalling data, 306 Service Request Enable Register
right reference, 896 SBUS A429 commands, 650 (SRE), 187, 1137
ringing pulse demo signal, 290 SBUS CAN commands, 668 set center frequency, 344
ripple (output) analysis, 580 SBUS commands, 645 set cursors, 1100, 1101
ripple, output, 503 SBUS I2S commands, 704 set date, 871
rise time measurement, 420 SBUS<n> commands, general, 647 set time, 890
rise time of positive edge, 457 scale, 361, 897, 901 set up oscilloscope, 57
Rise Time, power modulation analysis, 569 scale factors output on hardcopy, 371, 627 setting digital display, 299
rising edge count measurement, 448 scale for channels, 285 setting digital label, 254, 300
rising pulse count measurement, 451 scale units for channels, 286 setting digital position, 301
RMS - AC, power modulation analysis, 569 scale units for external trigger, 331 setting digital threshold, 303
RMS value measurement, 438, 479 scaling display factors, 278 setting display, 343
roll time base mode, 893 SCPI commands, 75 setting external trigger level, 327
root (:) commands, 193, 196 SCPI.NET examples, 1299 setting impedance for channels, 274
root level commands, 3 scratch measurements, 1095 setting inversion for channels, 275
RQL (Request Control) status bit, 172, 174 screen area for hardcopy print, 369 setting pod display, 541
RQS (Request Service), 189 screen area for saved image, 1117 setting pod size, 542
RS-232/UART triggering, 646 screen display of logged remote commands, setting pod threshold, 543
RST (Reset), 182 enable/disable, 883 settings, 181, 185
rules, tree traversal, 1169 screen image data, 312 settings, instrument, 368
rules, truncation, 1166 SDI pattern, ARINC 429 trigger, 663, 824 setup, 234, 248, 269, 298, 306, 368,
run, 190, 225 SEARch commands, 795 888
Run bit, 213, 215 SEARch commands, A429, 820 setup and hold trigger clock source, 959
run count, current harmonics analysis, 560 SEARch commands, CAN, 826 setup and hold trigger data source, 960
run mode, mask test, 524 SEARch commands, EDGE, 800 setup and hold trigger hold time, 961
running configuration, 185, 888 SEARch commands, FLEXray, 832 setup and hold trigger setup time, 962
RUNT SEARch commands, 810 SEARch commands, general, 796 setup and hold trigger slope, 958
setup configuration, 181, 185, 888 source input for function, first, 362 start time marker, 1097
setup defaults, 182, 877 source input for function, second, 364 state memory, 185
setup memory, 181 source, arming edge, Edge Then Edge state of instrument, 177, 888
setup reported, 904 trigger, 917 statistics increment, 464
setup time, setup and hold trigger, 962 source, automask, 512 statistics reset, 466
setup, recall, 619 source, FLEXray, 694 statistics results, 454
setup, save, 636 source, mask test, 537 statistics, max count, 465
shape of modulation signal, waveform source, runt search, 813 statistics, relative standard deviation, 467
generator, 1046 source, runt trigger, 955 statistics, type of, 462
SHOLd trigger commands, 957 source, save reference waveform, 642 status, 188, 228, 230
short form, 5, 1166 source, transition trigger, 818, 966 Status Byte Register (STB), 186, 188, 189,
show channel labels, 315 source, trigger edge, Edge Then Edge 1135
show measurements, 420, 459 trigger, 921 status data structure clear, 171
SICL example in C, 1279 source, waveform, 1005 status registers, 74
SICL example in Visual Basic, 1288 span, 336 status reporting, 1131
SICL examples, 1279 span of frequency on display, 345 STB (Status Byte Register), 186, 188, 189,
sigma, mask test run, 529 specify measurement, 460 1135
signal speed, ARINC 429, 660 speed of ARINC 429 signal, 660 steady state output voltage expected, 595,
signal type, 282 SPI, 759 596, 597
signal type, ARINC 429, 658 SPI clock timeout, 760 step size for frequency span, 345
signed data, 988 SPI decode bit order, 758 stop, 205, 229
simple command headers, 1167 SPI decode word width, 771 stop acquisition, 229
sine cardinal waveform generator SPI demo signal, 292 stop cursor, 1101
output, 1035 SPI MISO data, 1009 stop displaying channel, 204
sine waveform demo signal, 290 SPI SEARch commands, 861 stop displaying math function, 204
sine waveform generator output, 1033 SPI serial search, data, 863 stop displaying pod, 204
single acquisition, 227 SPI serial search, data width, 864 stop on mask test failure, 528
single-ended probe heads, 279 SPI serial search, mode, 862 stop time, 940, 1101
single-ended signal type, 282 SPI trigger, 761, 767, 769 storage, 185
single-shot demo signal, 291 SPI trigger clock, 762 store instrument setup, 177, 185
single-shot DUT, synchronizing with, 1158 SPI trigger commands, 756 store setup, 185
size, 542 SPI trigger frame, 763 storing calibration information, 260
size, digital channels, 302 SPI trigger MISO data pattern, 766 string variables, 72
skew, 281, 1080 SPI trigger MOSI data pattern, 768 string variables, reading multiple query
skew reference waveform, 1067 SPI trigger type, 770 results into, 73
slew rate power analysis, 600 SPI trigger, MISO data source, 764 string variables, reading query results into
slope, 759, 931 SPI trigger, MOSI data source, 765, 1119 multiple, 73
slope (direction) of waveform, 1102 SPI triggering, 646 string, quoted ASCII, 164
slope not valid in TV trigger mode, 931 square math function, 336, 357 subnet mask, 58
slope parameter for delay square root math function, 336, 357 subsource, waveform source, 1009
measurement, 431 square wave duty cycle, waveform subsystem commands, 3, 1169
slope, arming edge, Edge Then Edge generator, 1039 subtract math function, 336, 357, 1005
trigger, 916 square waveform generator output, 1033 subtract math function as g(t) source, 350
slope, Nth edge in burst, 925 SRE (Service Request Enable sweep mode, trigger, 903, 914
slope, setup and hold trigger, 958 Register), 187, 1137 sweep speed set to fast to measure fall
slope, transition search, 817 SRQ (Service Request interrupt), 207, 211, time, 440
slope, transition trigger, 965 222 sweep speed set to fast to measure rise
slope, trigger edge, Edge Then Edge SSM pattern, ARINC 429 trigger, 664, 825 time, 457
trigger, 920 standard deviation measured on switch disable, 875
slot, network printer, 379 waveform, 458 switching level, current, 604
smoothing acquisition type, 987 Standard Event Status Enable Register switching level, voltage, 607
snapshot all measurement, 422 (ESE), 172, 1142 switching loss per cycle, 490
software version, 176 Standard Event Status Register (ESR), 174, switching loss power analysis, 602
source, 460, 659, 678, 740 1141 sync break, LIN, 742
source (voltage or current) for slew rate standard for video, 973 sync frame count (FlexRay), 692
analysis, 601 standard, LIN, 741 syntax elements, 163
source channel, M1553, 752 start acquisition, 190, 205, 225, 227 syntax rules, program data, 1168
source for function, 1087 start and stop edges, 429 syntax, optional terms, 163
source for glitch search, 809 start cursor, 1100 syntax, program message, 1165
source for Nth edge burst trigger, 926 start measurement, 420 SYSTem commands, 869
source for trigger, 932 start print job, 383 system commands, 871, 873, 874, 875,
source for TV trigger, 972 start time, 940, 1100 888, 890
system commands introduction, 870 time-ordered label list, 316 trigger occurred, 189
timeout, SPI clock, 760 TRIGger OR commands, 942
timing measurement, 420 TRIGger PATTern commands, 944
T title channels, 276 trigger pattern qualifier, 950
title, mask test, 538 trigger qualifier, UART, 791
table of current harmonics results, 556 tolerance, automask, 514, 515 trigger reset conditions, 183, 878
tdelta, 1096 top of waveform value measured, 481 TRIGger RUNT commands, 952
tedge, 468 total frame count (CAN), 673 TRIGger SHOLd commands, 957
telnet ports 5024 and 5025, 993 total frame count (FlexRay), 693 trigger SPI clock slope, 759
Telnet sockets, 75 total harmonics distortion (THD), 563 TRIGger SPI commands, 756
temporary message, 873 total waveforms in mask test, 519 trigger status bit, 230
TER (Trigger Event Register), 230, 1138 trace memory, 228 trigger sweep mode, 903
termination conditions, mask test, 524 track measurements, 459 TRIGger TV commands, 963, 968
test sigma, mask test run, 529 transfer instrument state, 177, 888 trigger type, ARINC 429, 666, 822
test, self, 191 transforms, math, 336 trigger type, SPI, 770
text, writing to display, 873 transient response, 504 trigger type, UART, 792
THD (total harmonics distortion), 563 transient response analysis, 608, 609, 612 TRIGger UART commands, 772
threshold, 303, 543, 1079, 1121 TRANsition SEARch commands, 815 TRIGger USB commands, 978
threshold voltage (lower) for transition search qualifier, 816 trigger, ARINC 429 source, 659
measurement, 1094 transition search slope, 817 trigger, CAN, 679
threshold voltage (upper) for transition search time, 819 trigger, CAN pattern data length, 682
measurement, 1103 transition trigger qualifier, 964 trigger, CAN pattern ID mode, 684
thresholds, 429, 1097 transition trigger slope, 965 trigger, CAN sample point, 675
thresholds used to measure period, 449 transition trigger source, 818, 966 trigger, CAN signal baudrate, 676
thresholds, how autoscale affects, 199 transition trigger time, 967 trigger, CAN signal definition, 677
time base, 893, 894, 895, 896, 897, transmit word size, I2S, 722 trigger, CAN source, 678
1120 transparent screen background, remote trigger, duration greater than, 948
time base commands introduction, 892 command logging, 886 trigger, duration less than, 949
time base reset conditions, 183, 878 tree traversal rules, 1169 trigger, duration range, 951
time base window, 899, 900, 901 trend measurement, 365 trigger, edge coupling, 928
time between points, 1096 TRG (Trigger), 187, 189, 190 trigger, edge level, 929
time buckets, 235, 236 TRIG OUT BNC, 261 trigger, edge reject, 930
time delay, 1120 trigger armed event register, 213, 215 trigger, edge slope, 931
time delay, Edge Then Edge trigger, 918 trigger burst, UART, 788 trigger, edge source, 932
time delta, 1096 trigger channel source, 941, 972 trigger, FLEXray, 695
time difference between data points, 1013 TRIGger commands, 903 trigger, FLEXray error, 696
time duration, 940, 948, 949, 951 TRIGger commands, general, 905 trigger, FLEXray event, 699
time holdoff for trigger, 908 trigger data, UART, 789 trigger, force a, 906
time interval, 468, 470, 1096 TRIGger DELay commands, 915 trigger, glitch greater than, 935
time interval between trigger and trigger duration, 948, 949 trigger, glitch less than, 936
occurrence, 1102 TRIGger EBURst commands, 922 trigger, glitch level, 937
time marker sets start time, 1097 TRIGger EDGE commands, 927 trigger, glitch polarity, 938
time measurements with X cursors, 397 trigger edge coupling, 928 trigger, glitch qualifier, 939
time per division, 895 trigger edge slope, 931 trigger, glitch range, 940
time record, 347 trigger edge slope, Edge Then Edge trigger, glitch source, 941
time reference, lister, 388 trigger, 920 trigger, high frequency reject filter, 907
time specified, 480 trigger edge source, Edge Then Edge trigger, holdoff, 908
time, calibration, 266 trigger, 921 trigger, I2S, 714
time, mask test run, 530 trigger event bit, 230 trigger, I2S alignment, 707
time, runt pulse search, 814 Trigger Event Register (TER), 1138 trigger, I2S audio channel, 716
time, runt trigger, 956 TRIGger FLEXray commands, 685 trigger, I2S clock slope, 709
time, start marker, 1100 TRIGger GLITch commands, 933 trigger, I2S CLOCksource, 711
time, stop marker, 1101 trigger holdoff, 908 trigger, I2S DATA source, 712
time, system, 890 trigger idle, UART, 790 trigger, I2S pattern data, 717
time, transition search, 819 TRIGger IIC commands, 724 trigger, I2S pattern format, 719
time, transition trigger, 967 trigger level auto set up, 909 trigger, I2S range, 720
time/div, how autoscale affects, 199 trigger level constants, 278 trigger, I2S receiver width, 710
time-at-max measurement, 1098 trigger level voltage, 929 trigger, I2S transmit word size, 722
time-at-min measurement, 1099 trigger level, high, 910 trigger, I2S word select (WS) low, 723
TIMebase commands, 891 trigger level, low, 911 trigger, I2S word select (WS) source, 713
timebase vernier, 898 TRIGger LIN commands, 735 trigger, IIC clock source, 727
TIMebase:MODE, 70 TRIGger M1553 commands, 749 trigger, IIC data source, 728
trigger, IIC pattern address, 729 turn on/turn off time analysis, 570, 571, USB trigger, 982
trigger, IIC pattern data, 730 572, 573 USB trigger commands, 978
trigger, IIC pattern data 2, 731 turning channel display on and off, 273 USB triggering, 904
trigger, IIC qualifier, 732 turning off/on function calculation, 343 user defined channel labels, 276
trigger, IIC signal baudrate, 739 turning vectors on or off, 1083 user defined threshold, 1079
trigger, IIC type, 733 TV mode, 970, 1122 user event conditions occurred, 189
trigger, LIN, 743 TV trigger commands, 963, 968 user name, network domain, 380
trigger, LIN pattern data, 745 TV trigger line number setting, 969 User's Guide, 6
trigger, LIN pattern data length, 747 TV trigger mode, 972 user-defined threshold voltage for digital
trigger, LIN pattern format, 748 TV trigger polarity, 971 channels, 303
trigger, LIN sample point, 738 TV trigger standard setting, 973 user-defined trigger threshold, 1121
trigger, LIN signal definition, 1118 TV triggering, 904 USR (User Event bit), 187, 189
trigger, LIN source, 740 tvmode, 1122 utilization, CAN bus, 674
trigger, mode, 912 Tx data, UART, 1009
trigger, noise reject filter, 913 Tx frame count (UART), 781
trigger, Nth edge burst source, 926 Tx source, 786 V
trigger, Nth edge in burst slope, 925
trigger, Nth edge of burst count, 923 valid command strings, 1165
trigger, Nth edge of Edge Then Edge U valid pattern time, 948, 949
trigger, 919 value, 470
trigger, SPI clock slope, 759 UART base, 787 value measured at base of waveform, 436,
trigger, SPI clock source, 762 UART baud rate, 776 474
trigger, SPI clock timeout, 760 UART bit order, 777 value measured at specified time, 480
trigger, SPI frame source, 763 UART frame counters, reset, 779 value measured at top of waveform, 481
trigger, SPI framing, 761 UART parity, 783 value ranges, 164
trigger, SPI pattern MISO width, 767 UART polarity, 784 values required to fill time buckets, 236
trigger, SPI pattern MOSI width, 769 UART Rx source, 785 VBA, 66, 1174
trigger, sweep, 914 UART SEARch commands, 865 Vce(sat) value for conduction
trigger, threshold, 1121 UART serial search, data, 866 calculation, 606
trigger, TV line, 969 UART serial search, data qualifier, 868 vectors turned on or off, 1083
trigger, TV mode, 970, 1122 UART serial search, mode, 867 vectors, display, 318
trigger, TV polarity, 971 UART trigger burst, 788 vectors, turning on or off, 306
trigger, TV source, 972 UART trigger commands, 772 vernier, channel, 287
trigger, TV standard, 973 UART trigger data, 789 vernier, horizontal, 898
trigger, UART base, 787 UART trigger idle, 790 vertical adjustment, fine (vernier), 287
trigger, UART baudrate, 776 UART trigger qualifier, 791 vertical amplitude measurement, 434, 472
trigger, UART bit order, 777 UART trigger type, 792 vertical axis defined by RANGe, 359
trigger, UART parity, 783 UART Tx data, 1009 vertical axis range for channels, 284
trigger, UART polarity, 784 UART Tx source, 786 vertical offset for channels, 277
trigger, UART Rx source, 785 UART width, 793 vertical peak-to-peak measured on
trigger, UART Tx source, 786 UART/RS232 demo signal, 291 waveform, 437, 477
trigger, UART width, 793 UART/RS-232 triggering, 646 vertical scale, 285, 361
trigger, USB, 982 units (vertical) for FFT, 346 vertical scaling, 1000
trigger, USB D- source, 979 units per division, 285, 286, 331, 897 vertical threshold, 1079
trigger, USB D+ source, 980 units per division (vertical) for vertical units for FFT, 346
trigger, USB speed, 981 function, 285, 361 vertical value at center screen, 356, 360
truncation rules, 1166 units, automask, 513 vertical value maximum measured on
TST (Self Test), 191 units, X cursor, 397, 398 waveform, 475
tstart, 1100 units, Y cursor, 404, 405 vertical value measurements to calculate
tstop, 1101 unsigned data, 988 overshoot, 446
TTL threshold voltage for digital unsigned mode, 1011 vertical value minimum measured on
channels, 303, 1079 upper threshold, 449 waveform, 476
TTL trigger threshold voltage, 1121 upper threshold voltage for video line to trigger on, 969
turn function on or off, 1088 measurement, 1103 video standard selection, 973
turn off channel, 204 uppercase characters in commands, 1165 view, 231, 1012, 1084
turn off channel labels, 315 URQ (User Request) status bit, 172, 174 view turns function on or off, 1088
turn off digital pod, 204 USB (Device) interface, 57 VISA COM example in C#, 1183
turn off math function, 204 USB source, 979, 980 VISA COM example in Python, 1200
turn off time, 496, 573 USB speed, 981 VISA COM example in Visual Basic, 1174
turn on channel labels, 315 USB storage device, recalling files VISA COM example in Visual Basic
turn on channel number display, 1084 from, 614 .NET, 1192
turn on time, 497, 573 USB storage device, saving files to, 623 VISA example in C, 1207
VISA example in C#, 1226 waveform generator output load word counter (ARINC 429), 656
VISA example in Python, 1247, 1253 impedance, 1053 word counter (ARINC 429), reset, 655
VISA example in Visual Basic, 1216 waveform generator period, 1054 word format, 995
VISA example in Visual Basic .NET, 1237 waveform generator pulse width, 1037 word format for data transfer, 988
VISA examples, 1174, 1207 waveform generator ramp symmetry, 1038 word format, ARINC 429, 657
VISA.NET example in C#, 1260 waveform generator reset defaults, 1055 word select (WS) low, I2S trigger, 723
VISA.NET example in IronPython, 1273 waveform generator square wave duty word select (WS) source, I2S, 713
VISA.NET example in Visual Basic cycle, 1039 word width, SPI decode, 771
.NET, 1266 waveform introduction, 985 write mode, remote command
VISA.NET examples, 1260 waveform maximum vertical value logging, 881, 887
Visual Basic .NET, VISA COM measured, 475 write text to display, 873
example, 1192 waveform minimum vertical value WriteIEEEBlock method, 67, 73
Visual Basic .NET, VISA example, 1237 measured, 476 WriteList method, 67
Visual Basic .NET, VISA.NET example, 1266 waveform must cross voltage level to be an WriteNumber method, 67
Visual Basic 6.0, 67 occurrence, 1102 WriteString method, 67
Visual Basic for Applications, 66, 1174 WAVeform parameters, 70
Visual Basic, SICL library example, 1288 waveform peak-to-peak vertical value
Visual Basic, VISA COM example, 1174 measured, 437, 477 X
Visual Basic, VISA example, 1216 waveform period, 449
visualizations, math, 337 waveform persistence, 306 X axis markers, 390
voltage crossing reported or not waveform RMS value measured, 438, 479 X cursor units, 397, 398
found, 1102 waveform save option for segments, 641 X delta, 396
voltage difference between data waveform source, 1005 X delta, mask scaling, 534
points, 1016 waveform source subsource, 1009 X1 and X2 cursor value difference, 396
voltage difference measured, 1104 waveform standard deviation value X1 cursor, 390, 392, 393
voltage level for active trigger, 929 measured, 458 X1, mask scaling, 533
voltage marker used to measure waveform vertical amplitude, 434, 472 X2 cursor, 390, 394, 395
waveform, 1105, 1106 waveform voltage measured at X-axis functions, 892
voltage offset value for channels, 277 marker, 1105, 1106 X-increment, 1013
voltage probe, 286, 331 waveform, byte order, 991 X-of-max measurement, 483
voltage ranges for channels, 284 waveform, count, 992 X-of-min measurement, 484
voltage ranges for external trigger, 330 waveform, data, 993 X-origin, 1014
voltage source, 599 waveform, format, 995 X-reference, 1015
voltage threshold, 429 waveform, points, 996, 998 X-Y mode, 892, 893
voltage, maximum expected input, 592, waveform, preamble, 1000
593, 594 waveform, type, 1010
waveform, unsigned, 1011 Y
waveform, view, 1012
W waveform, X increment, 1013 Y axis markers, 390
waveform, X origin, 1014 Y cursor units, 404, 405
WAI (Wait To Continue), 192 waveform, X reference, 1015 Y offset, reference waveform, 1068
wait, 192 waveform, Y increment, 1016 Y range, reference waveform, 1069
wait for operation complete, 178 waveform, Y origin, 1017 Y scale, reference waveform, 1070
Wait Trig bit, 213, 215 waveform, Y reference, 1018 Y1 and Y2 cursor value difference, 403
warranty, 2 WAVeform:FORMat, 70 Y1 cursor, 390, 393, 399, 403
waveform base value measured, 436, 474 waveforms, mask test run, 531 Y1, mask scaling, 535
WAVeform command, 65 Web control, 75 Y2 cursor, 390, 395, 401, 403
WAVeform commands, 983 website, examples on, 1173 Y2, mask scaling, 536
waveform data, 985 WGEN commands, 1019 Y-axis value, 1017
waveform data format, 638 WGEN trigger source, 932 Y-increment, 1016
waveform data length, 639 what's new, 33 Y-origin, 1017, 1018
waveform data length, maximum, 640 width, 793, 940 Y-reference, 1018
waveform data, save, 637 window, 899, 900, 901
waveform generator, 1021 window time, 895
waveform generator amplitude, 1056 window time base mode, 893 Z
waveform generator function, 1033 window, measurement, 482
waveform generator high-level windows, 347
windows as filters to Fast Fourier zero values in waveform data, 993
voltage, 1057 zoomed time base, 893
waveform generator low-level Transforms, 347
windows for Fast Fourier Transform zoomed time base measurement
voltage, 1058 window, 482
waveform generator offset, 1059 functions, 347
WMEMory commands, 1061 zoomed time base mode, how autoscale
waveform generator output control, 1052 affects, 199