EasyManuals Logo

Agilent Technologies InfiniiVision 5000 Series Programmer's Guide

Agilent Technologies InfiniiVision 5000 Series
788 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #735 background imageLoading...
Page #735 background image
Programming Examples 12
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide 735
' Analyze()
' --------------------------------------------------------------
' In this example we will do the following:
' - Save the system setup to a file for restoration at a later
' time.
' - Save the oscilloscope display to a file which can be
' printed.
' - Make single channel measurements.
Private Shared Sub Analyze()
' Results array.
Dim ResultsArray As Byte()
' Number of bytes returned from instrument.
Dim nLength As Integer
' SAVE_SYSTEM_SETUP - The :SYSTem:SETup? query returns a
' program message that contains the current state of the
' instrument. Its format is a definite-length binary block,
' for example,
' #800002204<setup string><NL>
' where the setup string is 2204 bytes in length.
Console.WriteLine("Saving oscilloscope setup to " _
+ "c:\scope\config\setup.dat")
If File.Exists("c:\scope\config\setup.dat") Then
File.Delete("c:\scope\config\setup.dat")
End If
' Query and read setup string.
nLength = oscp.DoQueryIEEEBlock(":SYSTem:SETup?", ResultsArray)
Console.WriteLine("Read oscilloscope setup ({0} bytes).", _
nLength)
' Write setup string to file.
File.WriteAllBytes("c:\scope\config\setup.dat", ResultsArray)
Console.WriteLine("Wrote setup string ({0} bytes) to file.", _
nLength)
' RESTORE_SYSTEM_SETUP - Uploads a previously saved setup
' string to the oscilloscope.
Dim DataArray As Byte()
Dim nBytesWritten As Integer
' Read setup string from file.
DataArray = File.ReadAllBytes("c:\scope\config\setup.dat")
Console.WriteLine("Read setup string ({0} bytes) from file.", _
DataArray.Length)
' Restore setup string.
nBytesWritten = oscp.DoCommandIEEEBlock(":SYSTem:SETup", _
DataArray)
Console.WriteLine("Restored setup string ({0} bytes).", _
nBytesWritten)
' IMAGE_TRANSFER - In this example, we query for the screen
' data with the ":DISPLAY:DATA?" query. The .png format

Table of Contents

Other manuals for Agilent Technologies InfiniiVision 5000 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies InfiniiVision 5000 Series and is the answer not in the manual?

Agilent Technologies InfiniiVision 5000 Series Specifications

General IconGeneral
BrandAgilent Technologies
ModelInfiniiVision 5000 Series
CategoryTest Equipment
LanguageEnglish

Related product manuals