Tektronix TLA Programmatic Interface, Rev A Online Help

Deprecated
xx
TPI.COM
ZZZ
TLA Programmatic Interface
PrintedHelpDocument
www.tektronix.com
Deprecated
Copyright © Tektronix. All rights reserved. Licensed software products are owned by Tektronix or its subsidiaries or suppliers, and are protected by national copyright laws and international treaty provisions.
Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication supersedes that in all previously published material. Specications 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 . Bo x 50 0 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 i t www.tektronix.com to nd contacts in your area.
Deprecated
Table of Contents
What's New?.................................................................................................................................................. 7
Introduction................................................................................................................................................... 7
Setting up TPI ...............................................................................................................................................7
Running a client application on the TLA instrument .................................................................................. 8
Setting up TPI on the TLA instrument........................................................................................................ 8
Share-level access ................................................................................................................................... 9
User-level access................................................................................................................................... 10
Setting up a client machine that is running Microsoft Windows 2000/NT............................................... 11
Setting up share-level access for Microsoft Windows 2000/NT........................................................... 11
Setting up user-level access for Microsoft Windows 2000/NT ............................................................ 11
Setting up a client machine that is running Microsoft Windows 95 ......................................................... 12
Setting up share-level access for Microsoft Windows 95 ..................................................................... 12
Setting up user-level access for Microsoft Windows 95....................................................................... 13
Client machine running Microsoft Windows 98....................................................................................... 14
Share Level Access on Windows 98..................................................................................................... 14
User Level Access on Windows 98 ...................................................................................................... 15
Client instrument running on any other platform...................................................................................... 15
Connecting to the TLA server ................................................................................................................... 17
Disconnecting from the TLA server.......................................................................................................... 17
Programming examples.............................................................................................................................. 17
Example of a Microsoft Visual Basic client using dispatch interfaces ..................................................... 18
Example of a Microsoft Visual Basic client using vtable interfaces......................................................... 19
Error handling ............................................................................................................................................20
Server Message Boxes................................................................................................................................. 20
Slot numbers for expansion mainframes .................................................................................................. 20
Tips for improving LA module data transfer performance.................................................................... 20
Objects & Interfaces................................................................................................................................... 23
Objects and Interfaces................................................................................................................................ 25
Application Object.................................................................................................................................... 25
System Object........................................................................................................................................... 26
LAModule Object ..................................................................................................................................... 26
DSOModule Object..................................................................................................................................... 28
Methods by Alphabetical Listing............................................................................................................... 29
Methods by Alphabetical Listing............................................................................................................... 31
IApplication::GetSystem........................................................................................................................... 31
IApplication::ShowWindow ..................................................................................................................... 31
IDSOModule::DefineDataFormat............................................................................................................. 32
IDSOModule::Enabled .............................................................................................................................34
IDSOModule::ExportData ........................................................................................................................ 35
IDSOModule::GetBeginTime................................................................................................................... 36
IDSOModule::GetData ............................................................................................................................. 37
IDSOModule::GetDataOffset ...................................................................................................................39
IDSOModule::GetDataRange ................................................................................................................... 40
IDSOModule::GetDataSamplePeriod....................................................................................................... 41
IDSOModule::GetEndTime...................................................................................................................... 42
IDSOModule::GetNumSamples ...............................................................................................................43
IDSOModule::GetStartTime..................................................................................................................... 43
IDSOModule::GetTriggerTime ................................................................................................................ 44
IDSOModule::GetTriggerSample............................................................................................................. 45
IDSOModule::LoadModule...................................................................................................................... 46
IDSOModule::Name................................................................................................................................. 48
IDSOModule::SaveModule ......................................................................................................................49
3
Deprecated
ILAModule::DefineDataFormat ...............................................................................................................50
ILAModule::DeleteChannelGroup ...........................................................................................................52
ILAModule::Enabled ................................................................................................................................ 53
ILAModule::ExportData........................................................................................................................... 54
ILAModule::GetBeginTime .....................................................................................................................55
ILAModule::GetBytesPerSample ............................................................................................................. 57
ILAModule::GetChannelGroup................................................................................................................ 58
ILAModule::GetChannelName................................................................................................................. 59
ILAModule::GetCounterValue ................................................................................................................. 60
ILAModule::GetData................................................................................................................................ 61
ILAModule::GetEndTime......................................................................................................................... 63
ILAModule::GetGroupNames .................................................................................................................. 65
ILAModule::GetGroupSize ......................................................................................................................66
ILAModule::GetNumSamples.................................................................................................................. 67
ILAModule::GetStartTime ....................................................................................................................... 68
ILAModule::GetTimerValue .................................................................................................................... 69
ILAModule::GetTimestampMultiplier ..................................................................................................... 70
ILAModule::GetTriggerSample................................................................................................................ 70
ILAModule::GetTriggerTime ................................................................................................................... 72
ILAModule::LoadModule......................................................................................................................... 73
ILAModule::LoadTrigger......................................................................................................................... 74
ILAModule::MemoryDepth...................................................................................................................... 76
ILAModule::Name.................................................................................................................................... 78
ILAModule::SaveModule......................................................................................................................... 79
ILAModule::SetChannelGroup................................................................................................................. 81
ILAModule::SetChannelName ................................................................................................................. 83
ILAModule::SetEventValue ..................................................................................................................... 84
ILAModule::SetTriggerPosition ............................................................................................................... 86
ISystem::DefineRangeSymbolOptions ..................................................................................................... 87
ISystem::ExternalSignalIn ........................................................................................................................ 89
ISystem::ExternalSignalOut ..................................................................................................................... 90
ISystem::ExternalSignalOutLowTrue....................................................................................................... 92
ISystem::GetDiagCalStatus ......................................................................................................................93
ISystem::GetFirstModuleSlot ................................................................................................................... 94
ISystem::GetModuleByName................................................................................................................... 95
ISystem::GetModuleBySlot...................................................................................................................... 95
ISystem::GetModuleNames...................................................................................................................... 96
ISystem::GetModulePropertiesBySlot...................................................................................................... 97
ISystem::GetModuleSlotByName ............................................................................................................99
ISystem::GetModuleTypeBySlot............................................................................................................ 100
ISystem::GetNumModuleSlots ............................................................................................................... 101
ISystem::GetRepetitiveStopReason........................................................................................................ 102
ISystem::GetRunStatus........................................................................................................................... 103
ISystem::GetSWVersion......................................................................................................................... 104
ISystem::LoadSymbolFile ...................................................................................................................... 105
ISystem::LoadSystem ............................................................................................................................. 106
ISystem::Repetitive................................................................................................................................. 107
ISystem::Run ..........................................................................................................................................108
ISystem::RunCount................................................................................................................................. 109
ISystem::SaveSystem.............................................................................................................................. 109
ISystem::Stop.......................................................................................................................................... 111
Data Formats............................................................................................................................................. 113
Data Formats........................................................................................................................................... 115
Binary data formats for LA modules and the TLA600 series logic analyzer.......................................... 115
General characteristics........................................................................................................................ 115
Violation data ....................................................................................................................................115
4
Deprecated
Time stamps........................................................................................................................................ 115
RawWithTimestamp binary data format for TLA7N1 LA modules and the TLA6X1 logic
analyzer .............................................................................................................................................116
RawWithTimestamp binary data format for TLA7N2/P2/Q2 LA modules and the TLA6X2 logic
analyzer............................................................................................................................................... 117
RawWithTimestamp binary data format for TLA7N3 LA modules and the TLA6X3 logic analyzer 118 RawWithTimestamp binary data format for TLA7N4/P4/Q4 LA modules and the TLA6X4 logic
analyzer............................................................................................................................................... 119
RawWithTimestamp binary data format for a merged LA module .................................................... 120
AllGroupsWithTimestamp binary data format for LA modules ......................................................... 122
RawWithoutTimestamp binary data format for TLA7N1 LA modules and the TLA6X1 logic analyzer
............................................................................................................................................................ 123
RawWithoutTimestamp binary data format for TLA7N2/P2/Q2 LA modules and the TLA6X2 logic
analyzer............................................................................................................................................... 124
RawWithoutTimestamp binary data format for TLA7N3 LA modules and the TLA6X3 logic analyzer
............................................................................................................................................................ 125
RawWithoutTimestamp binary data format for TLA7N4/P4/Q4 LA modules and the TLA6X4 logic
analyzer............................................................................................................................................... 126
RawWithoutTimestamp binary data format for a merged LA module ............................................... 127
AllGroupsWithoutTimestamp binary data format for LA modules.................................................... 129
GroupList binary data format for LA modules ................................................................................... 129
Binary data formats for DSO modules and external oscilloscopes ..................................................... 130
General characteristics........................................................................................................................ 130
AllChannels ........................................................................................................................................130
ChannelList......................................................................................................................................... 130
Text data formats for LA modules.......................................................................................................... 131
General characteristics........................................................................................................................ 131
Violation data...................................................................................................................................... 131
Time stamps........................................................................................................................................ 131
RawWithTimestamp ........................................................................................................................... 131
RawWithoutTimestamp ...................................................................................................................... 131
AllGroupsWithTimestamp.................................................................................................................. 131
AllGroupsWithoutTimestamp............................................................................................................. 131
GroupList............................................................................................................................................ 131
AllGroupsWithTimestamp text data format for LA modules ............................................................. 132
AllGroupsWithoutTimestamp text data format for LA modules ........................................................ 132
GroupList text data format for LA modules .......................................................................................133
Text data formats for DSO modules and external oscilloscopes.............................................................133
General characteristics........................................................................................................................ 133
AllChannels ........................................................................................................................................133
TLA7D2/TLA7E2 and four channel external oscilloscopes............................................................... 133
TLA7D1/TLA7E1 and two channel external oscilloscopes................................................................133
ChannelList......................................................................................................................................... 134
Appendix.................................................................................................................................................... 135
Internal 2X clocking mode...................................................................................................................... 137
Internal 4X clocking mode...................................................................................................................... 138
External 4X clocking mode ....................................................................................................................140
External 2X clocking mode ....................................................................................................................143
Probe demultiplexing.............................................................................................................................. 145
Glossary ..................................................................................................................................................... 147
Version History ......................................................................................................................................... 151
Index .......................................................................................................................................................... 157
5
Deprecated
6
Deprecated

