Limit Test

Other topics about Working with Automatic Test Systems

Overview

This section describes how to define the limit lines and determine pass or fail with regard to the limit test function. For more information 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 120

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

Line 170 to 240

When bit 4 of the operation status condition register changes from “1” to “0” (negative transition), bit 4 of the operation status event register is set to “1”.

Line 260 to 280

Set the upper and lower limit values for the limit lines in the array.

Line 310 to 320

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

Line 330 to 340

Specify the upper and lower limit values on the trace.

Line 360 to 400

Trigger the instrument.

Line 420 to 450

It repeats to the measurement end.

Line 460

Display the limit lines.

Line 470

Display the determination result. (For fail only.)

Line 480

Activate the limit test function.

Using Commands to define Limit Lines

110 DIM Buff$[9]

120 REAL Udata(1:8),Ldata(1:4)

130 INTEGER St

140 !

150 ASSIGN @Agte5052 TO 717

160 !

170 OUTPUT @Agte5052;"*ESE 60"

180 OUTPUT @Agte5052;"*SRE 32"

190 OUTPUT @Agte5052;":STAT:OPER:PRT 0"

200 OUTPUT @Agte5052;":STAT:OPER:NTR 16"

210 OUTPUT @Agte5052;":STAT:OPER:ENAB 16"

220 OUTPUT @Agte5052;"*CLS"

230 OUTPUT @Agte5052;"*OPC?"

240 ENTER @Agte5052;Buff$

250 !

260 READ Udata(*), Ldata(*)

270 DATA 0,1.4E+9,2.E-5,1.4E+9,2.E-5,1.6E+9,1.E-4,1.6E+9

280 DATA 0,1.2E+9,1.E-4,1.2E+9

290 !

300 OUTPUT @Agte5052;":DISP:WIND:ACT FP1"

310 OUTPUT @Agte5052;":CALC:FP:TRAC:LIM:UPP:SEGM:COUN 2"

320 OUTPUT @Agte5052;":CALC:FP:TRAC:LIM:LOW:SEGM:COUN 1"

330 OUTPUT @Agte5052;":CALC:FP:TRAC:LIM:UPP:SEGM:DATA ";Udata(*)

340 OUTPUT @Agte5052;":CALC:FP:TRAC:LIM:LOW:SEGM:DATA ";Ldata(*)

350 !

360 OUTPUT @Agte5052;":TRIG:MODE FP1"

370 OUTPUT @Agte5052;":TRIG:FP:SOUR BUS"

380 OUTPUT @Agte5052;":INIT:FP:CONT OFF"

390 OUTPUT @Agte5052;":INIT:FP:IMM"

400 OUTPUT @Agte5052;"*TRG"

410 !

420 REPEAT

430 OUTPUT @Agte5052;":STAT:OPER:COND?"

440 ENTER @Agte5052;St

450 UNTIL BIT(St,4)=0

460 OUTPUT @Agte5052;"DISP:FP:TRAC:LIM:LINE ON"

470 OUTPUT @Agte5052;"DISP:FP:LIM:FSIG ON"

480 OUTPUT @Agte5052;"CALC:FP:TRAC:LIM:STAT ON"

490 PRINT "End"

500 ASSIGN @Agte5052 TO *

510 Prog_end: END

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 the chapter describing “Data analysis and Result Output” in the User’s Guide.

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 110

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

Line 190 to 260

When bit 4 of the operation status condition register changes from “1” to “0” (negative transition), bit 4 of the operation status event register is set to “1”.

Line 290

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

Line 300

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

Line 320 to 360

Trigger the instrument.

Line 380 to 410

It repeats to the measurement end.

Line 430

Display the limit lines.

Line 440

Display the determination result. (For fail only.)

Line 450

Activate the limit test function.

Reading Limit Lines from File

110 DIM Ufile$[20],Lfile$[20],Buff$[9]

120 INTEGER St

130 !

140 Ufile$="f:\temP\upper.csv"

150 Lfile$="f:\temP\lower.csv"

160 !

170 ASSIGN @Agte5052 TO 717

180 !

190 OUTPUT @Agte5052;"*ESE 60"

200 OUTPUT @Agte5052;"*SRE 32"

210 OUTPUT @Agte5052;":STAT:OPER:PRT 0"

220 OUTPUT @Agte5052;":STAT:OPER:NTR 16"

230 OUTPUT @Agte5052;":STAT:OPER:ENAB 16"

240 OUTPUT @Agte5052;"*CLS"

250 OUTPUT @Agte5052;"*OPC?"

260 ENTER @Agte5052;Buff$

270 !

280 OUTPUT @Agte5052;":DISP:WIND:ACT FP1"

290 OUTPUT @Agte5052;":MMEM:FP:TRAC:LOAD:LIM:UPP """&Ufile$&""""

300 OUTPUT @Agte5052;":MMEM:FP:TRAC:LOAD:LIM:LOW """&Lfile$&""""

310 !

320 OUTPUT @Agte5052;":TRIG:MODE FP1"

330 OUTPUT @Agte5052;":TRIG:FP:SOUR BUS"

340 OUTPUT @Agte5052;":INIT:FP:CONT OFF"

350 OUTPUT @Agte5052;":INIT:FP:IMM"

360 OUTPUT @Agte5052;"*TRG"

370 !

380 REPEAT

390 OUTPUT @Agte5052;":STAT:OPER:COND?"

400 ENTER @Agte5052;St

410 UNTIL BIT(St,4)=0

420 !

430 OUTPUT @Agte5052;"DISP:FP:TRAC:LIM:LINE ON"

440 OUTPUT @Agte5052;"DISP:FP:LIM:FSIG ON"

450 OUTPUT @Agte5052;"CALC:FP:TRAC:LIM:STAT ON"

460 PRINT "End"

470 ASSIGN @Agte5052 TO *

480 Prog_end: END