Programming Examples
41
Agilent InfiniiVision 4000 X-Series Oscilloscopes Programmer's Guide
1307
strcat(str_out, str_err_val);
ipromptf(id, ":SYSTem:ERRor?\n", "%t", str_err_val);
}
if (strcmp(str_out, "") != 0)
{
printf("INST Error%s\n", str_out);
iflush(id, I_BUF_READ | I_BUF_WRITE);
}
}
SICL 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 sicl32.bas file to your project:
a
Choose
File>Import File...
.
b
Navigate to the header file, sicl32.bas (installed with Agilent IO
Libraries Suite and found in the Program Files\Agilent\IO Libraries
Suite\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 SICL address of your oscilloscope, and save
the changes.
7
Run the program.
'
' Agilent SICL Example in Visual Basic
' -------------------------------------------------------------------
' This program illustrates a few commonly-used programming
' features of your Agilent oscilloscope.
' -------------------------------------------------------------------
Option Explicit
Public id As Integer
' Session to instrument.
' Declare variables to hold numeric values returned by
' ivscanf/ifread.
Public dblQueryResult As Double
Public Const ByteArraySize = 5000000
Public retCount As Long
Public byteArray(ByteArraySize) As Byte
' Declare fixed length string variable to hold string value returned
' by ivscanf.
Public strQueryResult As String * 200
Summary of Contents for InfiniiVision 4000 X-Series
Page 1: ...s1 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide ...
Page 32: ...32 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide ...
Page 52: ...52 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide 2 Setting Up ...
Page 66: ...66 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide 3 Getting Started ...
Page 242: ...242 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide 7 ACQuire Commands ...
Page 252: ...252 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide 8 BUS n Commands ...
Page 300: ...300 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide 12 DEMO Commands ...
Page 330: ...330 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide 15 DVM Commands ...
Page 386: ...386 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide 18 HARDcopy Commands ...
Page 484: ...484 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide 21 MEASure Commands ...
Page 1098: ...1098 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide 34 WGEN w Commands ...
Page 1174: ...1174 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide 37 Error Messages ...
Page 1352: ...1352 Agilent InfiniiVision 4000 X Series Oscilloscopes Programmer s Guide Index ...