Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Changing Data Ranges of Numeric Controls and Indicators

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

You can limit intermediate values of numeric controls or indicators to certain increments. For example, you might limit 16-bit integers to increments of 10 or single-precision, floating-point numbers to increments of 0.25. If you change either the limits or the increment, you also should decide what to do if the user attempts to set a value outside the range or off the increment. You also can use the In Range and Coerce function to determine if a value falls outside of a range and coerce the value to fall within the range.

Complete the following steps to designate other limits within the natural minimum and maximum data range limits.

Note  Use the fields described below to set how to handle the numeric value the user enters if that value is outside of the specified numeric range. Changing these fields does not affect values that are set programmatically, including the values of indicators.
  1. Right-click a numeric control and select Data Entry from the shortcut menu to display the Data Entry page of the Numeric Properties dialog box.
  2. Remove the checkmark from the Use Default Limits checkbox.
  3. In the Minimum field, set the low value limit and select Ignore or Coerce from the pull-down menu in the Response to value outside limits section.
  4. In the Maximum field, set the high value limit and select Ignore or Coerce from the pull-down menu in the Response to value outside limits section.
  5. In the Increment field, set the incremental value and select Ignore, Coerce to nearest, Coerce up, or Coerce down from the pull-down menu in the Response to value outside limits section.

    Response to value outside limits Description
    Ignore LabVIEW does not change or flag invalid values. Clicking the increment and decrement buttons changes the value by the increment you set, but the value does not go beyond the minimum or maximum values.
    Coerce to nearest LabVIEW increments to the nearest value. For example, if the minimum is 3, the maximum is 10, and the increment is 2, valid values are 3, 5, 7, 9, and 10. LabVIEW coerces the value 0 to 3, the value 6 to 7, and the value 100 to 10.
    Coerce up LabVIEW increments the value by one increment value.
    Coerce down LabVIEW decrements the value by one increment value.

You also can use the Numeric properties or AbsTime properties to set the data range and response to values outside limits programmatically.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit