Limit Test

Other topics about Controlling E5052B

Overview

This section describes how to define the limit lines and determine pass or fail with regard to the limit test function. For more on the concept of the limit test, refer to Data Analysis and Result Output.

Using Commands to Define Limit Lines

You can define the limit lines by specifying any limit value to the parameter of SCPI commands.

The program is described in detail below:

Line 20 to 30

Define the data array (variable) for the limit lines.

Line 40 to 50

Redefine the data array (variable) depending on the number of limit lines (segments).

Line 70 to 140

Set the upper limit value for the limit lines in the array.

Line 160 to 190

Set the lower limit value for the limit lines in the array.

Line 220 to 230

Specify the segment number for the upper and lower limit values.

Line 250 to 260

Specify the upper and lower limit values on the trace.

Line 280 to 320

Trigger the instrument.

Line 340

Display the limit lines.

Line 350

Display the determination result. (For fail only.)

Line 360

Activate the limit test function.

Example of   Using Commands to define Limit Lines

10| Sub Main()

20| Dim Udata() As Double

30| Dim Ldata() As Double

40| ReDim Udata(7)

50| ReDim Ldata(3)

60|

70| Udata(0) = 0

80| Udata(1) = 1400000000#

90| Udata(2) = 0.00002

100| Udata(3) = 1400000000#

110| Udata(4) = 0.00002

120| Udata(5) = 1600000000#

130| Udata(6) = 0.0001

140| Udata(7) = 1600000000#

150|

160| Ldata(0) = 0

170| Ldata(1) = 1200000000#

180| Ldata(2) = 0.0001

190| Ldata(3) = 1200000000#

200|

210| SCPI.DISPlay.WINDow.ACTive = "FP1"

220| SCPI.CALCulate.FP.TRACe.LIMit.UPPer.SEGMent.Count = 2

230| SCPI.CALCulate.FP.TRACe.LIMit.LOWer.SEGMent.Count = 1

240|

250| SCPI.CALCulate.FP.TRACe.LIMit.UPPer.SEGMent.DATA = Udata

260| SCPI.CALCulate.FP.TRACe.LIMit.LOWer.SEGMent.DATA = Ldata

270|

280| SCPI.TRIGger.MODE = "FP1"

290| SCPI.TRIGger.FP.Source = "bus"

300| SCPI.INITiate.FP.CONTinuous = False

310| SCPI.INITiate.FP.IMMediate

320| SCPI.IEEE4882.TRG

330|

340| SCPI.DISPlay.FP.TRACe.LIMit.LINE = True

350| SCPI.DISPlay.FP.LIMit.FSIGn = True

360| SCPI.CALCulate.FP.TRACe.LIMit.STATe = True

370| End Sub

Reading Limit Lines from Files

You can create any upper and lower value for limit lines in the specified format in advance, and read the file later to specify the limit lines.

For information about creating upper and lower values for limit lines, refer to Data analysis and Result Output.

The file must be saved in the CSV format (with the extension *.csv).

The program is described in detail below:

Save the upper limit values together into one file, and the lower limit values into another.

Line 20

Read the lower limit value for the limit lines from the file.

Line 30

Read the upper limit value for the limit lines from the file.

Line 50 to 100

Trigger the instrument.

Line 120

Display the limit lines.

Line 130

Display the determination result. (For fail only.)

Line 140

Activate the limit test function.

Example of Reading Limit Lines from File

010| Sub Main()

020| SCPI.MMEMory.FP.TRACe.Load.LIMit.LOWer = "f:\lower.csv"

030| SCPI.MMEMory.FP.TRACe.Load.LIMit.UPPer = "f:\upper.csv"

040|

050| SCPI.DISPlay.WINDow.ACTive = "FP1"

060| SCPI.TRIGger.MODE = "FP1"

070| SCPI.TRIGger.FP.Source = "bus"

080| SCPI.INITiate.FP.CONTinuous = False

090| SCPI.INITiate.FP.IMMediate

100| SCPI.IEEE4882.TRG

110|

120| SCPI.DISPlay.FP.TRACe.LIMit.LINE = True

130| SCPI.DISPlay.FP.LIMit.FSIGn = True

140| SCPI.CALCulate.FP.TRACe.LIMit.STATe = True

150| End Sub