Manual

C
HAPTER
S
IX
:
L
INKING
W
ITH
A
UTOMATION
WM-RCM-E Rev D
ISSUED: February 2005
71
HOW TO USE THE VBS COMMAND
The key to using automation commands in an existing GPIB program is the VBS command. This is described
in detail in Part Two of this manual. Please note that “app” refers to the instrument application program. It can
be defined by a statement like this:
Set WaveMaster = CreateObject(“LeCroy.WaveMasterApplication”)
Here are some examples of VBS, with the older GPIB equivalents. The command syntax is
VBS <automation command>.
CMD$=“VBS ‘app.Acquisition.C1.VerScale=0.05’"
CMD$ “C1:VDIV 50 MV” (Earlier equivalent)
CMD$=“VBS ‘app.Horizontal.HorScale = 500e-9’"
CMD$ “TDIV 0.5e-6” (Earlier equivalent)
CMD$=“VBS ‘app.Display.GridMode=”Dual”’"
CMD$ “GRID DUAL” (Earlier equivalent)
Note that where the command includes double quotation marks, you may have to split up the string and use a
code to replace the quotation marks. In QuickBasic you would use Chr$(34). In Visual Basic you would use
Chr(34).
Here is an example of setting up the Amplitude parameter:
VBS “app.Measure.P1.View = True”
VBS “app.Measure.P1.ParamEngine = "AMPL"”
VBS “app.Measure.P1.Source1 = "C1"”
VBS “app.Measure.P1.GateStart = 1.667”
VBS “app.Measure.P1.GateStop = 3.333”