How to Make Additional Unit and Unit Prefix Selections Available in the Numeric Limit Test Step Type
<TestStand>\Components\NI\Language\<Language>\Units.ini file defines the units and unit prefixes available in the ring controls. To add units, unit prefixes, or modify the existing units and unit prefixes, you need to modify the Units.ini file. Before you modify the Units.ini file, copy this file to <TestStand>\Components\User\Language\<Language>\ directory. Make any modifications to the Units.ini file located in the <TestStand>\Components\User\Language\<Language>\ directory.The first section of the
Units.ini file, named [SCALE_CATEGORIES], contains keys that define the unit prefixes as shown in the example below.[SCALE_CATEGORIES]TAGS = "YOTTA ZETTA EXA PETA TERA GIGA MEGA KILO HECTO DECA DECI CENTI MILLI MICRO NANO PICO FEMTO ATTO ZEPTO YOCTO"YOTTA = "yotta"YOTTA_ABBREV = "Y"YOTTA_COMMENT = "10e24"ZETTA = "zetta"ZETTA_ABBREV = "Z"ZETTA_COMMENT = "10e21"Following are four items that describe each unit prefix in this section.
- Tag nameExample:
"YOTTA" - Long nameIncluded in the report. Example:
"yotta" - Short nameCan alternately be included in the report. Example:
"Y" - CommentDisplayed to the user when selecting a prefix. Example:
"10e24"
Units.ini file, you must add all four items for the unit prefix following the format above. Notice that you must start by adding a unique tag name to the list of existing tags. Unique tag names are stored within the value of the
TAGS key that appears on the first line after the section name. Tag names are enclosed within a single set of double quotes, and are separated from each other by a space. The order of the prefix tag names, in the TAGS key value, must match the order of appearance of the prefix keys that follow that TAGS key. For example, after adding a new prefix with the tag name of
"MYPREFIX", the contents of Units.ini would resemble the following:TAGS = "YOTTA MYPREFIX ZETTA ..."YOTTA = "yotta"YOTTA_ABBREV = "Y"YOTTA_COMMENT = "10e24"MYPREFIX = "newname" (This is the name that will appear in the ring control.)MYPREFIX_ABBREV = "new" (This is the abbreviation that will appear in the units control if you select to use the "short name".)MYPREFIX_COMMENT = "explanation" (Any comment or explanation that appears at the right of the name.)ZETTA = "zetta"The second section of the
Units.ini file, named [~UNIT_CATEGORIES], contains the keys that define the unit categories in which the units are divided. These categories appear as submenus when the user selects units for a step. You can add or modify a unit category by adding to or modifying these keys. Each of the key names is then used as a section name, which contains the units of that category. An example of this is shown below.[~UNIT_CATEGORIES]DISTANCE_CATEGORY = "Distance"AREA_CATEGORY = "Area"[~DISTANCE_CATEGORY]METER = "meter"METER_ABBREV = "m"METER_COMMENT = "SI base unit"INCH = "inch"INCH_ABBREV = "in"You can add any unit to a specific unit category or a new unit category by following the structure above. For example, the
"DISTANCE_CATEGORY", shown in the ring control as "Distance" (DISTANCE_CATEGORY = "Distance"), has its units defined under the [~DISTANCE_CATEGORY] section. The keys under this section follow the same structure as the [SCALE_CATEGORIES] section, described earlier in this document.Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
