A command is a user-defined statement that calls an attached procedure or I/O table when that statement is used in a test or procedure within a Program, System, or Driver module. It can be public or not as defined in Where to Create and Use Commands. Commands offer several advantages:
Once defined, commands appear in cascading menus on the ATEasy menu bar. Their organization makes them easy to use. Choosing commands from menus eliminates the syntax errors that can appear if you enter commands manually.
They simplify programming because you can substitute easy-to-understand, English statements for cryptic procedure names. Thus, commands can make a program more readable.
Carefully worded commands can enhance or eliminate additional documentation.
Commands can be device-independent. If you code using commands, you can change the driver without having to re-code.
Commands are mainly used in instrument drivers. Complex statements can be simplified and divided into smaller sections that are easier to use.
The following shows command syntax and an example:
Syntax |
Module Name |
Command Items... |
[ (Arguments) ] |
Example |
DMM |
Set Function |
(iFunction) |
Name |
Description |
Module Name |
Name of the module in which the command is defined. Names can be the current module such as Program, System, or Driver, or a Driver name such as DMM. You do not create this name. Instead, ATEasy makes it part of the command. |
Command Items |
Words that you create to become part of the command. From one to an unlimited number of command items can form one command. A command item does not become a command until you attach a procedure to it. |
Arguments |
An optional value or variable that is passed to the attached procedure. A command can have zero to an unlimited number of arguments, depending on the number of parameters in the attached procedure. For more information on procedures and parameters see Procedures. |
For information on systems and drivers, see Overview of System, Drivers, and Interfaces.