This section provides a information on some of the more technical
aspects of EchoTk, to include scripting EchoTk, using the built-in commands,
understanding the configuration files and environment variables, and pointers
to information on Tcl, the Tool Command Language.
EchoTk Command Source Scripts
One of EchoTk's most useful features is its ability to execute command scripts. Command scripts are text files which consist of a series of EchoTk commands. A script will stop if it encounters an incomplete or improperly typed command. Therefore, it is very important to carefully examine each script prior to execution.
To create your own scripts to automate EchoTk, please consult with the support
department at Cyberware.
EchoTk Commands
Using the Commands
How the EchoTk software is started is dependent on how the system
administrator installed the software. The name most often given the EchoTk
software is simply "echotk."
The majority of commands are typed in at the EchoTk prompt. Because the wording of the prompt varies by the user, it will not be referred to explicitly. The EchoTk prompt is issued by the EchoTk software when it is ready to accept a command.
A generic EchoTk prompt is illustrated below:
| echotk> |
Commands must be typed in lower case. The arguments, such as filenames, may contain UPPER CASE. Environment Variables are typically upper case.
Typing mistakes may be corrected with the Backspace or Delete key.
Some commands may be terminated before completion by typing the interrupt key, usually <CTRL>+C. On Unix systems, you can verify which key is used for interrupt by running the Unix command stty. The character which is assigned to the stty variable intr is the character which will interrupt the current command. If scanning or image processing is interrupted before it is complete, the state of the data set is usually undefined and therefore it should be cleared (clear).
Most commands allow options to be specified. An option is a letter typed after a dash. One or more options may be specified on some commands. For best results, use the formats described in the Usage section of the command description or the examples.
Most commands also accept arguments. Command arguments are indicated in the descriptions by italics. Arguments are either words or numbers you chose. The manual describes how each command expects its arguments.
All EchoTk commands allow the use of variable expansion. Any declared Environment Variable can be used, enclosed by curly braces,{}. The variable name inside the curly braces will be replaced by the value explicitly set in a configuration file or at the EchoTk prompt. For example, if you wanted to save images of a foot according to the number of longitudes you used in the scans, you could use these commands:
| echotk> save foot1.{ECHO_NLG} echotk> save foot2.{ECHO_NLG} |
If ECHO_NLG=512, then these files would be saved as "foot1.512" and "foot2.512" and so on. Variable expansion is most commonly used with motion source files. For more information, see the description for the source command.
Only one EchoTk command utilizes graphics. The display/edit command includes commands of its own, in pop-up menu form. You will be spending a great deal of your time working in display mode, as it is how you view and visually manipulate images.
The section Command Descriptions is the main
part of this manual; it contains explanations of all the EchoTk commands in
alphabetical order. If you are looking for information of a more conceptual
nature, such as how to do a certain task for which you do not know the command
name, use the index. You should find references to the commands involved in
the operation you have in mind.
Configuration Files
The EchoTk software is configured by several configuration files. Up to four of these files can be used. A general file, known as the echo.cfg file, defines variables such as the command prompt and where to find or save your image files. The echo.cfg file also directs the software to the other configuration files for descriptions of the graphics, optical, and milling machine interfaces.
These configuration files are used to initialize the environment. The environment is accessed by the individual commands whenever configuration information is needed. Most of the information in the configuration files will be set to a default value if not defined. These defaults are reasonable in the programmers' minds while using the systems at the factory, but will probably need some modification for your uses.
When the EchoTk software starts, it looks for the environment variable ECHO_CFG to know where to find the main EchoTk configuration file. A common assignment might look like this:
| setenv ECHO_CFG /usr/local/echotk/cfg/echo.cfg |
If ECHO_CFG is not set or if its string value does not represent an existing file, you will receive an error message when you attempt to load EchoTk. To set ECHO_CFG automatically when you log in, include the setenv command in your .login file.
For most variables, more than one filename can be specified, separated by spaces. This is most useful on multi-user Unix systems, where an individual might want to customize their environment like this:
| setenv ECHO_CFG /usr/local/echotk/cfg/echo.cfg ~/my_echo.cfg |
EchoTk will read all the ECHO_CFG files first, and then read each supporting file specified by the variables ECHO_GRAPHICS_CONFIG, ECHO_OPTICAL_CONFIG, and ECHO_MILL_CONFIG (these variables are defined in the main configuration file). So, for example, if you wanted to personalize your graphics environment, you could copy your system's graphics.cfg file to your home directory, make the desired changes, and create a simple file called myecho.cfg (also in your home directory) with the following line:
| ECHO_GRAPHICS_CONFIG=~/graphics.cfg |
In your .login file, include the setenv statement suggested earlier. EchoTk would first read /usr/local/echotk/cfg/echo.cfg and then ~/myecho.cfg, which would redefine the variable ECHO_GRAPHICS_CONFIG. Then EchoTk would read the supporting files, including your custom graphics.
If you suspect a problem with the configuration files, you may view all the current settings with the EchoTk command getvar.
The section Environment Variables contains a
complete list of the variables that can be defined in the configuration files.
Sample Configuration Files
EchoTk uses many environment variables to initialize and maintain the entire
scanning setup. A complete list of these
variables can be reviewed to give the operator some insight into the workings
of the software.
Tcl
Tcl, the Tool Command Language, is an embeddable scripting language and was created by John Ousterhout. For more information, please consult the links below: