|
Integrating Femto 2000 Test
Code to a Teradyne Integra Test Program
Introduction
The purpose of this applications note is to explain how to utilize
the Femto 2000 Time Interval Analyzer to make direct, precision
time measurements on the Teradyne Integra (J750) platform.
Prerequisites:
- Training
on the Teradyne J750 test platform.
- Applications
training on the Femto 2000 TIA.
The J750 test platform is a Windows NT system that uses Teradyne's
IG-XL software for programming. The IG-XL software is similar to
Microsoft Excel through its file structure and it also allows the
user to add special functions to the test program through Microsoft's
Visual Basic programming language.
System Hardware Configuration:
There are two levels of system hardware configuration, the Femto
2000 and the J750. Femto 2000 Hardware Configuration The Femto 2000
can have up to a maximum of four sites with eight measurement channels.

Each site has two independent measurement channels and both channels
can be configured as single-ended or differential inputs. In addition,
the Femto 2000 comes with high bandwidth coaxial cables called the
GT_QuikConnect. The GT_QuikConnect has two sections, the cables
that mount to the Femto 2000 and the headers that mount to the Device
Interface Board (DIB). Each header has eight coaxial cables. A minimum
of three cable/header sets are needed to interface to the DIB, two
signal connectors and one arming connector. (See figure 1 and figure
2).


NOTE: Please consult GuideTech for details on DIB
design considerations.
J750 Hardware Configuration The J750 can be configured
up to 1024 pins, a number of utility pins, and power and ground
supplies. The Femto 2000 does not use up resources of the J750 in
order to function. You need to lay out the DIB to the desired tester
configuration.
NOTE: The J750 must have a GPIB card to communicate
with the Femto 2000.
System Software Configuration
Femto 2000 Software Configuration When the Femto 2000 is integrated
with other instruments, such as automatic test equipment (ATE),
it requires the user to install a platform-specific software
driver. This software driver is made from five files: · gt_drvr.c · gt_drvr.h · gt_host.c · gt_host.h
· A c dynamic-link-library file - f2000.dll These files have all
of the commands to program the Femto 2000 through GPIB. The software
driver also has a Visual Basic interface. The Visual Basic interface
is made up of: · A Visual Basic driver - GT_DRVR.bas · A Visual
Basic dynamic-link-library - F2000VB.dll. The F2000VB.dll provides
the necessary hooks to the c-file to program the Femto 2000 using
Visual Basic as the programming language. When compiling the Femto
2000 test code into the J750 test program, the Visual Basic interface
(F2000VB.dll) must be in the same directory as the source (name.xls)
J750 test program. How the Femto 2000 test code is added to the
J750 source program will be discussed later.
J750 Software Configuration
The Femto 2000 test code can be incorporated into
any revision of the IG-XL software. Therefore, no special considerations
are needed to incorporate the Femto 2000 test code. GPIB Configuration
The GPIB configuration needs to be set from the front panel of the
Femto 2000 to the address that the user specifies. The user can
specify addresses ranging from 1 to 30 (typical is between 1 and
7). The user can now specify this address in the test program to
communicate with the Femto 2000. Adding the Femto 2000 Test Modules
To add the Femto 2000 test code modules to the J750 test program
source code, you must go to the menu bar in IG-XL and select Tools/Macro/Visual
Basic Editor. (See figure 3). That will launch the Visual Basic
editor where IG-XL test code can be modified and the Femto test
can be added. Figure 3 - To Launch Visual Basic Editor The Femto
test code can be added to the J750 test program as a Visual Basic
module. To add a module, from the menu bar, go to Insert/Module.
A blank module will be inserted in to the test program. (See figure
4). To avoid compilation errors, always type the words Option Explicit.
The use of Option Explicit helps to avoid incorrectly
typing the name of an existing variable or to avoid confusion in
code where the scope of the variable is not clear. (See figure 4).
If used, the Option Explicit statement must appear in a module before
any procedures. When Option Explicit appears in a module, all variables
must be explicitly declared using the Dim, Private, Public, ReDim,
or Static statements. If you attempt to use an undeclared variable
name, an error occurs at compile time. If the Option Explicit statement
is NOT used, all undeclared variables are of Variant type unless
the default type is otherwise specified with a Deftype statement.
Figure 4 - To Add a Visual Basic Module When the module gets added
to the test program, its default name is Module. This is a meaningless
name to you and needs to be renamed. A module can be renamed from
the menu bar by selecting view/properties window. The properties
window indicates the current module you are in. You can enter a
meaningful name by clicking on the name, deleting it, and typing
in a new name that indicates the type of test being performed, i.e.,
GT_Frequency_Test. (See figure 5).

