Manual

A
PPENDIX
I:
Program Examples
268
ISSUED: February 2005
WM-RCM-E Rev D
SOURCE CODE EXAMPLE ACTIVEDSO -- 3 AND 4
The picture below shows the screen of programs ActiveDSOExcel3, which enables commands and queries to
be sent to the X-Stream DSO, using LeCroy’s ActiveDSO system. The VBA source code can be seen by
clicking Tools / Macro / Visual Basic Editor. The Clear button clears all the commands and queries. The
Execute button sends the commands and queries in order down the page.
In fact, this program can be used with earlier DSOs, which is why the RS232 option is still available. As with all
ActiveDSO programs, a single string is all that is needed to change from one bus to another. Examples to go in
cell 3D are shown here:
GPIB: 7 GPIB
IP: 127.0.0.1 LAN
COM1: 1920,8,N,1 RS232
The program fragments below are taken from the VBA code of this program.
' Procedure to send remote control commands to an instrument
' and to receive responses from it.
Private Sub CommandButton1_Click() ‘ Execute button
Dim o As Object ‘ Define variable o as object.
‘ Equate object o with the ActiveDSO object LeCroy.ActiveDSOCtrl1.
Set o = CreateObject("LeCroy.ActiveDSOCtrl.1")
‘ Strings of the form o.ACBD represent methods or properties of object
o.