Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

NI-DAQmx: Continuous Acquisition Thermocouple Samples - Software Timed in .NET

0 ratings | 0.00 out of 5
Print

Overview

This example demonstrates how to continuously acquire temperature readings from one or more thermocouples.

Description:

This example demonstrates how to continuously acquire temperature readings
from one or more thermocouples.

Instructions for running:

  1. Specify the physical channel where you have connected the thermocouple.
  2. Enter the minimum and maximum temperature values in degrees C that you expect to measure. A smaller range will allow a more accurate measurement.
  3. Set the loop delay in milliseconds to determine the software timed acquisition rate.
  4. Specify the type of thermocouple you are using.
  5. Thermocouple measurements require cold-junction compensation (CJC) to correctly scale them. Specify the source of your cold-junction compensation.
  6. If your CJC source is "Internal", skip the rest of the steps.
  7. If your CJC source is "Constant Value", specify the value (usually room temperature) in degrees C.
  8. If your CJC source is "Channel", specify the CJC Channel name.
  9. Specify the appropriate Auto Zero Mode. See your SCXI device's hardware manual to find out if your device supports this attribute. E-Series devices do not support this attribute.

Steps:

  1. Create a new Task. Create a AIChannel object by using the CreateThermocoupleChannel method.
  2. Set the AutoZero mode. This attribute is set to compensate for input offset errors and may not be supported by all devices.
  3. Set the loop delay and enable the software timer.
  4. Inside the timer event, read a single data point until the stop button is pressed.
  5. Dispose the Task object to clean-up any resources associated with the task.
  6. Handle any DaqExceptions, if they occur.

I/O Connections Overview:

Connect your thermocouple to the terminals corresponding to the physical
channel value. For more information on the input and output terminals for
your device, open the NI-DAQmx Help, and refer to the NI-DAQmx Device
Terminals and Device Considerations books in the table of contents.

Requirements


Filename: contacqthermocouple_swtimed.zip

Software Requirements


Language(s): C#, Visual Studio .NET, Visual Basic .NET
Additional Software: Visual Studio .NET 2005

Hardware Requirements


Hardware Group: SCC, CompactDAQ, Multifunction DAQ (MIO), SCXI, Portable DAQ
Driver: NI-DAQmx 8.5

 
0 ratings | 0.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program 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 program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM 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/).