What's New?

What's new in TLA TPI Version 4.2:
Support added for the TLA7Axx Series Logic Analyzer modules
Minor corrections to earlier versions
For information about earlier versions of the TLA TPI refer to TLA TPI Version History.

Introduction

The TLA programmatic interface (TPI) for the Tektronix Logic Analyzer (TLA) family is based on Microsoft’s Component Object Model (COM). With TPI you can control the logic analyzer from a separate user program running on the logic analyzer or on a remote PC. Both the TLA600- and TLA700­series logic analyzers support TPI.
In the context of TPI, the TLA application is called the server, and the program (written by the user)
that controls the server through the programmable interface is called the client. The user program can be written in any language or programming environment that supports the Microsoft Component Object Model (COM), such as Microsoft Visual C++ or Microsoft Visual Basic.
TLAScript is a standalone scripting interface to the TLA application. It is an interpreter that processes commands that are read from a script file or are manually entered by users through the TLAScript graphical interface. The TLAScript commands parallel the TPI interface. Most of the TPI methods have corresponding TLAScript commands. TLAScript has its own online help and links to the TPI online help commands.
General characteristics
The following is a list of the general characteristics of the TPI:
TPI is consistent with programmatic interfaces exported by other Windows applications.
All of the interfaces exported by the server are dual interfaces, supporting static and dynamic binding.
The TLA 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 before the application is fully initialized, it will receive an error indicating access is denied.
A client running locally on the logic analyzer will connect to an existing instance of the server, if there is one. If the server is not running, it will be launched automatically.
Clients may hide the server window using the programmatic interface. If the window is shown, you can directly interact with the TLA server. There will be an indicator in the status bar of the main window to show that a client is connected.
The TLA server will continue to run after a client has disconnected. The server window is always made visible when all clients have disconnected.
TPI operates within the main thread of the application.
TPI supports multiple simultaneous clients. Care must be taken when using multiple clients to ensure
that the clients do not interfere with one another.
There is no provision for a TPI client to lock-out other clients.

