Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication
supersedes that in all previously published material. Specifications and price change privileges reserved.
TEKTRONIX and TEK are registered trademarks of Tektronix, Inc.
Contacting Tektronix
Tektronix, Inc.
14200 SW Karl Braun Drive
P.O . B o x 5 00
Beaverto
USA
For product information, sales, service, and technical support:
n, OR 97077
In North America, call 1-800-833-9200.
Worl d wide , vis it www.tektronix.com to find contacts in your area.
Tektronix Pattern Generator PPI ManualPage 4 of 56
Deprecated
Introduction
The Tektronix Pattern Generator Programmatic Interface (PPI) is based on Microsoft’s
Component Object Model (COM). It gives the Tektronix Pattern Generator the ability to be
controlled from a separate user program running on the Tektronix Pattern Generator or on a
remote host. PPI provides the ability to control the pattern generator modules to be controlled by
third party applications. The following diagram shows the different ways this can be achieved.
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.
Tektronix Pattern Generator PPI Manual Page 5 of 56
Deprecated
Because of restrictions imposed by Microsoft Windows 98, remote clients can’t launch
the server automatically. The server needs to be explicitly started to initiate COM
connection.
•When a client connects to the Tektronix Pattern Generator server application, the main
window of the server application will be visible.
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.
Tektronix Pattern Generator PPI ManualPage 6 of 56
Deprecated
Deliverables
You will be provided with the following:
• Tektronix Pattern Generator executable that exports COM interfaces
• PPI documentation in online help
• Type library
• Header files for interface and error codes
• Auxiliary scripts/programs/instructions to set up DCOM on a client machine
• Sample client applications using Visual C++, Visual Basic and perhaps other
languages.
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.
Objects and Interfaces
The programmatic interface for the Tektronix Pattern Generator consists of three kinds of objects,
Application, System, and Module.
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.
Tektronix Pattern Generator PPI Manual Page 7 of 56
Deprecated
Setting up PPI
This document describes the steps you need to take to set up PPI.
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.
Client application on the TLA 700
No special setup is required if the Tektronix Pattern Generator application has already been
installed.
Do the following to demonstrate PPI:
1. Start the Tektronix Pattern Generator application on the TLA 700.
Click the Connect button to see if the client can connect to the Tektronix Pattern Generator.
Client application across the network
Do the following steps:
1. Install and configure TCP/IP.
2. You may choose to have share-level or user-level access to the TLA 700 as provided
by Microsoft Windows 98. This is done in the Control Panel>Network>Access Control
page.
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.
Share level access
Do the following steps:
1. In Control Panel>Network>Access Control, choose share-level access.
Tektronix Pattern Generator PPI ManualPage 8 of 56
Deprecated
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.
Start the Tektronix Pattern Generator application on the TLA.
You can switch between user-level and share-level access later by redoing the procedure from
Step 3 onwards.
Client machine using Microsoft Windows NT
Note: The user requires administrative privileges to perform this setup.
1. Install and configure TCP/IP.
2. Run the Tektronix PPI Client install program supplied with the Tektronix Pattern
Generator.
3. Depending on the type of access control you chose for the Tektronix Pattern
Generator, double-click install dir ectory\System\PPI\Share Level Access Client.reg or
User Level Access Client.reg
4. Re-boot the client machine.
5. Run dcomcnfg.
6. Double-click Tlapg in the Applications page.
7. In the Location page, check the Run application on the follow ing computer box. Enter
the name of the TLA 700 machine in the edit field.
To verify that setup is complete:
1. Run ins tall directory \Samples\PPI Samples\Vc++\test client\testclient.exe on the client
machine.
2. Click the Connect button to see if the client can connect to the TLAPG. (The first time
you connect it may take a few minutes.)
Client machine using Microsoft Windows 95
Do the following steps:
1. Install and configure TCP/IP.
2. Run the Tektronix PPI Client install program supplied with the Tektronix Pattern
Generator.
3. Download and install the following from Microsoft's web site. Re-boot after each
installation.
•Distributed COM for Microsoft Windows 95 (DCOM95)
Tektronix Pattern Generator PPI Manual Page 9 of 56
Deprecated
•Dcomcnfg (DCOM configuration utility)
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 ins tall dir ec tor y \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 ins tall dir ec tor y \System\PPI\User Level Access Client.reg
4. Re-boot the machine.
Do the following steps if you have user-level access enabled:
1. Run dcomcnfg.
2. Double-click Tektronix Pattern Generator Application in the Applications page.
3. In the Location page, uncheck the Run application on this computer box and check
the R un application on the followin g computer box. Enter the name of the TLA 700
machine in the edit field.
Do the following steps if you have share-level access enabled:
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.
Do the following to verify that setup is complete:
1. Run install directory\Samples\PPI Samples\Vc++\test client\testclient.exe on the client
machine.
2. Click the Connect button to see if the client can connect to the TLAPG.
(The first time you connect it may take a few minutes.)
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.
Tektronix Pattern Generator PPI ManualPage 10 of 56
Deprecated
Client machine using Microsoft Windows 98
Do the following steps if using Microsoft Windows 98:
1. Install and configure TCP/IP.
2. Run the Tektronix PPI Client install program supplied with the Tektronix Pattern
Generator.
3. 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
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 ins tall dir ec tor y \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 ins tall dir ec tor y \System\PPI\User Level Access Client.reg
4. Re-boot the machine.
Do the following if you have user-level access enabled:
1. Run dcomcnfg.
2. Double-click Tektronix Pattern Generator Application in the Applications page.
3. In the Location page, uncheck the Run application on this computer box and check
the Run application on the following computer box. Enter the name of the TLA 700
machine in the edit field.
Do the following if you have share-level access enabled:
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.
Do the following to verify that setup is complete:
1. Run install directory\Samples\PPI Samples\Vc++\test client\testclient.exe on the client
machine.
2. Click the Connect button to see if the client can connect to the TLAPG. (The first time
you connect it may take a few minutes.)
Tektronix Pattern Generator PPI Manual Page 11 of 56
Deprecated
You can switch between user-level and share-level access later by redoing the procedure from
Step 3 onwards.
Client machine using other platforms
If the client application requires use of the type library, it may be generated on your platform using
Tlapg.IDL in C:\Program Files\Tektronix Pattern Geneartor\System\PPI\src on the TLA 700.
Make sure you perform the following steps:
1. Ensure that DCOM is working on your platform.
2. Merge
C:\Program Files\ Tektronix Pattern Generator\System\PPI\Client.reg on the TLA 700
into your registry.
3. Depending on the type of access control you chose for the Tektronix Pattern
Generator, merge
C:\Program Files\ Tektronix Pattern Generator\System\PPI\Share Level Access
Client.reg or User Level Access Client.reg on the TLA 700 into your registry.
4. Add a string value named RemoteServerName to the key
HKEY_CLASSES_ROOT\AppID\{EF9B47D6-99AD-11d3-A413-0004ACAEB013 }
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.
Do the following to register the server:
Tlapg /RegServer from command line of appropriate directory
Do the following to Unregister the server:
Tlapg /UnregServer from command line of appropriate directory
Do the following to register the proxy/stub dll:
Regsvr32 Tlapgproxy .dll
Do the following to Unregister the proxy/stub dll
Regsvr32 /u Tlapgproxy .dll
Client side Registration
Client side registration also needs both of the above command lines.
When the registration is complete open the DCOMCNFG tool from command line and select the
tlapg properties.
Tektronix Pattern Generator PPI ManualPage 12 of 56
Deprecated
To set the location of component running from "Run application from the following computer"
option. Also give the remote machine name. In identity page select "interactive user" option.
Other Issues with DCOM
If the server ( Tlapg ) is going to run in Windows 95/98 DCOM software should be installed prior
to run any DCOM application and also the Server part should be started first before any clients
get connected to it.
Also the Windows 95/98 registry needs two entries for DCOM enabling.
EnableDCOM ‘Y’
EnableRemoteClient ‘Y’
Both of these entries should be done in the following:
HKEY_LOCAL_MACHINE\Microsoft\Ole directory in registry
Tektronix Pattern Generator PPI Manual Page 13 of 56
Deprecated
Connecting to the Tektronix Pattern Generator
Application (Server)
Client applications connect to the Tektronix Pattern Generator server by creating an Application
object. For example, in Visual Basic,
‘Establish connection to TLA PG.
Dim App As Object
Set App = CreateObject("Tlapg.Application")
Once the Application object has been created, the client can call methods on it to get references
to System and Module objects.
Disconnecting from the Tektronix Pattern
Generator Server
A client application that has connected to the TLAPG server may disconnect by deleting the
reference to the Application object. For example, in Visual Basic,
‘Disconnect from TLA PG.
Set App = Nothing
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).
Sample Visual Basic Client (Dispatch) on page 15
Sample Visual Basic Client (Vtable) on page 16
Other Samples on page 17
Tektronix Pattern Generator PPI ManualPage 14 of 56
Deprecated
Sample Visual Basic Client (Dispatch)
Run
End Sub
Private Sub Run()
‘Do pattern generation. Wait for it to complete.
System.Run
Do
Status = System.GetRunStatus
Loop While (Status = 0)
End Sub
Tektronix Pattern Generator PPI Manual Page 15 of 56
Deprecated
Sample Visual Basic Client (Vtable)
The above client sample has been repeated below, using the vtable part of the dual interfaces.
Dim App As IPGApplication
Dim System As IPGSystem
Dim LA As IPGModule
Dim Status As Long
Dim S As String
Dim Data As Variant
Private Sub Form_Load()
'Connect to server.
Set App = CreateObject("Tlapg.Application ")
'Get system pointer.
Set System = App.GetSystem
'NOTE: To load a system, fill in system path.
System.LoadSystem("<path>")
'Run pattern generation.
Run
End Sub
Private Sub Run()
'Do pattern generation. Wait for it to complete.
System.Run
Do
Status = System.GetRunStatus
Loop While (Status = 0)
End Sub
Tektronix Pattern Generator PPI ManualPage 16 of 56
Deprecated
Other Samples
For sample client programs, go to Start > Programs > Tektronix Pattern Generator > PPI
Samples.
Errors
All methods in all interfaces of PPI return an HRESULT (or SCODE). Refer to tlapgerror.h for
possible error codes.
Additional error information is communicated as follows:
•Objects that use the dispatch portion of the dual interface can use the exception
information argument of the Invoke method.
•Objects that use the Vtable portion of the dual interface can use error objects. When an
HRESULT indicates an error, the client can call the standard function GetErrorInfo() to get
more detailed information about the error.
When a method returns an error, output arguments are undefined and should not be used.
Refer to the sample programs for examples on handling errors.
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.
Slot Numbers and Expansion Mainframes
In PPI, the slot numbers for expansion mainframes are specified by extending the slot numbers
for the mainframe.
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:
Tektronix Pattern Generator PPI Manual Page 17 of 56
Deprecated
Reference
This is a reference for all the objects and interfaces supported by the TLA PG Programmatic
Interface.
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.
Go to page 7 for information about objects and interfaces.
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
HRESULT GetSystem( ppDispatch ) (see page 20 )
HRESULT ShowWindow( Show ) (see page 46 )
System Object
IPGSystem
Configuration Functions:
HRESULT GetNumModuleSlots( pNumSlots ) (see page 21 )
HRESULT GetFirstModuleSlot( pSlot ) (see page 22 )
HRESULT GetSWVersion( pVersion ) (see page 23 )
HRESULT GetDiagnosticsStatus( pDiagStatus ) (see page 24 )
HRESULT GetModuleTypeBySlot( Slot, pModuleType ) (see page 27 )
HRESULT GetModulePropertiesBySlot( Slot, pModuleProperties ) (see page 25 )
HRESULT GetModuleBySlot( Slot, ppDispatch ) (see page 29 )
HRESULT GetModuleByName( ModuleName, ppDispatch ) (see page 31 )
HRESULT GetModuleNames (ModuleName) (see page 32 )
Load & Save Functions:
HRESULT LoadSystem( SystemPath ) (see page 33 )
Tektronix Pattern Generator PPI ManualPage 18 of 56
Deprecated
HRESULT SaveSystem( SystemPath, UserComment, SaveData ) (see page 35 )
Run Control & Status Functions:
HRESULT Run() (see page 36 )
HRESULT Stop() (see page 37 )
HRESULT GetRunStatus( pRunStatus ) (see page 38 )
Module Object
IPGModule
Load & Save Functions:
HRESULT LoadModule( ModulePath, ModuleName ) (see page 39 )
HRESULT SaveModule( ModulePath, UserComment, SaveData ) (see page 40 )
Export & Import Functions:
HRESULT Import( ImportFilePath, BlockNo ) (see page 42 )
HRESULT Export( ExportFilePath, BlockNo ) (see page 44 )
Module Configuration Functions:
HRESULT SetClockMode (Mode) (see page 47 )
HRESULT SetClockPeriod (Period) (see page 48 )
HRESULT SetClockThreshold (Threshold) (see page 49 )
HRESULT SetClockPolarity (Polarity) (see page 50 )
HRESULT SetOutputLevel (Level, Probe) (see page 51 )
HRESULT GetGroupNames ( GroupName ) (see page 52)
HRESULT GetGroupSize ( GroupSize ) (see page 53)
HRESULT GetProbeChannelNames ( GroupName, ProbeChlName ) (see page 54 )
Tektronix Pattern Generator PPI Manual Page 19 of 56
Deprecated
Listing of Methods
IPGApplication::GetSystem
Description:
This method returns the interface pointer for the System object.
pNumSlots - The number of instrument module slots in the mainframe.
HRESULT Return Codes:
Return CodeDescription
S_OKThe operation succeeded.
TLAPG_E_FAILEDThe operation was unsuccessful.
Examples:
Visual Basic
Dim App As Object
Dim Sys As Object
Dim NumModuleSlots As Long
Set App = CreateObject("Tlapg.Application")
‘Get system.
Set Sys = App.GetSystem
‘Get number of module slots.
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).
NumModuleSlots = Sys.GetNumModuleSlots
Tektronix Pattern Generator PPI Manual Page 21 of 56
Deprecated
IPGSystem::GetFirstModuleSlot
Description:
This method returns the number of the first slot in the TLA700
mainframe that can be occupied by an instrument module.
The diagnostics status can take one of the following values: "Running"
or "Pass" or "Fail"
HRESULT Return Codes:
Return CodeDescription
S_OKThe operation succeeded.
TLAPG_E_FAILEDThe operation was unsuccessful.
Examples:
Visual Basic
Dim App As Object
Dim Sys As Object
Dim Status As String
Set App = CreateObject("Tlapg.Application")
‘Get system.
Set Sys = App.GetSystem
‘Get diag status.
Status = Sys.GetDiagnosticsStatus
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.
Tektronix Pattern Generator PPI ManualPage 24 of 56
Deprecated
IPGSystem::GetModulePropertiesBySlot
Description:
This method returns the properties of the physical module in the
specified slot.
IDL Syntax:
HRESULT GetModulePropertiesBySlot( [in] long Slot, [out, retval] BSTR*
pModuleProperties )
Arguments:
Slot - The physical slot number
pModuleProperties - The properties of the physical module in the
specified slot. This is of the format shown below. Fields are included
as they apply."<manufacturer>,<model>,<firmware version>,<power- on
diagnostics status>,<speed>,<memory depth>"
TLAPG_E_OUT_OF_MEMORY
TLAPG_E_FAILEDThe operation was unsuccessful.
Examples:
Visual Basic
Dim App As Object
Dim Sys As Object
Dim ModType As Long
Tektronix Pattern Generator PPI Manual Page 27 of 56
There is not enough memory to
perform the operation.
Deprecated
Set App = CreateObject("Tlapg.Application")
‘Get system.
Set Sys = App.GetSystem
‘Get type of module in slot 3.
ModType = Sys.GetModuleTypeBySlot(3)
Remarks:
For instrument modules that occupy more than one slot, the same module
type will be returned for each of its slots.
Refer to the section Slot Numbers and Expansion Mainframes on page 17
for information on how to specify slot numbers with expansion
mainframes.
Tektronix Pattern Generator PPI ManualPage 28 of 56
Deprecated
IPGSystem::GetModuleBySlot
Description:
This method returns the interface pointer for the logical module in the
specified slot.
IDL Syntax:
HRESULT GetModuleBySlot( [in] long Slot, [out, retval] IDispatch**
ppDispatch )
Arguments:
Slot - The slot number. This can correspond to any of the slots
occupied by the logical module.
ppDispatch - The interface pointer for the module in the specified
slot.
HRESULT Return Codes:
Return CodeDescription
S_OKThe operation succeeded.
TLAPG_E_EMPTY_SLOTThe specified slot is empty.
TLAPG_E_UNKNOWN_MODULE
TLAPG_E_INVALID_SLOT_NUMBERInvalid "Slot" argument.
TLAPG_E_OUT_OF_MEMORY
TLAPG_E_FAILEDThe operation was unsuccessful.
The module in the specified slot is
not recognized.
There is not enough memory to perform
the operation.
Examples:
Visual Basic
Dim App As Object
Dim Sys As Object
Dim PG As Object
Set App = CreateObject("Tlapg.Application")
‘Get system.
Set Sys = App.GetSystem
…
‘Get module in slot 3.
Set PG = Sys.GetModuleBySlot(3)
Tektronix Pattern Generator PPI Manual Page 29 of 56
Deprecated
Remarks:
Module references obtained via this method are invalidated by
operations like IPGSystem::LoadSystem() that affect the logical modules
in the system. Remember to release any module references before
performing such operations.
Tektronix Pattern Generator PPI ManualPage 30 of 56
Deprecated
IPGSystem::GetModuleByName
Description:
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.
TLAPG_E_OUT_OF_MEMORY
TLAPG_E_FAILEDThe operation was unsuccessful.
There is not enough memory to perform
this operation.
Examples:
Visual Basic
Dim App As Object
Dim Sys As Object
Dim PG As Object
Set App = CreateObject("Tlapg.Application")
‘Get system.
Set Sys = App.GetSystem
…
‘Get module.
Set PG = Sys.GetModuleByName("PG 1")
Remarks:
Module references obtained via this method are invalidated by
operations like IPGSystem::LoadSystem() that affect the logical modules
in the system. Remember to release any module references before
performing such operations.
Tektronix Pattern Generator PPI Manual Page 31 of 56
Deprecated
IPGSystem::GetModuleNames
Description
This method retrieves the names of all logical modules in the system.
Module names are returned as a VARIANT. The variant is of type VT_ARRAY
and points to a SAFEARRAY. The SAFEARRAY has dimension 1 and its
elements are of type VT_BSTR. The number of modules is equal to the
number of elements in the SAFEARRAY.
TLAPG_E_SYSTEM_RUNNIG
TLAPG_E_FAILEDThe operation was unsuccessful.
An error occurred while opening the
file for reading.
The system configuration in the file
does not match the current hardware
configuration.
An error occurred retrieving
information from the file during the
load operation.
The operation cannot be performed when
the system is running.
Examples:
Visual Basic
Dim App As Object
Dim Sys As Object
Set App = CreateObject("Tlapg.Application")
‘Get system.
Set Sys = App.GetSystem
…
‘Load system.
Sys.LoadSystem "C:\My Documents\System1.tpg"
Remarks:
All file paths without machine qualifiers refer to drives mapped on the
TLA 700.
Focus may be transferred to the TLA PG application window
whenLoadSystem() is invoked.
Tektronix Pattern Generator PPI Manual Page 33 of 56
Deprecated
Client applications need to take this into account.
Tektronix Pattern Generator PPI ManualPage 34 of 56
Deprecated
IPGSystem::SaveSystem
Description:
This method saves the Pattern Generator system to a file.
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:
ValueDescription
TLAPG_SAVE_NO_DATA (0)Do not save program data in file.
TLAPG_SAVE_DATA (1)Save program data in file.
HRESULT Return Codes:
Return CodeDescription
S_OKThe operation succeeded.
TLAPG_E_SAVE_ERRORAn error occurred during the save operation.
TLAPG_E_SYSTEM_RUNNING
TLAPG_E_FAILEDThe operation was unsuccessful.
Examples:
Visual Basic
Dim App As Object
Dim Sys As Object
Set App = CreateObject("Tlapg.Application")
‘Get system.
Set Sys = App.GetSystem
‘Save system with data.
Sys.SaveSystem "C:\My Documents\a.tpg", "My system", 1
Remarks:
The operation cannot be performed when the
system is running.
All file paths without machine qualifiers refer to drives mapped on the
TLA 700. If the file already exists, it will be overwritten.
Tektronix Pattern Generator PPI Manual Page 35 of 56
Deprecated
IPGSystem::Run
Description:
This method starts the pattern generation operation.
TLAPG_E_NO_ENABLED_MODULES
TLAPG_E_FAILEDThe operation was unsuccessful.
The system cannot be performed as the
system is running.
There are no enabled modules in the
current system.
Examples:
Visual Basic
Dim App As Object
Dim Sys As Object
Dim RunStatus As Long
Set App = CreateObject("Tlapg.Application")
‘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:
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.
Tektronix Pattern Generator PPI ManualPage 36 of 56
Deprecated
IPGSystem::Stop
Description:
This method stops the pattern generation operation.
IDL Syntax:
HRESULT Stop()
Arguments:
None
HRESULT Return Codes:
Return CodeDescription
S_OKThe operation succeeded.
TLAPG_E_SYSTEM_NOT_RUNNINGThe system is not running.
TLAPG_E_FAILEDThe operation was unsuccessful.
Examples:
Visual Basic
Dim App As Object
Dim Sys As Object
Set App = CreateObject("Tlapg.Application")
‘Get system.
Set Sys = App.GetSystem
…
‘Start Pattern Generation.
Sys.Run
…
‘Stop Pattern Generation.
Sys.Stop
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.
Tektronix Pattern Generator PPI Manual Page 37 of 56
Deprecated
IPGSystem::GetRunStatus
Description:
This method returns the current runtime status of the Pattern
Generator.
pRunStatus -The current runtime status. This can be one of the
following values:
Return ValueDescription
TLAPG_RUNNING (0)
TLAPG_IDLE (1)
HRESULT Return Codes:
Pattern Generation has started and is
currently running.
Pattern Generator is in Idle state. Any
operations that were previously running
have completed or have been stopped.
Return CodeDescription
S_OKThe operation succeeded.
TLAPG_E_FAILEDThe operation was unsuccessful.
Examples:
Visual Basic
Dim App As Object
Dim Sys As Object
Dim RunStatus As Long
Set App = CreateObject("Tlapg.Application")
‘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:
Informs the status like running or idle.
Tektronix Pattern Generator PPI ManualPage 38 of 56
Deprecated
IPGModule::LoadModule
Description:
This method loads a module from the specified Pattern Generator
system/module file on to the current module.
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:
ValueDescription
TLAPG_SAVE_NO_DATA (0)Do not save program data in file.
TLAPG_SAVE_DATA (1)Save program data in file.
HRESULT Return Codes:
Return CodeDescription
S_OKThe operation succeeded.
TLAPG_E_SAVE_INVALID_FILE
TLAPG_SAVE_ERROR
TLAPG_E_SYSTEM_RUNNING
TLAPG_E_FAILEDThe operation was unsuccessful.
Examples:
Visual Basic
Dim App As Object
Dim Sys As Object
Dim PG As Object
Set App = CreateObject("Tlapg.Application")
‘Get system.
Set Sys = App.GetSystem
…
‘Get module in slot 3.
Set PG = Sys.GetModuleBySlot(3)
…
An error occurred while opening
this file for reading.
An error occurred during the save
operation.
The operation cannot be performed
when the system is running.
Tektronix Pattern Generator PPI ManualPage 40 of 56
The parameter cannot be set as
the system in running.
Examples:
Visual Basic
Dim App As Object
Dim Sys As Object
Dim PG As Object
Set App = CreateObject("Tlapg.Application")
‘Get system.
Set Sys = App.GetSystem
…
‘Get module in slot 3.
Set PG = Sys.GetModuleBySlot (3)
‘Set the Clock Mode to External
PG.SetClockMode 1
Tektronix Pattern Generator PPI Manual Page 47 of 56
Deprecated
IPGModule::SetClockPeriod
Description:
This method sets the internal clock period for this module.
IDL Syntax:
HRESULT SetClockPeriod([in] BSTR Period)
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".
Group names are returned as a VARIANT. The variant is of type VT_ARRAY
and points to a SAFEARRAY. The SAFEARRAY has dimension 1 and its
elements are of type VT_BSTR. The number of groups is equal to the
number of elements in the SAFEARRAY. The groups are returned in the
same order as they are specified in the LA Setup Window.
HRESULT Return Codes:
Return CodeDescription
S_OKThe operation succeeded.
TLAPG_E_FAILEDThe operation was unsuccessful.
Example:
Visual Basic
Dim App As Object
Dim Sys As Object
Dim PG As Object
Dim G As Variant
Dim Groups As Variant
Set App = CreateObject("Tlapg.Application")
‘Get system.Set Sys = App.GetSystem
‘Get module in slot 3.
Set PG = Sys.GetModuleBySlot(3)
‘Get group names.
Groups = PG.GetGroupNames
`Access group names.
For Each G In Groups
‘Use group name in G.
Next G
Remarks:
If there are no groups defined, the SAFEARRAY returned will be empty.
Tektronix Pattern Generator PPI ManualPage 52 of 56
Deprecated
IPGModule::GetGroupSize
Description:
This method retrieves the number of channels in a specified group
2. The second line should have the group names as shown above.
3. "Sample[]" should be the first column and "Timestamp[]" should be the last column as
shown above.
4. Tab is used as a separator between each item in a row.
Group Details Syntax:
Syntax : <GroupName>[MSB:LSB](Radix)
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
Tektronix Pattern Generator PPI ManualPage 56 of 56
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.