User manual

Table Of Contents
MAUI Oscilloscopes Remote Control and Automation Manual
Synchronizing Setups
Another scenario where synchronization is necessary is between changing settings and reading results,
even when no acquisition took place. For this the WaitUntilIdle method is used. This method is a blocking
mechanism and will not return control until the setup request has completed.
An example of WaitUntilIdle usage follows.
Note: WaitUntilIdle is not for use when in Normal or Auto trigger mode.
Sub Button1_Click()
' Connect to the oscilloscope
Set app = CreateObject("LeCroy.XStreamDSO")
' Enable Standard Vertical parameters
app.Measure.MeasureMode = "StdVertical"
' Wait for the change to take place for a max. of 5 seconds
app.WaitUntilIdle(5)
' Read the value of P1 (pkpk) and transfer into the spreadsheet
Cells(1, 2).Value = app.Measure.P1.Out.Result.Value
' Enable Standard Horizontal parameters
app.Measure.MeasureMode = "StdHorizontal"
' Wait for the change to take place for a max. of 5 seconds
app.WaitUntilIdle(5)
' Read the value of P1 and transfer into the spreadsheet
Cells(1, 3).Value = app.Measure.P1.Out.Result.Value
End Sub
Best Practices for Synchronization
l In almost all Automation applications, it is highly recommended that you stop acquisitions before
accessing result data. Most synchronization problems are caused by failure to follow this practice.
l Use the app.SetToDefaultSetup action to restore the instrument to its default state before setting
the controls required by an application. This eliminates any dependency on the previous
configuration of the instrument. Teledyne LeCroy strives to ensure that the default state of the
instrument is constant from one software release to the next.
l When using a result object, verify that the status is valid to ensure that the acquisition and/or
processing was valid.
2-40