Setting up TPI

In the following procedures, <install directory> refers to the directory where the TPI client is installed on your client machine. This directory is C:\Program Files\TLA700 by default. This directory is used by both the TLA600- and TLA700-series logic analyzers.
7
Deprecated
The type library used with TPI is tla700.tlb. After you complete the following setup procedure, this file will be located in C:\Program Files\TLA700\System\TPI on your logic analyzer and/or in the <install directory>\System\TPI on your client machine.
You have two methods of using TPI with your client application:
You can run the client application locally on the logic analyzer. No special setup is required once the
TLA application is installed. To verify that a client application can connect to the TLA server, see Running a client application on the TLA instrument.
You can run your client application remotely across the network. In this case, both the TLA instrument and the remote host require special setup procedures. See Setting up TPI on the TLA instrument to begin this setup procedure.

Running a client application on the TLA instrument

To verify that a client application can connect to the TLA instrument, do the following steps:
1 Start the TLA application on the TLA instrument.
2 Navigate to and run the following program:
C:\Program Files\TLA 700\Samples\TPI Samples\Vc++\test client\testclient.exe
The Tektronix Test TPI Client dialog appears.
3 Click the Connect to the TLA700! button, and check that the text in the dialog changes to Connected!
This indicates the test client application connected to the TLA
4 Click Exit.

Setting up TPI on the TLA instrument

If you want to run a client application remotely across the network, you must set up the TLA instrument using the following procedure:
1 Install and configure TCP/IP.
Note: If you have difficulty configuring the network setup, contact your system administrator.
2 You must choose to have either share-level access or user-level access to the TLA instrument as
provided by Microsoft Windows.
Note: For TPI to work with share-level access, authentication is turned off and any COM client can call into any
COM server running on the TLA instrument.
Choose one of the following:
Share-level access
User-level access
8
Deprecated
Share-level access
To set up the TLA instrument so that it may be shared among different users on a network, do the following steps:
1 Run dcomcnfg.exe. 2 Click the Default Properties tab, and set the Default Authentication Level to None. 3 Click the Applications page, and select the Tektronix TLA Application server. 4 Click the Properties button (or double-click the selected application). 5 Click the General tab, and set the Authentication Level to None. 6 Click the Location tab, and select Run application on this computer. 7 Click the Security tab, and select Use custom access permissions. 8 Click the Edit button.
a) Click the Registry Value Permissions tab, and click the Add button. b) Scroll down the list; select and add Everyone to the list.
9 Click the Security page, and select Use custom launch permissions. 10 Click the Edit button.
a) Click the Registry Value Permissions tab, and then click the Add button.
b) Scroll down the list; select and add Everyone to the list.
11 Click the Identity page, and select The Interactive user. 12 Shut down the TLA application, and restart it before attempting to make any connections.
This completes the setup of TPI on the TLA instrument for operating with a remote client machine using share-level access.
Note: You can switch between user-level and share-level access later by redoing the procedure from step 2 of Setting
up TPI on the TLA instrument.
Next, you need to set up the client machine so that it can connect to the TLA instrument. Select the appropriate setup:
Client machine running Microsoft Windows 2000/NT
Client machine running Microsoft Windows 95
Client machine running Microsoft Windows 98
Client machine running on any other platform
9
Deprecated
User-level access
The default network settings for the TLA under Windows is compatible with clients operating with user­level access. With these settings the client and server must be logged in to the same account and domain to make a connection. If this is too restrictive, we recommend that you use sharel-level access or talk to your network administrator.
To set up the TLA instrument for user-level access (default settings), do the following steps:
1 Run dcomcnfg.exe. 2 Click the Default Properties tab, and set the Default Authentication Level to Connect. 3 Click the Applications tab, and select the Tektronix TLA Application server. Click the Properties
button (or double-click the selected application).
4 Click the General tab, and set the Authentication Level to Default. 5 Click the Location tab, and select the Run application on this computer. 6 Click the Security tab, and select the following:
Use default access permissions
Use default launch permissions
Use default configuration permissions
7 Click the Identity tab, and select The launching user. 8 Shut down the TLA application, and restart it before attempting to make any connections.
This completes the set up of the TLA instrument for operation with a remote client machine using user level access or Windows 2000/NT user authentication.
Note: You can switch between user-level access and share-level access later by redoing the procedure from step 2 of
Setting up TPI on the TLA instrument.
Next, you need to set up the client machine so that it can connect to the TLA instrument. Select the appropriate setup:
Client machine running Microsoft Windows 2000/NT
Client machine running Microsoft Windows 95
Client machine running Microsoft Windows 98
Client machine running on any other platform
10
Deprecated

