Specifications
192 Chapter 16
ESA/PSA Programming Examples
Using Visual Basic® 6 to Transfer Binary Trace Data
ESA/PSA Programming Examples
Using Visual Basic
®
6 to Transfer Binary Trace
Data
This is a Visual Basic example that gets binary trace data from the
instrument. Binary data transfers are faster than the default ASCII
transfer mode, because less data is sent over the bus. This example
works with the ESA or PSA Series spectrum analyzers. The bas file
(bintrace.bas) and a compiled executable (bintrace.exe) can be found on
the Documentation CD.
This example:
1. Queries the IDN (identification) string from the instrument.
2. While in Spectrum Analysis mode, it reads the trace data in binary
format (Real,32 or Real,64 or Int,32).
3. Stores the data is then to a file "bintrace.txt".
NOTE This example uses GPIB address 18 for the spectrum analyzer.
’’ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
’’ Copyright (c) 1999- 2003 Agilent Technologies Inc. All rights reserved.
’’
’’ You have a royalty-free right to use, modify, reproduce and distribute
’’ the Sample Application Files (and/or any modified version) in any way
’’ you find useful, provided that you agree that Agilent Technologies has
’’ no warranty, obligations or liability for any Sample Application Files.
’’
’’ Agilent Technologies provides programming examples for illustration only,
’’ This sample program assumes that you are familiar with the programming
’’ language being demonstrated and the tools used to create and debug
’’ procedures. Agilent Technologies support engineers can help explain the
’’ functionality of Agilent Technologies software components and associated
’’ commands, but they will not modify these samples to provide added
’’ functionality or construct procedures to meet your specific needs.
’’ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
’’ To develop VISA applications in Microsoft Visual Basic, you first need
’’ to add the Visual Basic (VB) declaration file in your VB project as a
’’ Module. This file contains the VISA function definitions and constant