Other topics about Controlling E5052B
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.
You can define the limit lines by specifying any limit value to the parameter of SCPI commands.
The program is described in detail below:
Define the data array (variable) for the limit lines.
Redefine the data array (variable) depending on the number of limit lines (segments).
Set the upper limit value for the limit lines in the array.
Set the lower limit value for the limit lines in the array.
Specify the segment number for the upper and lower limit values.
Specify the upper and lower limit values on the trace.
Trigger the instrument.
Display the limit lines.
Display the determination result. (For fail only.)
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
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.
Read the lower limit value for the limit lines from the file.
Read the upper limit value for the limit lines from the file.
Trigger the instrument.
Display the limit lines.
Display the determination result. (For fail only.)
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