Click or drag to resize

Using the Instrument Command Editor

The Instrument Command Editor provides a convenient way to specify instrument commands and responses that utilize parameters in the command or response. The Parameters listbox lists the method or property parameters that can be used in the command or response. Use the Insert button to a insert parameter tag for the selected parameter into the command or response. You can also type directly into the Command or Response to add parameter tags.

Once a parameter tag is added to the command or response, the formatting options for the parameter appear in the editor. The formatting options that appear vary based upon the selected parameter type. As the formatting options are changed, the associated parameter tag is updated in the command or response. The syntax used to automatically compose the format specification in the parameter tags can also be entered directly, if desired. This syntax is fully documented for each parameter type in the topic Parameter Format Specifications.

Formatting Enum and Boolean Parameters

The Instrument Command Editor is the only means to associate enum members with command or response strings. When an enum parameter is selected in the Parameters listbox, a grid appears with two columns -- one listing each enum member and another available for entering device commands (or responses) to associate with the enum members. For an enum input parameter used in a method or property command, only a single string can be entered for each enum member. For an enum output parameter used in a method or property response, multiple comma-separated strings can be entered for each enum member. The list of values represent all of the possible device reponses that should be mapped to the same enum member.

Tip Tip

It is not necessary to enter the same string for both the command and response for a particular enum value. The command associated with an enum value is automatically included as a possible response. You only need enter response strings if the device might send one of several possible string responses.

String-to-value mappings for boolean parameters are configured in the same fashion as enum parameters. For boolean parameters, only the values VARIANT_TRUE and VARIANT_FALSE are available.

See Also

Download a complete CHM version of this documentation here.