User manual

Table Of Contents
Part 2: Automation Programming Reference
Note: WaveSurfer 3000, WaveSurfer 10, and HDO4000 oscilloscopes only support Auto, Single,
and XY Grid Modes. You can choose any of these for the exercise, but note that if you go from
Auto to Single, the change will only be evident by looking at the Display setup dialog.
Read Back Grid Mode and Vertical Scale
Create a variable to read back the value currently set in the equivalent control. In the text editor, write the
line:
myGridMode = app.Display.GridMode
This line of code retrieves the current value of the app.Display.GridMode CVAR and stores it within the
variable myGridMode.
Note: In VBS it is not necessary to dimension variables before using them (for example, using
statements like “Dim myVerScale as Double”).
To get the value of the C1 Vertical Scale, create a new line for the variable myVerScale.
In XStreamBrowser, navigate to the Acquisition > C1 folder and click on it to show the CVARs. Right click
on VerScale and Copy Path. Paste it behind the "myVerScale" variable:
myVerScale = app.Acquisition.C1.VerScale
For this exercise, the "read back" method will be the standard Visual Basic Message Box dialog. Add two
lines using the MsgBox function to display the values of the two variables you created:
MsgBox myGridMode
MsgBox myVerScale
Disconnect
Add a line of code to end the program and close the connection to the oscilloscope:
Set app = Nothing
2-15