Click or drag to resize

Attribute Simulation Editor

Nimbus offers two different styles of automatic simulation support -- returning a fixed value for the attribute and returning the last value to which the attribute was set.

Important note Important

The simulation logic for either option is only executed when simulation is enabled by the end user. This can be done by passing Simulate=VI_TRUE as part of the OptionString parameter to the driver's InitWithOptions function, or it can be done after driver initialization via the SIMULATE attribute.

Manual

Specifies that no automatic simulated value should be returned for the attribute. Selecting this option indicates that the driver developer will manually implement simulation logic in the attribute implementation.

Fixed value

Instructs Nimbus to simply return the value specified in the Value text box when the attribute is read in simulation mode. Setting the attribute to a different value has no effect on the driver behavior.

Last Value Set

Specifies that the driver should cache the value of the attribute when it is set and return the most recent value set when the attribute is read. If the attribute is read without having been set, then the value specified in the Default text box is returned.

Model-Specific Programming with the Models Window

The Attribute Simulation Editor contains a collapsible Models Window in the right portion of the editor. This window is used to customize simulation settings on a per-model or per-family basis.

Note Note

The Models Window cannot be used to define new models for the driver. The list of models supported by the driver is specified on the Models Page of the Driver Settings Editor.

The root node of the Models Window is labeled "All Models". This node can be thought of as the "default behavior" for the property. By default, all instrument models share the same simulation settings. Thus, the editor controls are initially only enabled when "All Models" is selected in the Models Window. This changes when model-specific behavior is specified, as explained below.

When simulation behavior on a per-model or per-family basis, Nimbus generates code that will use different simulated values based upon the actual model detected at runtime. See the discussion of the GetIdentificationInfo function to understand how Nimbus determines the connected model at runtime.

The only simulation settings that can be customized on a per-model basis are the constant returned when the Fixed Value option is chosen and the default value used when the Last Value Set option is chosen. The simulation style (manual, last value set, fixed) must be the same for all models.

To customize the simulation settings for a model

  1. From the Models Window, right-click on the desired model or family.

  2. Choose Customize settings

  3. The Value text boxes or the Default text box is enabled for the selected model, allowing a model-specific value to be set. The model appears in bold font for the customized model.

    Note that if a family was selected, all models in the family appear in bold font, indicating that they will all the same simulation values.

  4. To have an attribute return to using the simulation settings, right-click the model and choose Remove custom settings. The model appears in normal font and the editor controls are once again disabled when the model is selected, indicating that the model is controlled via the default settings specified when the "All Models" node is selected.

See Also

Download a complete CHM version of this documentation here.