Setting up a client machine that is running Microsoft Windows 2000/NT

After you set up the TLA instrument, you must set up the client machine using the following procedure:
Note: You may need administrative privilege to perform this procedure.
1 Install and configure TCP/IP. If you have difficulty configuring the network setup, contact your system
or network administrator.
2 Load the Tektronix TLA application software CD.
3 Double-click on TPI Client SW\Disk1\Setup.exe.
4 Select the appropriate access type to continue with the setup procedure (you must set up the client
machine to match the access level you chose for the TLA instrument):
Share-level access
User-level access
Setting up share-level access for Microsoft Windows 2000/NT
To set up a client machine to access a TLA instrument that is set up for share-level access, perform the following procedure (you must have administrative permissions on your computer):
1 Run dcomcnfg.exe. 2 Click the Default Properties tab, and set Default Authentication Level to None. 3 Click the Applications tab, and select the Tektronix TLA Application server. 4 Click the Properties button (or double-click the selected application). 5 Click the General tab, and set Authentication Level to None. 6 Click the Location tab, and select Run application on the following computer. Enter the name of the
TLA instrument in the edit field.
7 Click the Security tab (if applicable), and select the Use custom access permissions; click the Edit
button.
a) Click the Registry Value Permissions tab, and then click the Add button.
b) Scroll down the list; select and add Everyone to the list. 8 Click the Security tab (if applicable), and select Use custom launch permissions. 9 Click the Edit button.
a) Click the Registry Value Permissions tab, and then click the Add button.
b) Scroll down the list; select and add Everyone to the list. 10 Click the Identity tab (if present), and select The Interactive user. 11 To Verify that the setup is complete:
a) Run <install directory>\Samples\TPI Samples\Vc++\test\test client\testclient.exe on the client
machine.
b) Click the button to see if the client can connect to the TLA instrument. (It may take a few minutes
This completes the set up of the TLA instrument and the client machine for running your client application across the network.
Setting up user-level access for Microsoft Windows 2000/NT
for the first time that you connect.)
The default network settings for the TLA under Windows is compatible with clients operating with user­level access. With these settings the client and server must be logged in to the same account and domain to make a connection. If this is too restrictive, we recommend that you use share-level access or talk to your network administrator.
11
Deprecated
To set up a client machine to access a TLA instrument that is set up for user-level access, perform the following procedure:
1 Run dcomcnfg.exe. 2 Click the Default Properties tab, and set the Default Authentication Level to Connect. 3 Click the Applications tab, and select the Tektronix TLA Application server. 4 Click the Properties button (or double-click the selected application). 5 Click the General tab, and set Authentication Level to Default. 6 Click the Location tab, and select Run application on the following computer. 7 Enter the name of the TLA instrument in the edit field. 8 Click the Security tab (if present), and select the following:
Use default access permissions
Use default launch permissions
Use default configuration permissions
9 Click the Identity tab (if present), and select The launching user. 10 To verify that the setup is complete:
a) Run <install directory>\Samples\TPI Samples\Vc++\test\test client\testclient.exe on the client
machine.
b) Click the button to see if the client can connect to the TLA instrument. (It may take a few minutes
for the first time that you connect.) This completes the set up of the TLA instrument and the client machine for running your client application across the network.

Setting up a client machine that is running Microsoft Windows 95

