User manual

Table Of Contents
Part 6: IEEE 488.2 Command Reference
AUTOMATION Commands and Queries
VBS, VBS
Description
The VBS command allows Automation commands to be sent in the context of an existing program.
The Automation command must be placed within single quotation marks.
The equal sign (=) within the automation command may be flanked by optional spaces for clarity.
Tip: See XStreamBrowser for instructions on accessing the Automation hierarchy.
Command Syntax
VBS '<automation command>'
Query Syntax
VBS? 'Return=<automation command>'
Examples
The following examples show the use of the VBS command to send an automation command. The
second column shows the equivalent GPIB-only command.
Command
VBS with Embedded Automation
Equivalent GPIB-only Command
Set C1 vertical scale to 50 mV/div
VBS 'app.Acquisition.C1.VerScale=0.05'
C1:VDIV 50 MV
Set horizontal scale to 500 ns/div
VBS 'app.Horizontal.HorScale = 500e-9'
TDIV 0.5e-6
Change grid mode to Dual
VBS 'app.Display.GridMode = Dual'
GRID DUAL
Query the vertical scale of C1
VBS? 'Return=app.Acquisition.C1.VerScale'
C1:VDIV?
6-43