Specifications Files (TSM)

Use an XML-based specifications file (.specs) to define a set of variables and associated numeric values that you can reference in test program code modules instead of using constants to set testing specifications. You can modify specifications files to set new values without changing test program files. You can specify the values directly or calculate the values from other variables using formulas you write with simple arithmetic expressions.

Select Semiconductor Module » Edit Test Program and select Specifications Files in the Test Program Editor to launch the Specifications Files panel. Use the Specifications File Path control on the Specifications Files panel to specify one or more specifications files to use with the test program.

Note You can use the Digital Pattern Editor (if installed) to view, create, modify, and save specifications files. Any changes to specification values you make using the NI-Digital Pattern Driver API do not affect the value of the specifications the TSM Code Module API returns.

Use the Get Specification(s) Value(s) TSM Code Module API VI or the GetSpecificationsValue or GetSpecificationsValues TSM Code Module API .NET methods to query one variable or an array of variables and return the calculated value or values. The VI and methods return an error or exception when you reference a variable that does not exist in the specifications file, which can result in a run-time error when the sequence executes.

The specifications XML schema, located at <TestStand>\Components\Schemas\NI_SemiconductorModule\Specifications.xsd, defines the structure for a specifications XML file.

Configuring Specifications

Each variable must include a section name you designate by the text you type before the period (.) in the Section.Variable column. For example, the section name for the variable DC.vcc is DC. Variables must be unique within each section of a specifications file and among all specifications files associated with the test program, including specifications files defined in the digital pattern project you associate with the test program.

You can specify the following components of each specification:

  • Section.Variable—Name of the variable to use when querying the value in test code. Variable names are case sensitive and must begin with a letter or underscore (_), are limited to A-Z, a-z, 0-9, or _ characters, and must include a period (.) to separate the section name from the variable name. Do not use math function names as variable names.
  • Formula —Numeric value or formula definition for the variable. When you reference other variables to calculate a value, ensure that you use consistent units. Use the following options to specify a formula definition:
    OptionValid ValuesExample(s)
    Numeric values5.0

    -115.003

    3.4E-15

    150 ns

    3.4 mV

    Simple math operators+, -, /, *, ( )5.0 + (3.14 * 2)
    Math functionsabs, ceil, floor, fmod, sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, deg, rad, pi, exp, pow, log, log10, sqrt, min, maxabs(-15) * 2
    Variable referencesAC.Variable1 * 15 where Variable1 is another specification within the AC section
    UnitsUnits: (take precedence over SI prefixes)
    • V, volts, Volts, volt, Volt
    • A, amps, Amps, amp, Amp, amperes, Amperes, ampere, Ampere
    • s, sec, Sec, secs, Secs, second, Second, seconds, Seconds
    • dB, db, decibel, Decibel, decibels, Decibels
    • dBm, dbm
    • F, farad, Farad, farads, Farads
    • H, henries, Henries, henry, Henry
    • Hz, hertz, Hertz
    • Ω, ohms, Ohms, ohm, Ohm
    • W, watts, Watts, watt, Watt
    SI Prefixes:
    • d, deci (scaling factor of 1E-1)
    • c, centi (scaling factor of 1E-2)
    • m, milli (scaling factor of 1E-3)
    • µ, u, micro (scaling factor of 1E-6)
    • n, nano (scaling factor of 1E-9)
    • p, pico (scaling factor of 1E-12)
    • f, femto (scaling factor of 1E-15)
    • da, deca (scaling factor of 1E+1)
    • h, hecto (scaling factor of 1E+2)
    • k, kilo (scaling factor of 1E+3)
    • M, mega (scaling factor of 1E+6)
    • G, giga (scaling factor of 1E+9)
    • T, tera (scaling factor of 1E+12)
    • P, peta (scaling factor of 1E+15)
    10 ns + 15 ns
  • Comment—Describes what the formula represents. TSM does not display the description.