Current Publication

Creating Numeric Controls

LabWindows/CVI

Create»Numeric

A numeric control is an input control that lets you increment or decrement a numeric value using the up and down arrows. To add a numeric control to your function panel, select Create»Numeric in the Function Panel Editor.

The following items appear in the Create Numeric Control dialog box.

  • Control Label—The label that appears above the control on the function panel.
  • Parameter Position—The location of the control value in the function parameter list. For a control in a common control function panel, Parameter Position specifies the control value in the parameter lists of all function panels in a Function Panel window. The first position is 1.

    For a control on a function panel, Parameter Position specifies the control value in the parameter list after the controls in the common control function panel. The first position after the controls in the common control function panel is 1. If there is no common control function panel, the first position is 1.
  • Data Type—The data type of the values in the numeric control. You can choose from the following data types:

    int
    short
    char
    unsigned int
    unsigned short
    unsigned char
    double
    float
    long long
    unsigned long long


    or choose a user-defined data type for which you have specified an intrinsic type.
  • Default Value—The default for the numeric control, which must be a valid member of the value set.
  • Display Format—The output format. You can display integers, longs, and shorts in decimal, hexadecimal, octal, or ASCII format. You can display doubles and floats in either scientific or floating-point notation.
  • Precision—The number of digits the control displays to the right of the decimal point.
  • When you click the Value Set button, the Edit Value Set dialog box appears.
    • Minimum—The minimum value the numeric control accepts.
    • Maximum—The maximum value the numeric control accepts.
    • Inc value—The amount the numeric control value increments or decrements when the user presses the up or down arrows. The value in Inc value must divide evenly into the range of the numeric control.
Note Note  Use this numeric control when you create function panels. If you are creating a GUI, refer to the Graphical User Interface topic for information about user interface controls.