Overview of Commands

One of the notable ATEasy features is the ability to define and extend the programming language by adding user-defined statements that look like English statements. Command statements have the following syntax:

 

Syntax:

Module Name

Command Items...

[ (Arguments) ]

Examples:

DMM

Set Function VDC

 

 

DMM

Measure

(dResult)

The module name comes first in the command. This is either the current module (Program, System or Driver) or the specific name of a driver (DMM). Next in the command is a set of words that make up the command item. When you create a command item, you may attach a procedure to it. At run-time, the procedure or I/O table is called when the command statement is executed. The last portion of the command is called an argument. The argument is taken from the list of procedures that may be attached to the command.

ATEasy lets you substitute a supplied parameter when writing the commands or, alternatively, you can supply them when you use the command statement in your code.

Commands replace procedures. There are many reasons to use commands instead of procedures:

        Commands are self-documented. They look like plain English, and they reduce the need for documentation. They replace cryptic procedure names with English-like statements.

        Commands make your test program look like a TRD (Test Requirement Document).

        The commands tree structure makes it easy to locate, browse, and categorize them. A typical instrument driver may contain hundreds of commands. By grouping command items into categories such as Setup, Measure, etc., you can locate them more quickly when you need to use them.

        Commands can be used to hide arguments passed to the procedure, thereby simplifying coding.

        Commands encourage you to create a standard programming interface for an instrument. This can later be used for similar instrument types (for example, DMM), making your test programs instrument independent. For example, you can create a template containing commands for a DMM, which can be reused for each DMM you use.

        Once defined, commands appear in cascading menus under Insert on the ATEasy Menu bar. Choosing commands via menus eliminates typing and syntax errors. In addition, automatic command completion provides another way for the user to use commands.