Download the Step-by-Step Procedure PDF
Before starting this procedure, you need to complete the exercises and use the solutions in the Taking a Measurement, Using Counters and Digital I/O, and Text-Based Integration modules. You can also create a numeric control to simulate the data acquisition input.
-
Add the Mask and Limit Testing Express VI to the block diagram
-
Right-click on the block diagram and select Express»Signal Analysis»Mask and Limit Testing
-
Place the Mask and Limit Testing Express VI to the right of the DAQ Assistant, within the While Loop
-
Configure the Mask and Limit Testing Express VI
-
Select Upper Limit
-
Select Upper Constant
-
Enter the appropriate value for the Upper limit constant value to trigger the alarm when the limit has been exceeded
-
Disconnect the input to the data graph indicator, and wire this to the Signals input of the Mask and Limit Testing Express VI
-
Wire the Tested Signals output to the input of the data graph indicator to display the original signal as well as the testing limits on the same graph
-
Invert the output of the Passed output terminal of the Mask and Limit Testing Express VI to illuminate the LED indicator if the threshold has been passed
-
By default, the output of this function is true if the input is within the limits
-
Right-click the Passed output terminal and select Boolean Palette»Not
-
Place the Not function to the right of the Passed output terminal
-
Wire the output from the Passed terminal to the input of the Not function
-
Right-click the output of the Not function and select Create»Indicator
-
Resize the Passed LED indicator on the front panel to the desired size
NOTE: Controlling an external light requires an NI relay device or an external relay that can be driven by a 5 V, 8 mA digital output signal and that can complete the circuit to an external power supply that drives the light.
You can convert your DAQ Assistant Express VIs into low-level NI-DAQmx functions by right-clicking the DAQ Assistant and selecting Generate NI-DAQmx Code. The low-level NI-DAQmx API exposes more functionality and customization options for programming.