User manual

Table Of Contents
MAUI Oscilloscopes Remote Control and Automation Manual
Accessing Control Variables (CVARs)
These instructions apply to CVARs (object selected from a yellow folder in XStreamBrowser).
Using the syntax:
<handle> = Object.Item('<object>')
Create an object variable for each level in the object hierarchy. For example, the following lines of code drill
into the hierarchy of the VerScale CVAR:
acq = app.Object.Item('Acquisition');
c1 = acq.Object.Item ('C1');
The result is a convenient set of handles to use rather than long and clumsy lines of code. Note that each
line above uses the object variable created in the line above it.
For CVARs that you can read or write, use the get and set functions to access properties of the CVAR. The
Value property is most frequently used, but others are available, including Range. Here are examples of
getting and setting the VerScale CVAR:
% read the value of the VerScale CVAR
C1VDiv = get(c1.Item('VerScale'), 'Value')
% read the Range and Type properties of the VerScale CVAR
range = get(c1.Item('VerScale'), 'Range')
type = get(c1.Item('VerScale'), 'Type')
% set VerScale to 0.789 V/div
set(c1.Item('VerScale'), 'Value', 0.789)
For CVARs that are Actions, use the invoke function:
% execute an application-level Clear Sweeps action
app.invoke('ClearSweeps','ActNow');
% execute an AutoSetup action
app.invoke('AutoSetup','ActNow');
% execute the ResetAll action for the Math system (only)
math.invoke('ResetAll','ActNow');
Action CVARs have an interface called ActNow that can be referenced, but this isn't required.
For CVARs that are Methods, use the invoke function and include the arguments required to perform the
method:
% execute the Acquire method with 5s timeout, no forced trigger
acq.invoke('Acquire', 5, false);
2-48