After you set up the TLA instrument, you must set up the client machine using the following procedure:
1 Install and configure TCP/IP.
2 Load the Tektronix TLA application software CD.
3 Double-click TPI Client SW\Disk1\Setup.exe.
4 Download and install the following from the Microsoft web site, restarting after each installation. The
Microsoft web site is at www.microsoft.com.
Distributed COM (DCOM) for Microsoft Windows 95 (DCOM 95, version 1.1)
dcomcnfg (DCOM configuration utility)
Note: The dcomcnfg utility will run only if user-level access is enabled. See step 5.
5 Select the appropriate access type to continue with the setup procedure (you must set up the client
machine to match the access level you chose for the TLA instrument):
Share-level access
User-level access
Note: You can switch between user-level and share-level access later by redoing the procedure from Step 2
onwards.
Setting up share-level access for Microsoft Windows 95
To set up share-level access for a client machine running Microsoft Windows 95, do the following procedure:
1 In Microsoft Windows 95, click Start, select Settings, and then click Control Panel.
2 Click Network from the Control Panel, and then click the Access Control tab.
3 Choose Share-level access control, and then click OK. (If prompted, insert the Windows 95 disk or
provide a file path to the stored Windows 95 files.)
4 The System Settings Change dialog box appears. Click the Yes button.
12
Deprecated
5 On the client machine, click Start and then Shut Down. In the Shut Down Windows dialog box, click
Restart the Computer?, and then click the Yes button.
6 Navigate to and run <install directory>\System\TPI\Share Level Access Client.reg.
7. A dialog box appears, indicating successful registration. Click OK.
8 Restart the client machine using the procedure in step 5.
9 In Microsoft Windows, click Start, and then select Run. Either locate the regedit file using Browse, or
enter regedit. Then click OK to run regedit.
10 Click the following registry key:
HKEY_CLASSES_ROOT\AppID\{C67DAA22-4972-11d1-9CAC-00805F0D8271}
11 Using Edit>New>StringValue, add a named value, RemoteServerName.
12 Click the new value, RemoteServerName, and select Edit>Modify. The Edit String dialog box appears.
13 Enter the computer name of the TLA instrument. This is the name used to identify the TLA on the
network. Click OK.
14 To verify that the setup is complete:
a On the client machine, navigate to and run
<install directory>\Samples\TPI Samples\Vc++\test client\testclient.exe>.
The Tektronix Test TPI Client dialog box appears.
b Click the Connect button to see if the client can connect to the TLA instrument.
Attempting Connection to TLA appears in the dialog box. (The first time you connect it may take a few minutes.) When the connection is made, the text changes to Connected!
This completes the setup of the TLA instrument and the client machine for running a client application across the network.
Note: You can switch between user-level and share-level access later by uninstalling the Tektronix TPI Client and
DCOM 95 using the Windows control panel and redoing the procedure from step 2 of Setting up a client machine that is running Microsoft Windows 95.
Setting up user-level access for Microsoft Windows 95
To set up user-level access for a client machine running Microsoft Windows 95, do the following procedure:
1 In Microsoft Windows 95, select Start, Settings, and then Control Panel.
2 From the Control Panel, select Network, and then select the Access Control tab.
3 Choose User-level access control and enter the name of the domain that will be used to validate user
access. Then select OK.
4 On the client machine, select Start and then Shut Down. In the Shut Down Windows dialog box, select
Restart the Computer? and then press the Yes button.
5 Naviagate to and run <install directory>\System\TPI\User Level Access Client.reg.
6 Restart the client machine using the procedure in step 4.
7 In Microsoft Windows 95, select Start, and then select Run. Either locate the dcomcnfg file using
Browse, or enter dcomcnfg. Then click OK to run dcomcnfg.
8 Double-click "Tektronix TLA Application" in the Applications page.
9 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 instrument in the edit field.
10 To verify that the setup is complete:
a Run <install directory>\Samples\TPI Samples\Vc++\test client\testclient.exe on the client
machine.
b Click the Connect button to see if the client can connect to the TLA instrument. (The first time you
connect it may take a few minutes.)
This completes the setup of the TLA instrument and the client machine for running a client application across the network.
13
Deprecated
Note: You can switch between user-level and share-level access later by uninstalling the TPI Client and DCOM 95
using the Windows control panel and redoing the procedure from step 2 of Setting up a client machine that is running Microsoft Windows 95.

Client machine running Microsoft Windows 98

After you set up the TLA instrument, you must set up the client machine using the following procedure:
1 Install and configure TCP/IP.
2 Load the Tektronix TLA logic analyzer application software CD.
3 Double-click TPI Client SW\Disk1\Setup.exe.
4 You must set up the client machine to match the access level that you chose for the TLA instrument
(share-level access or user-level access).
Select the appropriate access type to continue with the setup procedure:
Share Level Access on Windows 98
User Level Access on Windows 98
Note: You can switch between user-level and share-level access later by redoing the procedure from Step 4
onwards.
Share Level Access on Windows 98
To set up share-level access for a client machine running Microsoft Windows 98, do the following procedure:
1 In Microsoft Windows 98, click Start, select Settings, and then click Control Panel.
2 From the Control Panel, click Network, and then click the Access Control tab.
3 Choose Share-level access control, and then click OK. (If prompted, insert the Windows 98 CD or
provide a file path to the stored Windows 98 files.)
4 The System Settings Change dialog box appears. Click the Yes button.
5 On the client machine, click Start and then select Shut Down. In the Shut Down Windows dialog box,
click Restart the Computer?, and then click the Yes button.
6 Navigate to and run <install directory>\System\TPI\Share Level Access Client.reg.
7. A dialog box appears, indicating successful registration. Click OK.
8 Restart the client machine using the procedure in step 5.
9 In Microsoft Windows, click Start, and then click Run. Either locate the regedit file using Browse, or
enter regedit. Click OK to run regedit.
10 Click the following registry key:
HKEY_CLASSES_ROOT\AppID\{C67DAA22-4972-11d1-9CAC-00805F0D8271}
11 Using Edit>New>StringValue, add a named value, RemoteServerName.
12 Click the new value, RemoteServerName, and select Edit>Modify. The Edit String dialog box appears.
13 Enter the computer name of the TLA instrument. This is the name used to identify the TLA on the
network. Click OK.
14
Deprecated
14 To verify that the setup is complete:
a On the client machine, navigate to and run
<install directory>\Samples\TPI Samples\Vc++\test client\testclient.exe>.
b The Tektronix Test TPI Client dialog box appears. Click the Connect button to see if the client can
connect to the TLA instrument.
c Attempting Connection to TLA appears in the dialog box. (The first time you connect it may take a
few minutes.) When the connection is made, the text changes to Connected!
This completes the setup of the TLA instrument and the client machine for running a client application across the network.
Note: You can switch between user-level access and share-level access later by redoing step 4 in the procedure from
Client machine running Microsoft Windows 98
User Level Access on Windows 98
To set up user-level access for a client machine running Microsoft Windows 98, do the following procedure:
1 In Microsoft Windows 98, click Start, select Settings, and then click Control Panel.
2 From the Control Panel, click Network, and then click the Access Control tab.
3 Choose User-level access control and enter the name of the domain that will be used to validate user
access. Then click OK.
4 On the client machine, click Start, and then click Shut Down. In the Shut Down Windows dialog box,
click Restart the Computer?, and then click the Yes button.
5 Navigate to and run <install directory>\System\TPI\User Level Access Client.reg.
6 Restart the client machine using the procedure in step 4.
7 In Microsoft Windows 98, click Start, and then click Run. Either locate the dcomcnfg file using
Browse, or enter dcomcnfg. Click OK to run dcomcnfg.
8 Double-click "Tektronix TLA application" in the Applications page.
9 In the Location page, clear the "Run application on this computer" box and check the "Run application
on the following computer" box. Enter the name of the TLA instrument in the edit field.
10 To verify that the setup is complete:
a Run <install directory>\Samples\TPI Samples\Vc++\test client\testclient.exe on the client
machine.
b Click the Connect button to see if the client can connect to the TLA instrument. (The first time you
connect it may take a few minutes.)
This completes the setup of the TLA instrument and the client machine for running a client application across the network.
Note: You can switch between user-level and share-level access later by redoing the procedure from step 2 of Client
machine running Microsoft Windows 98.

