Limit mask test is a method for determining whether an acquired signal meets a given set of criteria. A limit mask consists of an upper boundary and lower boundary where the measured waveform must not cross. These masks are typically defined by industry standards or user-defined limits. The signal is first captured by the instrument and then compared to the limit mask to verify whether it falls between the given limits. If any part of the waveform falls outside the mask, the software should return a failure message and the location of the failure on the waveform.
Limit testing is easily accomplished using the NI-SCOPE instrument driver and LabVIEW's built-in limit testing VIs. First, the waveform is acquired by the NI high-speed digitizer using the NI-SCOPE instrument driver. Then LabVIEW's limit VIs are used to create and apply a mask to the acquired waveform. These same LabVIEW VIs also check for failures and report the location of the failures. The Limit Masks VIs, which are named Limit Specification and Limit Test, are located in the function palette under Analyze>> Waveform Monitoring.
The Limit Specification VI creates continuous or segmented masks in the time-domain or in the frequency-domain. The user calls two different instances of this VI to create the upper and lower boundaries of the limit.
The Limit Test VI performs limit testing on waveform or cluster input data. It compares the input signal to upper and lower limits. The output is wired to a graph to view the limits, signal, and failures and separate indicators to view test results.
This example shows how to integrate National Instruments high-speed digitizers with LabVIEW's waveform monitoring VIs, Limit Specification and Limit Test, to perform limit mask tests. The example shows how to take a common acquisition and apply a user-defined limit mask to the acquired signal.
Define the upper and lower limits of the mask
Apply the limit mask to the measured signal
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.