854
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
12
Programming Examples
* retrieve_waveform
* ------------------------------------------------------------------
* This function retrieves previously saved waveform data from a
* file called "wave.dat".
*/
void retrieve_waveform(void)
{
FILE *fp;
fp = fopen("c:\\scope\\data\\wave.dat", "rb");
/* Read preamble. */
fread(preamble, sizeof(preamble[0]), 10, fp);
/* Read the waveform data. */
fread(waveform_data, sizeof(waveform_data[0]), (int)preamble[2],
fp);
fclose(fp);
}
VISA Example in Visual Basic
To run this example in Visual Basic for Applications:
1
Start the application that provides Visual Basic for Applications (for
example, Microsoft Excel).
2
Press ALT+F11 to launch the Visual Basic editor.
3
Add the visa32.bas file to your project:
a
Choose
File>Import File...
.
b
Navigate to the header file, visa32.bas (installed with Agilent IO
Libraries Suite and found in the Program Files\VISA\winnt\include
directory), select it, and click
Open
.
4
Choose
Insert>Module
.
5
Cut- and- paste the code that follows into the editor.
6
Edit the program to use the VISA address of your oscilloscope, and save
the changes.
7
Run the program.
'
' Agilent VISA Example in Visual Basic
' -------------------------------------------------------------------
' This program illustrates a few commonly-used programming
' features of your Agilent oscilloscope.
' -------------------------------------------------------------------
Option Explicit
Public err As Long
' Error returned by VISA function calls.
Public drm As Long
' Session to Default Resource Manager.
Public vi As Long
' Session to instrument.
Содержание InfiniiVision 7000A Series
Страница 1: ...Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide...
Страница 34: ...34 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 1 What s New...
Страница 44: ...44 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 2 Setting Up...
Страница 58: ...58 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 3 Getting Started...
Страница 652: ...652 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 5 Commands by Subsystem...
Страница 750: ...750 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 8 Error Messages...
Страница 784: ...784 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 10 Synchronizing Acquisitions...
Страница 810: ...810 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 11 More About Oscilloscope Commands...
Страница 922: ...922 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide Index...