Client instrument running on any other platform

If the client application requires use of the type library, you can generate it on your platform using tla700.odl in C:\Program Files\TLA 700\System\TPI\src.
Perform the following steps:
1 Ensure that DCOM is working on your platform.
2 Merge C:\Program Files\TLA 700\System\TPI\Client.reg into your registry.
3 M erge C:\Program Files\TLA 700\System\TPI\Share Level Access Client.reg or User Level
Access Client.reg into your registry, depending on the type of access control you chose for the TLA instrument.
4 Add a string value named RemoteServerName to the key
HKEY_CLASSES_ROOT\AppID\{275FF661-6554-11d3-9D63-00805F0D8271}
15
Deprecated
5 Enter the computer name of the logic analyzer as this string value. This is the name used to identify the
logic analyzer on the network.
This completes the setup of the logic analyzer for operating with a remote client machine using a platform other than Microsoft Windows.
16
Deprecated

Connecting to the TLA server

Client applications connect to the TLA server by creating an Application Object. For example, in Microsoft Visual Basic:
‘Establish connection to TLA. Dim App As Object Set App = CreateObject("TLA700.Application")
Once the Application Object is created, the client can call methods on it to get references to System and Module Objects.

Disconnecting from the TLA server

A client application connected to the TLA server can disconnect by deleting the reference to the Application Object. For example, in Microsoft Visual Basic:
‘Disconnect from TLA. Set App = Nothing
References to any System or Module Objects that were obtained must also be deleted.

Programming examples

All interfaces exported by the TLA server are dual interfaces that have the characteristics of both dispatch and vtable interfaces.
The dispatch side of a dual interface uses run time (dynamic) binding to resolve method calls. This is mostly used in interpretive and scripting environments where static binding using header files and type libraries cannot be performed.
The vtable side of a dual interface uses static binding to resolve method calls. This is accomplished using header files and type libraries.
See the following examples:
Example of a Microsoft Visual Basic client using dispatch interfaces
Example of a Microsoft Visual Basic client using vtable interfaces
Additional code examples for specific methods use the dispatch portion of each dual interface.
17
Deprecated

Example of a Microsoft Visual Basic client using dispatch interfaces

This client example uses the dynamic (dispatch) part of the dual interfaces.
Dim App As Object Dim System As Object Dim LA As Object Dim Status As Long Dim BytesPerSample As Long Dim S As String Dim Data As Variant
Private Sub Form_Load()
Connect to server. Set App = CreateObject("TLA700.Application")
Get system pointer.
Set System = App.GetSystem
NOTE: To load a system, fill in system path.
System.LoadSystem "<path>"
NOTE: Fill in the slot no. of your LA here.
Set LA = System.GetModuleBySlot(<slot>)
Run acquisition.
Run
Get data.
GetData
Show data.
ShowData
End Sub
Private Sub Run()
Do acquisition. Wait for it to complete. System.Run Do
Status = System.GetRunStatus
Loop While(Status = 0)
End Sub
Private Sub GetData()
Get the first ten samples (grouped) in the main data setin ASCII.NOTE: Change group list if required.
BytesPerSample = LA.DefineDataFormat(0,
"GroupList:A3,A2,Timestamp", 1)
Data = LA.GetData(0, 10)
End Sub
Private Sub ShowData()
Show data. ForI=0To9
S = Data(I) DataList.AddItem(S)
Next I
End Sub
18
Deprecated

Example of a Microsoft Visual Basic client using vtable interfaces

