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

Associating Units with a Numeric Control or Indicator

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

You can associate physical units of measure, such as degrees Fahrenheit or kilometers/second, with any numeric control or indicator that has floating-point representation.

Complete the following steps to associate units with a numeric control or indicator.

  1. Right-click the front panel control or indicator and select Visible Items»Unit Label from the shortcut menu. A unit label appears.
Note  National Instruments recommends you do not use units with a numeric object formatted for absolute time.
  1. Enter a unit using correct abbreviations and syntax. For example, use a space to indicate multiplication and use a forward slash (/) to indicate division. If the unit syntax is incorrect, a question mark (?) appears in the label.
  2. Enter a value in the numeric object.
Note Note  When you create a unit label of any type, LabVIEW automatically converts all data on the block diagram to SI units.

To change units, use the Operating tool or the Labeling tool to click inside the unit label and change the unit string. Complete the following steps to change units and avoid unit syntax errors.

  1. Right-click the unit label and select Build Unit String from the shortcut menu to display the Build Unit String dialog box.
  2. Select the appropriate unit in the Units listbox.
  3. Click the OK button.
Note  To associate units with a graph or chart, wire an object that has an associated unit to the graph or chart. Right-click the graph or chart and select Visible Items»Unit Label from the shortcut menu to display the unit acquired through the connection. By default, LabVIEW associates an SI unit with the graph or chart based on the unit associated with the object you wire to the graph or chart. You can change the unit only to a compatible unit that measures the same phenomenon. For example, if an input to a chart has a unit of mi, for miles, you can edit the chart unit to ft, in, or m but not to N, Hz, min, acre, or A because they are not length units.

You also can use the Text property to change units programmatically. The Unit Label property creates a reference that you can use with the Text properties.


 

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