Virus scan in progress. Please wait to download attachments.
This example program takes analog input from one or more thermocouple channels and performs waveform thresholding to switch a relay when the threshold is crossed.
The program consists of two DAQmx tasks: an analog input and a digital output task. The thermocouple channels are read and passed into a for loop to apply thresholding on each channel. This generates an array of Booleans indicating whether or not a user specified threshold has been crossed. If the threshold has been crossed in any channel, a case structure is used to write to a digital line, triggering the relay.
LabVIEW 2011 or compatible
DAQmx 9.3.5 or compatible
DAQmx compatible thermocouple
Digital output controlled relay
This program was tested using an NI cDAQ-9178 chassis, an NI 9211 thermocouple module, a K type thermocouple, and an NI 9481 relay module.
Steps to Implement or Execute Code
Open the attached VI.
Select the proper physical channels for your thermocouples and relay.
Specify the sampling parameters and thermocouple type.
Specify the temperature threshold
Run the program.
**This document has been updated to meet the current required format for the NI Code Exchange.**
Rob B FlexRIO Product Manager
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.