Tektronix Logic Analyzer Family: Pattern Generator Programmatic Interface (PPI) Manual
Tektronix Logic Analyzer Family: Pattern Generator Programmatic Interface (PPI) Manual
Tektronix Logic Analyzer Family: Pattern Generator Programmatic Interface (PPI) Manual
Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in
this publication supercedes that in all previously published material. Specifications and price
change privileges reserved.
The Tektronix Pattern Generator application is called the server and the user program is called
the client.
• Case 1 shows the user program is running on the Tektronix Pattern Generator and
communicates with the Tektronix Pattern Generator application using Microsoft COM.
• Case 2 shows the user program running on another PC and communicating with the
Tektronix Pattern Generator via Microsoft DCOM (Distributed COM).
• Case 3 shows the user program is running on a UNIX workstation and communicates
with the Tektronix Pattern Generator application via DCOM provided by a third party
vendor. In either of these cases, the user program may talk to other instruments
using whatever means required.
The user program may be written in any language or programming environment that supports
COM. Some examples are Visual C++ and Visual Basic.
General Characteristics
Some general characteristics of the programmatic interface are as follows:
• All of the exported server interfaces are dual interfaces (they support static and dynamic
binding).
• The application must be fully initialized before a client attempts to connect to it. This
includes dismissing any diagnostic errors that occur at startup time.
• If a client attempts to connect to the application before it is fully initialized, it will receive an
error indicating result in an Error "access is denied".
• Local clients running on the TLA 700 will connect to an existing instance of the server, if
there is one. If the server is not already running, it will be launched automatically.
Remote clients can hide the server’s main window via PPI. If the window is visible, users
can directly interact with the Tektronix Pattern Generator server application. The main
window status will have indicator to shown that a client is connected.
• The Tektronix Pattern Generator server application will not be terminated at the end of a
client connection. The server window is always made visible when all clients have
disconnected.
• PPI will operate within the main thread of the application.
Setting up PPI
Tektronix Pattern Generator Server. A separate installation program is not necessary to set up
PPI on the TLA 700.
The Tektronix PG application installation program will perform the necessary setup install and
configure the PPI.
Remote Clients. There will be a separate installation program to set up PPI on remote client
machines running Microsoft Windows NT/95/98 clients.
If customers are running clients on Microsoft Windows 95 machines, they must install DCOM for
Microsoft Windows 95 on their client machine. Please refer to Appendix A on instructions on
setting up remote Windows 95 clients.
Application. The user creates an Application object to initially connect to the application and to
subsequently obtain a reference to a System object. The Application object exports a single
interface called IPGApplication.
System. The System object provides methods for configuration, run control and save and load
operations. Every client must obtain a reference to a System object before they can obtain
references to module objects. The System object exports a single interface called IPGSystem.
Module. The Module object provides methods for module configuration, and obtaining PG
statistics. Module object export a single interface called IPGModule.
Unless otherwise specified, all methods are synchronous and wait for the completion of the
operation before returning.
We will use install directory to refer to the directory where PPI client has been installed on your
client machine. This directory is C:\Program Files\ Tektronix Pattern Generator by default.
The type library to be used with PPI is Tlapg.tlb. After you have finished the following setup
procedure, this file will be located in C:\Program Files\ Tektronix Pattern Generator \System\PPI
on the TLA 700 and in install directory\System\PPI on your PPI client machine.
Click the Connect button to see if the client can connect to the Tektronix Pattern Generator.
Share-level access allows a password to be assigned to each shared resource. User-level access
allows a group of users to have access to each shared resource. For Microsoft Windows 98 only
networks, share-level access is the only option.
Choose between share-level access and user-level access and perform the following steps:
NOTE: For PPI to work with share-level access, authentication is turned off and any COM client
can call into a COM server running on the Tektronix Pattern Generator.
You can switch between user-level and share-level access later by redoing the procedure from
Step 3 onwards.
http://www.microsoft.com/com/dcom95/download-f.htm:
The version of DCOM for Microsoft Windows 95 that was tested with PPI was 1.1
Dcomcnfg will run only if user-level access is enabled. See the following step.
You must use share-level or user-level access as chosen for the Tektronix Pattern Generator.
This is done in the Control Panel>Network>Access Control page.
Share-level access
1. In Control Panel>Network>Access Control, choose share-level access.
2. Re-boot the machine.
3. Double-click install directory\System\PPI\Share Level Access Client.reg
4. Re-boot the machine.
User-level access
1. In Control Panel>Network>Access Control, choose user-level access control and
enter the name of the domain that will be used to validate user access.
2. Re-boot the machine.
3. Double-click install directory\System\PPI\User Level Access Client.reg
4. Re-boot the machine.
HKEY_CLASSES_ROOT\AppID\{ EF9B47D6-99AD-11d3-A413-0004ACAEB013 }
3. Using Edit>New>StringValue, add a named value RemoteServerName.
4. Click on the new value RemoteServerName and select Edit>Modify.
5. Enter the name of the TLA 700 machine as its value.
You can switch between user-level and share-level access later by uninstalling Tektronix PPI
Client and DCOM95 via the Control Panel and redoing the procedure from Step 2 onwards.
Share-level access
Do the following steps if you have share access enables:
1. In Control Panel>Network>Access Control, choose share-level access.
2. Re-boot the machine.
3. Double-click install directory\System\PPI\Share Level Access Client.reg
4. Re-boot the machine.
User-level access
Do the following steps:
1. In Control Panel>Network>Access Control, choose user-level access control and
enter the name of the domain that will be used to validate user access.
2. Re-boot the machine.
3. Double-click install directory\System\PPI\User Level Access Client.reg
4. Re-boot the machine.
HKEY_CLASSES_ROOT\AppID\{ EF9B47D6-99AD-11d3-A413-0004ACAEB013 }
3. Using Edit>New>StringValue, add a named value RemoteServerName.
4. Click on the new value RemoteServerName and select Edit>Modify.
5. Enter the name of the TLA 700 machine as its value.
Registering/Unregistering PPI
Server side Registration/UnRegistration
The server side needs both tlapg server and tlapg proxy/stub dll has to be registered from
command line.
When the registration is complete open the DCOMCNFG tool from command line and select the
tlapg properties.
Also the Windows 95/98 registry needs two entries for DCOM enabling.
EnableDCOM ‘Y’
EnableRemoteClient ‘Y’
Once the Application object has been created, the client can call methods on it to get references
to System and Module objects.
Samples
As mentioned previously, all of the interfaces exported by the server are dual interfaces for
example, they support static and dynamic binding.
Click on one of the following buttons to show the use of dual binding. The rest of the code
samples in this document use the dispatch portion of each dual interface (dynamic binding).
End Sub
End Sub
Dim S As String
Dim Data As Variant
End Sub
End Sub
Errors
All methods in all interfaces of PPI return an HRESULT (or SCODE). Refer to tlapgerror.h for
possible error codes.
When a method returns an error, output arguments are undefined and should not be used.
Messages
Tektronix Pattern Generator Application has instances where the user is asked to confirm a
particular operation. For example, before loading a system, the user is asked whether the current
system should be saved before the load operation. Since it is not possible to ask questions
through the programmatic interface, the application will always proceed with the original operation
as though the question were never asked. In the previous example, the load operation would
proceed without saving the current system.
For example, consider a system configuration consisting of a TLA720 benchtop mainframe with 2
expansion frames each containing 13 slots. The slot numbers would be as follows:
Mainframe: Slots 0-12
Expansion 1: Slots 13-25
Expansion 2: Slots 26-38
NOTE:
• Output arguments are not defined and should not be used if the HRESULT return code
indicates an error.
• Unless otherwise specified, all methods are synchronous and wait for the completion of the
operation before returning.
• All the examples in the reference section use the dispatch portion of each dual interface.
Quick Reference
This section contains a quick reference for the objects and methods in the TLA PG Programmatic
Interface. These methods are described in more detail in the Reference section.
Application Object
IPGApplication
System Object
IPGSystem
Configuration Functions:
Module Object
IPGModule
Description:
This method returns the interface pointer for the System object.
IDL Syntax:
Arguments:
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
Remarks:
This method returns the number of slots in the TLA700 mainframe that
can be occupied by instrument modules.
IDL Syntax:
Arguments:
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
Remarks:
The value returned is 4 for the portable mainframes (TLA704 and TLA14).
It is 11 for the TLA711 and 10 for the TLA720 (Slots used by the
benchtop controller are not included).
This method returns the number of the first slot in the TLA700
mainframe that can be occupied by an instrument module.
IDL Syntax:
Arguments:
pSlot - The number of the first slot in the mainframe that can be
occupied by an instrument module.
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
Remarks:
The value returned is the slot number of the first slot that can be
occupied by a module. This slot may or may not be currently occupied.
This slot number is 1 for the portable mainframes (TLA704 and TLA714).
It is 2 for the TLA711 and 3 for the TLA720 because the first few slots
are occupied by the controller module.
IDL Syntax:
Arguments:
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
Remarks:
The TLA700 server will allocate the space for the returned string.The
client is responsible for freeing it when it is no longer in use.
IDL Syntax:
Arguments:
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
Remarks:
The TLAPG server will allocate the space for the returned string The
client is responsible for freeing it when it is no longer in use.
IDL Syntax:
Arguments:
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
…
‘Get description of module in slot 3.
ModDesc = Sys.GetModulePropertiesBySlot(3)
For modules that occupy more than one slot, the same string will be
returned for each of its slots.
The TLAPG server will allocate the space for the returned string.The
client is responsible for freeing it when it is no longer in use.
This method returns the type of the physical module in the specified
slot.
IDL Syntax:
Arguments:
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
Remarks:
For instrument modules that occupy more than one slot, the same module
type will be returned for each of its slots.
Description:
This method returns the interface pointer for the logical module in the
specified slot.
IDL Syntax:
Arguments:
Slot - The slot number. This can correspond to any of the slots
occupied by the logical module.
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
…
This method returns the interface pointer for the logical module with
the specified name. The module name should be as specified in the
TLAPG System window.
IDL Syntax:
Arguments:
ModuleName - The user name of the required module. This is the name
that you would see in the System Window.
ppDispatch - The interface pointer for the module with the specified
name.
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
…
‘Get module.
Set PG = Sys.GetModuleByName("PG 1")
Remarks:
This method retrieves the names of all logical modules in the system.
IDL Syntax
Arguments
Example
Visual Basic
Next M
Remarks:
This method loads the Pattern Generator application with the specified
pattern generator system file.
IDL Syntax:
Arguments:
Examples:
Visual Basic
Remarks:
All file paths without machine qualifiers refer to drives mapped on the
TLA 700.
IDL Syntax:
Arguments:
SystemPath - The full path to the TLA PG system file to save to.
Eg: "C:\My Documents\System1.tpg"
UserComment – The user comment to be saved in the file.
SaveData - This flag takes one of the following values:
Value Description
TLAPG_SAVE_NO_DATA (0) Do not save program data in file.
TLAPG_SAVE_DATA (1) Save program data in file.
Examples:
Visual Basic
Remarks:
All file paths without machine qualifiers refer to drives mapped on the
TLA 700. If the file already exists, it will be overwritten.
IDL Syntax:
HRESULT Run()
Arguments:
None
Examples:
Visual Basic
Remarks:
This method starts the pattern generation operation but does not wait
for it to complete before returning. After calling this method, the
method IPGSystem::GetRunStatus() can be used to find out the current
run status of the system.
Description:
IDL Syntax:
HRESULT Stop()
Arguments:
None
Examples:
Visual Basic
Remarks:
This method issues a request to stop the system but does not wait for
the stop operation to complete. After calling this method, the method
IPGSystem::GetRunStatus() can be used to find out the current run
status of the system.
Description:
IDL Syntax:
Arguments:
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
…
‘Start pattern generation and wait until it is complete.
Sys.Run
Do
RunStatus = Sys.GetRunStatus
Loop While (RunStatus = 0)
Remarks:
IDL Syntax:
Arguments:
Examples:
Visual Basic
Remarks:
Invoking this method will not result in a merge operation even if the
destination module does not have enough channels/physical modules.
All file paths without machine qualifiers refer to drives mapped on the
TLA 700.
IDL Syntax:
Arguments:
ModulePath - The full path to the TLA PG module file to save to.
Eg: "C:\My Documents\My Module.tpg"
UserComment – The user comment to be saved in the file.
SaveData - This flag takes one of the following values:
Value Description
TLAPG_SAVE_NO_DATA (0) Do not save program data in file.
TLAPG_SAVE_DATA (1) Save program data in file.
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
…
Remarks:
All file paths without machine qualifiers refer to drives mapped on the
TLA 700. If the file already exists, it will be overwritten.
Description:
This method imports pattern data from an ASCII text file onto a
particular Block.
IDL Syntax:
Arguments:
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
…
All file paths without machine qualifiers refer to drives mapped on the
TLA 700.
Description:
IDL Syntax:
Arguments:
Value Description
TLA_FORMAT (0) Tektronix TLA Data Exchange Format.
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
…
Remarks:
All file paths without machine qualifiers refer to drives mapped on the
TLA 700. If the file already exists, it will be overwritten.
Description:
IDL Syntax:
Arguments:
Value Description
TLAPG_HIDE_WINDOW (0) Hide the server window.
TLAPG_SHOW_WINDOW (1) Show the server window.
Examples:
Visual Basic
Remarks:
Description:
This method sets the Clocking mode to Internal or External for this
module.
IDL Syntax:
Arguments:
Value Description
TLAPG_INTERNAL_MODE (0) Internal
TLAPG_EXTERNAL_MODE (1) External
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
…
This method sets the internal clock period for this module.
IDL Syntax:
Arguments:
Period - Clock period in string format. For example, if you want to set
the clock period to 10.56 ns, then the clock period string should be
"10.56ns".
Channel
Min Max Resolution
Mode
Full 7.4626865ns (134MHz) 2.0000000s (0.5Hz) 8digit
Half 3.7313432ns (268MHz) 1.0000000s (1Hz) 8digit
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
…
Description:
This method sets the external clock threshold for this module.
IDL Syntax:
Arguments:
Value Description
Threshold -2.56V to 2.54V (20mV step)
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
…
This method sets the external clock polarity for this module.
IDL Syntax:
Arguments:
Value Description
TLAPG_POLARITY_NORMAL (0) Normal
TLAPG_POLARITY_INVERT (1) Invert
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
…
‘Get module in slot 3.
Set PG = Sys.GetModuleBySlot(3)
This method sets the output level for a probe for this module.
IDL Syntax:
Arguments:
Value Description
Level 2.0V to 5.5V (for TTL/CMOS Probes only).
A, B, …for single module.
Probe
1A, 2B in case of merged modules.
Examples:
Visual Basic
‘Get system.
Set Sys = App.GetSystem
…
This method retrieves the names of all groups defined in the module
setup.
IDL Syntax:
Arguments:
Example:
Visual Basic
Remarks:
IDL Syntax:
Arguments:
Example:
Visual Basic
GroupSize = PG.GetGroupSize( G )
Next G
Remarks:
Please note that this method returns the actual number of channels in
the specified group.
This method retrieves the names of the channels defined in the group.
IDL Syntax:
Arguments:
Example:
Visual Basic
Remarks:
Example : Data[31:0](Hex)
Rules:
1. If Radix is not specified, it will be assumed as HEX.
2. If no channel and radix information are present, it will not be treated as a group. (Ex:
Sample[], Timestamp[])
3. If no channel information is present but Radix is present, the number of channels for
that group will be assumed as '1'.
4. Radix formats supported are Binary, Octal, Decimal and Hex. Radix can be specified in
the column header using the first three characters. For example, BIN, OCT, DEC or
HEX.
5. Number of channels = MSB - LSB + 1
In this example,
GroupName : Data
No. of channels : 32 ( 31 - 0 + 1 )
Radix : HEX