Tektronix TLAScript, Rev A Online Help

Deprecated
TLAScript Graphical Interface PrintedHelpDocument
www.tektronix.com
077-0034-00
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 . Box 500 Beaverton, OR 97077 USA For product information, s ales , service, and technical support:
In North America, call 1-800-833-9200. Worldwide, visit www.tektronix.com to nd contacts in your area.
Deprecated
Warranty 9(b)
Tektronix warrants that the media on which this software product is furnished and the encoding of the programs on the media will be free from defects in materials and workmanship for a period of three (3) months from the date of shipment. If any such medium or encoding proves defective during the warranty period, Tektronix will provide a repl product is furnished, this software product is provided “as is” without warranty of any kind, e ither express or implied. Tektronix does not warrant that the functions contained in this software product will meet Customer’s requirements or that the operation of the programs will be uninterrupted or error-free.
In order to obtain service under this warranty, Customer must notify Tektronix of the defect before the expiration of the warranty period. If Tektronix is unable to provide a replacement that is free from defects in materials and workmanship within a reasonable time thereafter, Customer may terminate the license for this software product and return this software product and any associated materials for credit or refund.
THIS WARRANTY IS GIVEN BY TEKTRONIX WITH RESPECT TO THE PRODUCT IN LIEU OF ANY OTHER WARRANTIES, EXPRESS OR IMPLIED. TEKTRONIX AND ITS VENDORS DISCLAIM ANY IMPLIED W TEKTRONIX’ RESPONSIBILITY TO REPLACE DEFECTIVE MEDIA OR REFUND CUSTOMER’S PAYMENT IS THE SOLE AND EXCLUSIVE REMEDY PROVIDED TO THE CUSTOMER FOR BREACH OF THIS WARRANTY. TEKTRONIX AND ITS VENDORS WILL NOT BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES IRRESPECTIVE OF WHETHER TEKTRONIX OR THE VENDOR HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DA
acement in exchange for the defective medium. Except as to the media on which this software
ARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
MAGES.
Deprecated
Deprecated
Table of Contents
Overview
Introduction ......................................................................................................... 1
Starting the TLAScript Application . .................................... .................................... ..... 2
Connecting to a Server .................... .................................... .................................... . 3
Connecting to Multiple Servers ... ... . . .... . .... ... . . .... . .... ..... .... . .... ..... .... . .... . .... .... . .... . .... .... . 4
Multiple Servers .... ... . . .... . .... ... . . .... . .... ... . . .... . .... ... . . .... . .... ... . . .... . .... ... . . .... . .... ... . . .... . .. 4
Example of a TLAScript Application ... .................................... .................................... . 5
Graphical Interface ........ .................................... .................................... ................. 6
Menus and Status Bar ................... .................................... .................................... ... 7
Syntax................................................................................................................ 9
Quick Reference
TLAScript Commands ............ .................................... .................................... ........ 11
TLA Application Commands .................................................................................... 12
LA Module Commands ................... .................................... .................................... 13
DSO Module Commands ........... .................................... .................................... ...... 14
Table of Contents
Commands by Alphabetical Listing
<ServerName>..................................................................................................... 15
# Comment ......................................................................................................... 15
Connect ............................................................................................................. 15
Connections .......................... .................................... .................................... ...... 17
DeneDataFormat (LA Module)................................................................................. 17
DeneDataFormat (DSO Module)............................. .................................... .............. 19
DeneRangeSymbolOptions ..................................................................................... 20
DeleteChannelGroup (LA Module) ............................................................................. 21
Disconnect.......................... .................................... .................................... ........ 22
Echo................................................................................................................. 22
Enabled (LA Module) ................................... .................................... ...................... 23
Enabled (DSO Module)........................................................................................... 23
Execute ....................... .................................... .................................... .............. 24
ExternalSignalIn ................................................................................................... 25
ExternalSig
ExternalSignalOutLowTrue .................... .................................... .............................. 26
Exit.......... .................................... .................................... ................................ 27
GetBeginTime (LA Module) ..................................................................................... 27
GetBeginTime (DSO Module) ........................... .................................... .................... 27
GetBytesPerSample (LA Module)........... .................................... ................................ 28
nalOut ................................................................................................. 26
i
Deprecated
Table of Contents
GetChannelGroup (LA Module). .................................... .................................... ........ 28
GetChannelName (LA Module) ..... .................................... .................................... .... 28
GetCounterValue (LA Module) .. .................................... .................................... ........ 29
GetData (LA Module)............................................................................................. 29
GetData (DSO Module)........................................................................................... 30
GetDataOffset (DSO Module) ................................................................................... 30
GetDataRange (DSO Module) ............... .................................... ................................ 31
GetDataSamplePeriod (DSO Module) ............ .................................... .......................... 31
GetDiagCalStatus.............................. .................................... ................................ 31
GetEndTime (LA Module) ....................................................................................... 32
GetEndTime (DSO Module) ..................................................................................... 32
GetFirstModuleSlot . .................................... .................................... ...................... 32
GetGroupNames (LA Module)................................................................................... 33
GetGroupSize (LA Module).................................. .................................... ................ 33
GetModuleNames ... .................................... .................................... ...................... 33
GetModuleProperties............................ .................................... .............................. 34
GetModuleSlotByName ............ .................................... .................................... ...... 34
GetModuleType............ .................................... .................................... ................ 35
GetNumModuleSlots.............................................................................................. 35
GetNumSamples (LA Module) .................................................................................. 36
GetNumSamples (DSO Module) .................................. .................................... .......... 36
GetRepetitiveStopReason..... .... . .... . .... ..... ..... .... . .... . .... ..... ... . . .... . .... . .... ... . . .... . .... . .... . .. 36
GetRunStatus....................................................................................................... 37
GetStartTime (LA Module)....................................................................................... 37
GetStartTime (DSO Module)..................................... .................................... ............ 37
GetSwVersion ............................ .................................... .................................... .. 38
GetTimerValue (LAModule) ..... .................................... .................................... ........ 38
GetTimestampMultiplier (LA Module) . ..... ..... .... . .... . .... ..... ... . . .... . .... . .... ... . . .... . .... . .... . .... 38
GetTriggerSample (LA Module)..................... .................................... ........................ 39
GetTriggerSample (DSO Mo
GetTriggerTime (LA Module) ............... .................................... ................................ 39
GetTriggerTime (DSO Module) ................................................................................. 40
Hide ................................................................................................................. 40
LoadModule (LA Module) ....................................................................................... 40
LoadModule (DSO Module) . .................................... .................................... ............ 41
LoadScript........ .................................... .................................... .......................... 42
LoadTri
LoadSymbolFile ................................................................................................... 43
LoadSystem .. .................................... .................................... .............................. 44
Local Server........................................................................................................ 44
MemoryDepth (LA Module) ....................... .................................... .......................... 44
Name (LA Module) ............................................................................................... 46
gger (LA Module)........................................................................................ 43
dule)....................... .................................... .................... 39
ii
Deprecated
Index
Table of Contents
Name (DSO Module) ............................................................................................. 46
Pause ................................................................................................................ 47
Repetitive... . .... . .... ..... ... . . .... . .... . .... .... . .... . .... . .... . .... .... . .... . .... . .... . .... .... . .... . .... . .... ... 47
Run.................................................................................................................. 48
RunCount ................................. .................................... .................................... .. 48
SaveModule (LA Module)........................................................................................ 49
SaveModule (DSO Module).......................... .................................... ........................ 50
SaveSystem......................................................................................................... 51
SetChannelGr
SetChannelName (LA Module) ................................ .................................... .............. 53
SetEventValue (LA Module) ................................. .................................... ................ 54
SetTriggerPosition (LA Module) . ..... .... . .... . .... ..... ..... .... . .... . .... ..... ..... .... . .... . .... ..... ... . . .. 55
Show ........................................ .................................... .................................... 55
Standard Out and Standard Error ................................................................................ 56
Stop ................................................................................................................. 56
oup .............................. .................................... ................................ 52
iii
Deprecated
Table of Contents
iv
Deprecated
Overview Introduction
Overview
Introduction
TLAScript is a standalone application program that runs on the TLA mainframe and provides a scripting interface to the TLA application. TLAScript is an interpreter that processes commands that are read from a script le or a
The TLAScript commands are similar to the TPI.com commands in the TLA application. Most of the TPI.com comm
In essence, TLAScript provides a quick and easy way for you to programmatically control the TLA application
Although TLAScript is a good rst step toward programmatically controlling the TLA system, the TLAScript a when compared to other scripting/programming languages like Visual Basic and ActivePerl (a variety of Perl that has C
COM
reenteredbyyouthroughtheT
ands have a corresponding
using a script le rather than writing a full-blown program that directly uses the TPI application.
pplication is not a powerful or full-featured TLA programming language. It has limitations
OM capabilities).
LAScript graphical interface.
TLAScript command.
The Component Object Model (COM) is a software architecture that allows applications to be built from binary software c omponents. See www.microsoft.com for more information.
For example, TLAScript does not support variables and does not provide any kind of control ow capability. If you need these features you may want to investigate the two scripting/programming languages mentioned previously.
General Characteristics
TLAScript application software:
Commands from the TLAScript are directly executed by the TLAScript application and do not have an effect on the TLA application (server) software.
Is compatible only with the corresponding versions of the TLA Application software. For example, the TLAScript application Version 4.1 will only work with TLA Application software Version 4.1.
1
Deprecated
Overview Starting the TLAScript Application
Starting the TLAScript Application
You have three methods of starting the TLAScript application:
The easiest way is to start the TLAScript application using the Windows Start menu. Locate and click Start > Programs > Tektronix TLA 700 > TLAScript to display the T
You can also start the TLAScript application from an MS-DOS command prompt window by entering C:\Program Files\TLA 700\System\TLAScript.exe from the command line. If switches and arguments are not used, then the TLAScript graphical interface is displayed.
Double-click on a ".tls" le. Double-clicking has the same functionality as typing a TLAScript le and only works on text les with the TLAScript script extension ".tls".
LAScript graphical interface.
Following are examples that use a combination of switches and arguments. See S information a bout switch and argument combinations.
Examples.
TLAScript
This brings up the TLAScript graphical interface.
TLAScript C:\MyScript.tls
This executes the MyScript.tls script, then automatically connects to the default server (the local server). It does not display the TLAScript graphical interface unless an error is encountered in the script.
TLAScript /s My TLA C:\MyScript.tls
This connects to the server named MyTLA, then executes the script named MyScript.tls. It does not display the TLAScript graphical interface unless an error is encountered in the script.
TLAScript /b C: \myscript.tls
This executes the script MyScript.tls in batch mode, the output goes to standard out, and errors go to s
TLAScript"C:\TLA Scripts\myscript.tls"100
This exe space in the folder name, and the value 100 is assigned to the script variable %1.
tandard error.
cutes the myscript.tls script within the folder TLA Scripts. The quotes are used because of the
yntax for more
2
TLAScr
ipt /c Run
This switch executes the Run command on the default server (the local server).
Deprecated
Overview Connecting to a Server
Connecting to a Server
When you open the TLAScript application, it is not connected to a TLA server. You must establish a connection.
Server
A server is the
Use the Connect command without an argument to connect to the local server.
Local Server
A local server is usually the TLA (server) application that resides on the same machine that TLAscript is running on.
Example. Connect
See Also. Di
LA Module Commands, DSO Module Commands, TLAScript Commands, and TLA Application
Commands.
sconnect
TLA application software.
3
Deprecated
Overview Connecting to Multiple Servers
Connecting to Multiple Servers
You may want to connect to multiple servers to control more than one TLA mainframe. To connect to multiple severs, use the C
onnect command with an argument.
Example.
When a new conn
Current Server
The current server is the s erver receiving commands when no server name is specied in the command.
When multiple servers are connected, TLAScript can only send commands to one server at a time. You can check which server is the current server by viewing the status bar in the lower right-hand corner of the T
c
ommand entry box that the TLAScript is already connected to.
The C name of a r
Remote Server
A remote server is a server (TLA application) that is running on a remote TLA mainframe on the network. To connect to a remote server you must set up the TPI application on the client and server machines. Refer to Setting Up TPI in the TPI documentation.
Connect MyTLA
ection is established using the C
LAScri
pt window . You can also change the current server by entering another server name in the
tions command will list all the servers that TLAScript is currently connected to. The server
onnec
emote server is the network name of the remote TLA mainframe.
onnect command, that server becomes the current server.
Multiple Servers
TLAScript allows simultaneous connections to multiple servers. The current server receives all entered commands that do not include a server specication. A server must be connected to before it can receive commands, but it does not need to be the current server for commands to be directed to it.
Commands can be directed to any connected server by preceding the command with "server: ". For example, MyTLA:show would direct the Show command to the server MyTLA even if it were not
4
the current server.
When there are multiple servers connected, one of the servers is considered the current server. To change the current server enter the server name you want to be switched to (a connection to this server must already have been established), or by specifying a new connection with the C
onnect command.
Deprecated
Overview Example of a TLAScript Application
Example of a TLAScript Application
Following is an example of a TLAScript le:
#…………………………………………………………………………………………………………………………………………………………………………………………
#Connects to the local TLA server, loads the TLA setup,
#then does an acquisition which times out after 30 seconds
#……………………………
Connect
LoadSystem C:\TLA\Default.tla
Run/w 30
#…………………………………………………………………………………………………………………………………………………………………………………………
#Get the Address, Data and Control Group values for
#the rst 500
#…………………………………………………………………………………………………………………………………………………………………………………………
MyLA.DefineDataFormat Main GroupList:Address,Data,Control Space
MyLA.GetData 0 5000 > C:\TLA\Ra wData.txt
#…………………………………………………………………………………………………………………………………………………………………………………………
#Extract the samples that have a specic address value
#and put the
#Then display #the processed data using Notepad.
#…………………………………………………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………………………
0 samples and save them to RawData.txt.
m in CookedData.txt.
Execute "grep -n 75757 575 C:\TLA\RawData.txt > C"\TLA\CookedData.txt
Execute start notepad C:\TLA\CookedData.txt
If comments are included with the script, they will also appear in the History list. See TLAScript window.
5
Deprecated
Overview Graphical Interface
Graphical Interface
TLAScript Graphical Interface
Command Entry Box. The Command Entry box is located at the top of the TLAScript window. In the
Command E attempt to match the command you entered to a list of TLAScript commands. Pressing Enter causes TLAScript to interpret your entry, execute the command, clear the window, and then be ready for the next command entry.
The arrow keys scroll forwards and backwards through previously typed commands.
Command Prompt Box. The Command Prompt box is located under the Command Entry box. The
Command Prompt box shows the syntax of the command that you are currently entering from the Comman
History Window. The History window is located in the center of the TLAScript window. The History
window stores and displays all commands previously entered in the Command Entry box, along with error messages and outputs (except binary data returned from a call to GetData).
When the maximum entries (64 K) are lled in the History window, TLAScript removes entries from the beginning of the history list as you make new entries.
ntry box, enter the next TLAScript command that you want to execute. TLAScript will
d Entry box.
6
Deprecated
Overview Menus and Status Bar
Menus and Status Bar
TLAScript Graphical Interface
TLAScript window has four menus: File, Edit, Help, and command entry-box menu (right click).
File Menu
Open Enter the name of the script you want to open. This menu selection is the
same as typing in the LoadScript command.
Save If the history list has not yet been saved, then this menu selection acts the
same as the "Save A s" menu item. Otherwise, "Save" simply saves the history list over the previous version that was saved (with the same option for script or h istory selected).
Save As... This menu selection prompts you for a le, but with the additional option of
saving the history list as a scri pt le or as a text le.
Exit
Quits TLAScript application. This menu selection is the same as typing the Exit command.
7
Deprecated
Overview Menus and Status Bar
Edit Menu
Cut, Copy, Past
Execute
Clear History Removes all items from the History box.
Command Entry Menu
Cut, Copy, Paste, and Delete
Select All This selects the entire contents in the Command entry box.
Undo This reverses only the cut, copy, paste and delete commands.
Status Bar
The Status Bar is located at the bottom of the TLAScript window. The Status Bar displays the current server, or defaults to "No Connections" if TLAScript is not connected to any server.
e
These menu sele
This menu exec is the same as pressing Enter from the Command Entry Box.
These behave as common Windows commands.
ctions are active only on the Command Edit Box.
utes whatever command is in the Command Entry Box and
8
Deprecated
Overview Syntax
Syntax
TLAScript[/sserver] [/ccommand] [ [/b]ScriptFile[script args] ]
The TLAScript program executes according to The following is a list of switches and arguments that work in conjunction with each other.
NOTE. Most of the TLAScript commands are case insensitive, and the arguments are delimited by spaces or tabs.
If a module name or argument has embedded sp
Example.
"LA 1". Enabled False
LoadSystem "C:\my documents\my system.tla"
[/sserver]. This switch species the default server. When used with the
argument, this switch will cause TLAScript to automatically connect to the named server before executing the command or script le. When used without the the server that is connected to when no argument is given for the C remote server is the network name of the remote TLA mainframe.
To connect to a remote server you must set up the TPI application on the client and server machines. Refer to Setting Up TPI in the TPI documentation.
[/ccommand]. This switch species a single TLAScript command to execute. When the TLAScript
application starts up, the graphical interface is not displayed, the d command is executed, then exits the TLAScript application. Any output goes to standard out and any error messagesgotostandarderror.
the combination of switches and arguments that you use.
aces, use double quotes around it.
/c switch or with the file
/c switch or the script file argument, this species
onnect command. The name of a
efault server is connected, and the
Default S
Specify the default by using the /s switch (if you do not use this switch, the TLA server on the local server is the default). When you use the /c switch to execute a single command the default server is the server that you connect to.
[scriptle]. This argument species which TLAScript le to execute. TLAScript starts up without
displaying the graphical interface, executes the specied script, then exits. If an error is encountered while executing the script, the TLAScript graphical interface pops up and displays the current history and the error message, otherwise no graphical interface appears. TLAScript does not automatical server in this scenario - you must have an explicit Connect command in the scriptle.
[/b scriptle]. This switch species which TLAScript le will execute in batch mode. TLAScript starts
up without displaying the graphical interface, executes the specied script, then exits. With this switch, the graphical interface is not displayed under any circumstances. An error in the script execution will
erver
ly connect to any
9
Deprecated
Quick Reference Syntax
halt execution of the script and exit TLAScript with all output going to standard out and any errors going to standard error.
[scmptle script args]. The argument species which TLAScript le to execute and passes the command
line arguments to the script. The arguments to the script can be referenced in the script in the same manner as DOS batch le command line arguments. When referring to command line arguments %N refers to the Nth command line argument after the last switch. A script le counts as one of these command line arguments and would be %0. So, given the command line
dbe
100, % 0
Comments. Comments are allowed from both the command entry box and from within scripts and they
are denoted by the ‘#’ character. Any text following the ‘#’ character, up until the end of line character, will be ignored.
See. C
QuickReference
woul
ecting to a server
onn
C:\myscript.tls and %1 would be 100.
TLAScript /s MyTLA C:\ myscript.tls
10
Deprecated
Quick Reference TLAScript Commands
TLAScript Commands
The following commands are handled directly by TLAScript and have no effect on any connected TLA servers:
Application
Connect [Server]
Disconnect
Connections
LoadScript ScriptFile
Echo Message
Execute Executable [command line arguments]
Pause
#Comment
<ServerName>
Exit
[Server]
[/t Time] | [Message]
See. Starting TLAScript Application.
See Also. L
A Module Commands, DSO Module Commands, and TLA Application Commands.
11
Deprecated
Quick Reference TLA Application Commands
TLA Application Commands
All the following commands result in a communication with the TLA application (server). These commands are associated with the TLA application and not to a specic module in the TLA mainframe. So you can thin
In addition, the following commands have similar methods in the TLA Programmatic Interface (TPI).
DeneRangeSymbolOptions FileFormat SymbolTypes Reserved Bound1 Bound2 OffsetType SymbolOffset
ExternalSignalIn [SignalName]
ExternalSignalOu t [SignalName]
ExternalSignalOu tLowTrue
GetDiagCalStatus
GetFirstModuleSlot
GetModuleNames
GetModulePrope rties SlotNum
GetModuleSlotBy Name
GetModuleType SlotNum
GetNumModuleSlots
GetRepetitiveSto pReason
GetRunStatus
GetSwVersion
Hide
LoadSymbolFile
LoadSystem
Repetitive [Value]
Run
RunCount SaveSystem
Show
Stop
k of these commands as being associated with the TLA system.
[Value]
ModuleName
Path
Path
[/w[WaitLength]]
Path UserComments SaveData
See Also. LA Module Commands, DSO Module Commands, and TLAScript Commands
12
Loading...
+ 46 hidden pages