Once the module name has
been modified, the user can enter the necessary Femto 2000 test
code for the desired measurement type. The J750 has specific
functions called interpose functions. These functions enable
you to execute test code when a specific event has occurred in
the tester hardware. The list of pre-defined interpose functions
are as follows: · OnTesterInitialized() - Immediately
at the conclusion of the initialization process · OnProgramLoaded()
- Immediately at the conclusion of the load process · OnProgramValidated()
- Immediately at the conclusion of the validate process · OnTDRCalibrated()
- Immediately at the conclusion of the TDR calibration process ·
OnProgramStarted() - Immediately after "pre-job reset" when the
test program starts · OnProgramEnded() - Immediately prior to "post-job
reset" when the test program completes.
To begin programming, you must first initialize the
Femto 2000. The most appropriate place to enable the initializations
sequence of the Femto 2000 is in the OnTesterInitialized() interpose
function. When the tester is initialized, it will execute any test
code that is inside that particular function. Adding the Femto initialization
code to this function will not impact test times. (See figure 6).
Normally, you would execute a command checking for errors when
a read or measure function has been called. Because IG-XL does not
support all of the functions of Visual Basic, a special function
to check for errors was developed. This is an interim development
until further integration between IG-XL and Femto 2000 software
has been completed. The GtCheckErrors() function can be inserted
in the program and used in place of the original gt_check_errors()
function. (See code example 1).
Example 1
Public Function GtCheckErrors() As Long
Dim last_err As ERROR_DATA Call gt_get_last_err(last_err) If
last_err.code <> 0 Then ' MsgBox
last_err.msg, vbCritical, "Error" TheExec.Datalog.WriteComment ("Femto
2000 Error[" & Right$("0000000" & Hex$(last_err.code), 8) & "]:
" & last_err.msg) GtCheckErrors = GT_FAILURE End If GtCheckErrors
= GT_SUCCESS End Function
NOTE: Because IG-XL does not have an OnProgramUnloaded() interpose
function; the Femto 2000 command to close GPIB communications (gt_close)
does not get utilized. The Femto's initialization sequence will
reset GPIB communications.
Next, you can add specific test code for the Femto 2000 to make
precise, high-speed time measurements. For simplicity, three commands
can be used to operate the Femto 2000: gt_setup_[measurement](),
gt_start_measurement(), and gt_wait_and_read() the results. All
other commands and programming are essentially for error checking,
debug, data logging, and pattern execution. (See figure 7).

The data logging function of the J750 is handled by
TheExec.Datalog.WriteComment() command. (See code example 2).
Code Example 2 TheExec.Datalog.WriteComment
("CH_" & chan_name & " mean = " & Str(meas(index).mean / 1000000#)
& " MHz")
Modifying the J750-Integra
Test Program
Once the modules have been created to perform specific
measurements on the Femto 2000, you need to call the modules from
inside the J750 test program. Calling the modules from within the
test program involves inserting the module names at various points
in the test program. First, the test program needs to be modified.
The test program needs a test instance that identifies the test
to be performed by the Femto 2000. (See figure 8).

Next, all of the AC and DC parameters as well as
a new channel map need to be completed on the IG-XL software to
reflect the DIB and Femto 2000 specifications.
NOTE: The Teradyne J750 training course will instruct
the user how to do this. Once the additions have been made to the
test instance sheet, you need to insert the functions into the Functional
Instance Editor.
This allows you the freedom to call the functions
at various points in the program execution. (See figure 9). You
add the function names used for the Femto 2000 and place them in
the Interpose Function tab of the Functional Instance Editor. (See
figure 9-below).

As indicated before, the levels and timing also need
to be added to the Functional Instance Editor. (See figure 10-below).

Test Pattern Generation
The device under test (DUT) must be pre-conditioned
to generate continuous signals while the Femto 2000 is making measurements.
This is usually accomplished by modifying an existing device pattern
to enter an endless loop during the pattern. To use this method,
the Pattern Editor tool is used to insert a loop and halt into an
existing pattern. A pattern label is then created for the new loop
pattern. In addition, where the user has the specific Femto test
code, the IG-XL command Call thehdw.Digital.Patgen.Continue(0, 1),
will start the pattern looping, make the measurements, and then
stop the sequencer.
This command must be inserted before the measurement
results are read from the Femto. In addition, a trigger channel
may need to be inserted into the test patterns to allow for external
ARMING of the Femto 2000. Error Recovery The test system may occasionally
hang up during test development, especially if the endless loop
pattern is not terminated correctly within the test program. Recovery
from this type of error is similar to an error recovery within the
Windows operating system. This can be accomplished by pressing Ctrl-Alt-Del.
The Windows task manager pop-up indicates which applications are
running. Pressing the end-task button can stop the portion of the
IG-XL application that is not responding.
|