:MEASure:LLINe:MARGin?

Meas. mode:
Scope
TDR
Flex Apps:
FlexDCA
FlexRT

Query Syntax

:MEASureN:MARGin?

Where N identifies one of 64 {1:64} possible limit line tests. For example, :LLINe23.

Description

Queries the amplitude of the pass/fail margin for a Limit Line Test. If the Limit Line Test has failures (:MEASure:LLINe:FPOints?), a fail margin is returned. If no failures exist, a pass margin is returned. The returned amplitude value is the same value that is shown in the displayed Limit Lines panel. To return the time value for the data point where the pass/fail margin occurs, use the :MEASuer:LLINe:MLOCation? query. To return the total number of failed data points (which is zero for positive margins) use the :MEASure:LLINe:FPOints? query. To load and display a Limit Line Test, use the :LLINe:DISPlay command.

Interpreting Query Results
Amplitude Value Description Margin Examples
Negative The returned margin is a fail margin which shows the greatest failure in the test. This margin is for the displayed failed data point that occurs the greatest distance beyond any limit lines in the selected Limit Line Test. It is the difference in amplitude between that data point and limit line. A fail margin is always reported as a negative value.

In this example picture, two failed data points are shown on the displayed waveform. The fail margin value –3.4 mV would be returned.
Positive The returned margin is a pass margin which shows how close the test is to failing. This margin is for the displayed passed (valid) data point that occurs the closest distance inside any limit lines in the selected Limit Line Test. It is the difference in amplitude between that data point and limit line. A pass margin is always reported as a positive value.

In this example picture, two failed data points are shown on the displayed waveform. The pass margin value +3.2 mV would be returned.

Only displayed data points are analyzed. For example, if you zoom in on the waveform so that a portion of the Limit Line Test is off screen, any failed data point that exists off screen will not be analyzed.

Requires FlexDCA revision A.04.50 and above.

Measurement Ready?

To confirm that the measurement is ready to read, you can query the measurement's status:

if ('CORR' in Flex.query(':STATus?')):
	measurement = Flex.query('?')

If averaging is turned on (:ACQuire:AVERaging), you can also confirm if the measurement result is ready by comparing the number of specified averages (:ACQuire:ECOunt?) versus the number of measurement sweeps that have occurred (:COUNt?). The technique uses the :COUNt? common measurement query. For example,

if (Flex.query(':COUNt?') >= Flex.query(':ACQuire:ECOUNt?')):
	measurement = Flex.query('?')

You can also use an acquisition limit lest to test that a number of waveform samples, or pattern acquisitions have completed before returning a measurement. Refer to the :LTESt:ACQuire:CTYPe command.

Common Measurement Child Queries

This command supports the use of the following common measurement queries: :LOCation?, :COUNt?, :MAXimum?, :MINimum?, :MEAN?, and :SDEViation?.