Click or drag to resize

Property Range Checking Editor

Nimbus offers two different styles of automatic range checking -- validation against a continous range of values, or checking against a list of discrete values. In both cases, Nimbus generates code that raises the IVI-defined OutOfRangeException exception if the range check condition fails.

Important note Important

The range-checking logic for any option is only executed when range-checking is enabled by the end user. This can be done by passing RangeCheck=True as part of the OptionString parameter to the driver's Initialize method, or it can be done after driver initialization via the IIviDriverOperation.RangeCheck property.


Specifies that no automatic range checking should be performed on the property.

Continuous range

Enables range checking for the selected property against a continuous range of values between the specified Minimum and Maximum. The two Inclusive check boxes are used to specify if the Minimum and Maximum values are included in the list of valid values for the property.

Discrete values

Enables range checking for the selected property against a discrete set of values specifed as a comma-separated list.

Using this option also enables coercion of the property value. If the property value falls between two values in the list of Allowed values, then the Coercion combo box indicates whether the property value should rounded to the next higher value in the list (coerce Up), to the next lower value in the list (coerce Down), or should generate an error (coercion set to None).

Model-Specific Programming with the Models Window

The Property Range Checking Editor contains a collapsible Models Window in the right portion of the editor. This window is used to customize range-checking 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 range-checking 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 customizing range-checking behavior on a per-model or per-family basis, Nimbus generates code that will use different allowed values based upon the actual model detected at runtime. See the discussion of the InitializeIdentification method to understand how Nimbus determines the connected model at runtime.

The only range checking settings that can be customized on a per-model basis are the Minimum and Maximum values for continuous range checking and the Allowed values list for discrete range checking. The range checking style (none, continuous, discrete) must be the same for all models.

To customize the range checking settings for a model

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

  2. Choose Customize settings

  3. The Minimum and Maximum text boxes or the Allowed values text box are enabled for the selected model, allowing model-specific values 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 custom range checking values.

  4. To have a property return to using the default range checking 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.