Sicl Example In Visual Basic - Agilent Technologies InfiniiVision 3000 Programmer's Manual

X-series
Hide thumbs Also See for InfiniiVision 3000:
Table of Contents

Advertisement

}

SICL Example in Visual Basic

To run this example in Visual Basic for Applications:
1
2
3
4
5
6
7
'
' 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
' 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
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
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);
}
Start the application that provides Visual Basic for Applications (for
example, Microsoft Excel).
Press ALT+F11 to launch the Visual Basic editor.
Add the sicl32.bas file to your project:
Choose File>Import File....
a
Navigate to the header file, sicl32.bas (installed with Agilent IO
b
Libraries Suite and found in the Program Files\Agilent\IO Libraries
Suite\include directory), select it, and click Open.
Choose Insert>Module.
Cut- and- paste the code that follows into the editor.
Edit the program to use the SICL address of your oscilloscope, and save
the changes.
Run the program.
' Session to instrument.
Programming Examples
1187
39

Advertisement

Table of Contents
loading

Table of Contents