User manual

Table Of Contents
MAUI Oscilloscopes Remote Control and Automation Manual
Timing and Synchronization
In any remote control program, it is important to set up "checks," periodically querying that processes are
complete before starting new ones, or that old measurements are cleared before taking new ones, etc.
Querying the 'app.WaitUntilIdle' method can tell your program when it is safe to proceed.
In your program, enter the query:
r = lecroy.query(r"""vbs? 'return=app.WaitUntilIdle(5)' """)
This will inform the program when the Recall Default setup has been completed and the oscilloscope
application is idle for 5 milliseconds (the default unit for this command) before going on to set up the new
acquisition.
Set Up Acquisition
Every program that is to acquire new data, whether raw waveform data or post-processing measurement
results, must set up an acquisition. It is important before taking any new acquisition to stop the previous
one. Failure to do this is a principal reason for inaccurate measurements. Add the line:
lecroy.write(r"""vbs 'app.acquisition.triggermode = "stopped" ' """)
Using XStreamBrowser, find suitable replacements for <value> in following acquisition CVARs, and add
these lines to your program:
lecroy.write(r"""vbs 'app.acquisition.trigger.edge.level = <value>' """)
lecroy.write(r"""vbs 'app.acquisition.triggermode = "single" ' """)
lecroy.write(r"""vbs 'app.acquisition.horizontal.maximize = "<value>" ' """)
Note: Be sure not to forget the double-quotes around those values that are String or Enum types.
Set Up Measurements
As with the default setup, it is a good idea to clear all measurement definitions and previous sweeps before
proceeding with new measurements:
lecroy.write(r"""vbs 'app.measure.clearall ' """)
lecroy.write(r"""vbs 'app.measure.clearsweeps ' """)
As you may have noticed by now, Automation commands are more granular than legacy 488.2
commands. Generally, more lines of code must be sent to achieve the same end result, because every
relevant application object must be set to a particular state. However, this granularity is also what makes
Automation more powerful.
To set up measurements, we have to first turn on measurements, then turn on statistics, then turn on the
parameter, then set what we want the parameter to measure, then set the parameter source (what input
it will measure), etc. Using XStreamBrowser, find a suitable <value> for 'app.measure.p1.paramengine'.
Tip: Select a single source measurement appropriate to your 1 KHz, 1 V pulse wave.
2-22