This client example uses the vtable (static) part of the dual interfaces.
Dim App As IApplication Dim System As ISystem Dim LA As ILAModule Dim Status As Long Dim BytesPerSample As Long Dim S As String Dim Data As Variant
Private Sub Form_Load()
'Connect to server. Set App = CreateObject("TLA700.Application") 'Get system pointer. Set System = App.GetSystem
'NOTE: To load a system, fill in system path.
System.LoadSystem("<path>")
'NOTE: Fill in the slot no. of your LA here.
Set LA = System.GetModuleBySlot(<slot>) 'Run acquisition. Run 'Get data. GetData 'Show data. ShowData
End Sub
Private Sub Run()
'Do acquisition. Wait for it to complete. System.Run Do
Status = System.GetRunStatus
Loop While(Status = 0)
End Sub
Private Sub GetData()
'Get the first ten samples (grouped) in the main data set 'in ASCII. 'NOTE: Change group list if required. BytesPerSample = LA.DefineDataFormat(0,"GroupList:A3,A2,Timestamp",
1)
Data = LA.GetData(0, 10)
End Sub
Private Sub ShowData()
'Show data. ForI=0To9
S = Data(I) DataList.AddItem(S)
Next I
End Sub
19
Deprecated

Error handling

All methods in all interfaces of TPI return an HRESULT (or SCODE). Refer to the file "tla700error.h" (the path is <install directory>\System\TPI\Src\tla700error.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 IDispatch::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.

Server Message Boxes

In the TLA graphical user interface, there are instances where you are asked to confirm a particular operation. For example, before loading a saved system, you are asked whether the current system should be saved before the load operation.
Since it is not possible to ask questions through TPI, the application always proceeds with the original operation as though the question were never asked. In the previous example, the load operation proceeds without saving the current system.
Modal message boxes that are normally displayed in the TLA user interface will not be displayed when a client is connected to the server.

Slot numbers for expansion mainframes

In TPI, 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 two expansion frames each containing 13 slots:
Mainframe: Slots 0 - 12
Expansion 1 Slots 13 - 25
Expansion 2 Slots 26 – 38
External Oscilloscope modules do not have slot numbers.

Tips for improving LA module data transfer performance

The data transfer rates (in KB/s) that you achieve using ILAModule::GetData() depend on various factors. The following guidelines will improve data transfer performance:
Buffer size. When a client invokes ILAModule::GetData(), the TLA server allocates and returns a
data buffer to the client. The size of this buffer affects the efficiency of the data transfer operation. Using too small a buffer reduces performance because of the added overhead of additional calls to transfer a fixed amount of data. Using too large a buffer can cause the system to exceed the available physical memory. When this happens, virtual memory must be made available by swapping physical memory pages to the hard disk, which again reduces performance. Optimal performance is achieved using buffers that are as large as possible without exceeding the available physical memory.
The size of the buffer is determined by the number of samples requested. For systems with 32M of , and only the TLA application running, the optimum buffer size is typically between 1,300,000 ­2,600,000 bytes. For the 136-channel TLA7N4 LA module, this is approximately within the range of 50,000 - 100,000 samples for raw data (since there are 26 bytes per sample). See Binary data formats for LA modules and Text data formats for LA modules for more information on the number of bytes per sample for other module types.
20
Deprecated
With larger systems, or when additional applications are running, it can be difficult to determine how much physical memory is available. One technique for determining this number empirically is to use to do data transfers of varying size, while monitoring memory use using the Win2000 performance monitor. The performance monitor can be found at StartMenu>Programs>Administrative Tools>Performance. The measurement called "Available Mbytes" shows the amount of physical memory remaining. The objective is to find out how much data you can transfer in one call, without causing this measurement to hit zero.
Amount of TLA and client machine main memory. As expected, the larger the amount of random
access memory (RAM), the better the performance. This difference is more pronounced as the number of samples requested increases. It is less pronounced when an optimum number of samples is requested (see the previous bulleted item, Buffer size).
Data formats. A TPI client application has a choice of data formats. For details, see
ILAModule::DefineDataFormat().
Binary Text. In general, binary data transfer is faster than text data transfer. Binary data transfer may, however, require some effort on the part of the TPI client to process the binary data.
Raw versus Grouped. If the TPI client requires most of the information in a given sample of data, a raw data is more efficient than a grouped format. However, the raw format requires more post­transfer processing by the TPI client and gives the user less flexibility in what data is transferred. If you require very little information out of a given sample, the grouped format may be more appropriate.
To clarify difference between Binary versus Text and Raw versus Grouped, look at the following scenarios:
Scenario 1 User A is interested in getting data as fast as possible and is willing to filter and process
data in any format.
The appropriate choice in this scenario would probably be the RawWithTimestamp format.
Scenario 2 User B is interested in only one particular group. The user would like the data to be
formatted. The speed of data transfer is not a critical issue.
The appropriate choice in this scenario would probably be the GroupList format, just the group of interest.
LA module characteristics. The narrower LA modules (fewer channels) tend to have slower transfer
rates than the wider modules.
Client application/programming environment. The efficiency of the data transfer is affected by the
way the TPI client application is written and/or the programming environment used for writing the client application. Remember that it is the responsibility of the TPI client application to free memory allocated for data buffers during data transfer.
Network conditions. Data transfer using TPI using DCOM over the network gives approximately half
the performance of local COM data transfer. This may vary depending upon the network traffic conditions.
21
Deprecated
22
Deprecated
Objects & Interfaces
23
Deprecated
24
Deprecated

Objects and Interfaces

The TPI consists of four types of objects:
Application
System
LAModule
DSOModule
You an Application Object to initially connect to the TLA application and to subsequently obtain a reference to a system object. The application object exports a single interface called IApplication.
The system provides methods for configuration, run control, and save and load operations. Every client must obtain a reference to a System Object before it can obtain references to Module Objects. The System Object exports a single interface called ISystem.
Module objects provide methods for module configuration, obtaining acquisition statistics, and retrieving acquisition . Logic analyzer module objects export a single interface called ILAModule; DSO module objects export a single interface called IDSomodule.
Unless otherwise specified, all methods are synchronous and wait for the completion of the operation before . The syntax of the TPI methods is described in Microsoft Object Description Language (ODL). The object hierarchy is shown below:

Application Object

The Object supports the following methods:
IApplication
HRESULT GetSystem(ppDispatch)
HRESULT ShowWindow(Show)
25
Deprecated

System Object

The System supports the following methods:
ISystem
Properties:
VARIANT_BOOL Repetitive
long RunCount (read-only)
long ExternalSignalIn
long ExternalSignalOut
VARIANT_BOOL ExternalSignalOutLowTrue
Configuration Methods:
HRESULT GetNumModuleSlots(pNumSlots)
HRESULT GetFirstModuleSlot(pSlot)
HRESULT GetSWVersion(pVersion)
HRESULT GetDiagCalStatus(pDiagCalStatus)
HRESULT GetModuleTypeBySlot(Slot, pModuleType)
HRESULT GetModulePropertiesBySlot(Slot, pModuleProperties)
HRESULT GetModuleBySlot(Slot, ppDispatch)
HRESULT GetModuleByName(ModuleName, ppDispatch)
HRESULT GetModuleNames( pModuleNames)
HRESULT GetModuleSlotByName(ModuleName, pSlot)
Load and Save Methods:
HRESULT LoadSystem(SystemPath)
HRESULT SaveSystem(SystemPath, UserComment, SaveData)
HRESULT DefineRangeSymbolOptions(FileFormat, SymbolTypes, Reserved, Bound1, Bound2,
OffsetType, SymbolOffset)
HRESULT LoadSymbolFile(SymbolFilePath)
Run Control and Status Methods:
HRESULT Run()
HRESULT Stop()
HRESULT GetRepetitiveStopReason (pStopReason)
HRESULT GetRunStatus(pRunStatus)

LAModule Object

The LAModule supports the following methods:
ILAModule
Properties:
BSTR Name
VARIANT_BOOL Enabled
long MemoryDepth
26
Deprecated
Load and Save Methods:
HRESULT LoadModule(ModulePath, ModuleName)
HRESULT LoadTrigger(ModulePath, ModuleName)
HRESULT SaveModule(ModulePath, UserComment, SaveData)
Setup Methods:
HRESULT DeleteChannelGroup(UserChannelGroupName)
HRESULT GetChannelGroup(UserChannelGroupName, ChannelNameList)
HRESULT GetChannelName(HWChannelName, UserChannelName)
HRESULT GetGroupNames(GroupNames)
HRESULT GetGroupSize(GroupNames, pGroupSize)
HRESULT SetEventValue(EventID, EventValue)
HRESULT SetChannelGroup(UserChannelGroupName, ChannelNameList)
HRESULT SetChannelName(HWChannel Name, UserChannelName)
HRESULT SetTriggerPosition(Position)
Acquisition and Statistics Methods:
HRESULT GetBeginTime(DataSet, pTimeHighWord, pTimeLowWord)
HRESULT GetCounterValue(CounterID, pCounterHighWord, pCounterLowWord)
HRESULT GetEndTime(DataSet, pTimeHighWord, pTimeLowWord)
HRESULT GetNumSamples(DataSet, pNumSamples)
HRESULT GetStartTime(pDate)
HRESULT GetTimerValue(TimerID, pTimerHighWord, pTimerLowWord)
HRESULT GetTriggerSample(DataSet, pTriggerSample)
HRESULT GetTriggerTime(DataSet, pTimeHighWord, pTimeLowWord)
Acquisition Data Methods:
HRESULT DefineDataFormat(DataSet, Components, DataType, pBytesPerSample)
HRESULT ExportData(FirstSample, NumSamples, DataPath, Mode)
HRESULT GetBytesPerSample(pBytesPerSample)
HRESULT GetData(FirstSample, NumSamples, pData)
HRESULT GetTimestampMultiplier(pMultiplier)
27
Deprecated

DSOModule Object

The following methods are for the IDSOModule Object: [Unless otherwise stated, all DSOModule object properties and methods apply to External oscilloscope modules as well as Internal DSO modules.]
IDSOModule
Properties:
BSTR Name
VARIANT_BOOL Enabled
Load and Save Methods:
HRESULT LoadModule(ModulePath, ModuleName)
HRESULT SaveModule(ModulePath, UserComment, SaveData)
Acquisition and Status Methods:
HRESULT GetNumSamples(pNumSamples)
HRESULT GetTriggerSample(pTriggerSample)
HRESULT GetTriggerTime(pTimeHighWord, pTimeLowWord)
HRESULT GetBeginTime(pTimeHighWord, pTimeLowWord)
HRESULT GetEndTime(pTimeHighWord, pTimeLowWord)
HRESULT GetStartTime(pDate)
Acquisition Data Methods:
HRESULT GetDataRange(Channel, pRange)
HRESULT GetDataOffset(Channel, pOffset)
HRESULT GetDataSamplePeriod(pPeriodHighWord, pPeriodLowWord)
HRESULT DefineDataFormat(Components, DataType)
HRESULT GetData(FirstSample, NumSamples, pData)
HRESULT ExportData(FirstSample, NumSamples, DataPath, Mode)
28
Deprecated
Methods by Alphabetical Listing
29
Deprecated
30
Loading...
+ 130 hidden pages