Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring multiple thermocouple channels simultaneously via 9213 (with 9171 USB)

Solved!
Go to solution

I am just getting back into Labview after a 10 year absence.  My first goal is to measure Type J and T thermocouples with a 9213.  The 9213 has 16 channels, but the example VIs I have found so far only allow one channel to be selected at a time.  Ideally it would be great to have the ability to select which of the 16 channels to read at any given time (i.e. any combination from 1-16 and skipping channels if necessary).

 

Second, will selecting multiple channels for simultaneous reading affect the sample rate?  For example, if 10 samples can be read per second, and I select 16 channels, does it take 1.6 seconds to read all of them?  And what happens if I had set the sampling rate to 1 second in the previous example?  Does it keep track of 'intended' cycles and keep running uncompleted loops after I instruct it to stop?

 

Third, I have not figured out whether it is possible to assign a different thermocouple type to each channel.  Can I combine Type J and T thermocouples on the same card?  Is so, then how to define each channel individually?

 

Fourth, I have encountered error readings when selecting an open channel on the VI for the 9213.  Is this normal?  Ideally I would like to be able to swap thermocouples during continous measurement and am concerned that the program will crash. 

 

Two example VIs I found are: "Thermocouple - Continous Input.vi" from the NI Example Finder.  The other was via the sample project "Continuous Measurement and Logging (NI-DAQmx)".

0 Kudos
Message 1 of 24
(10,621 Views)

I was thinking about this over the weekend and one possible solution is to run multiple VIs, with each VI defining its own channel.  However, I'm not sure if the cDAQ and NI-DAQmx can handle multiple programs running simultaneously and how taxing that would be on the processor and memory.  I will pursue that path unless I get feedback here indicating another approach.

0 Kudos
Message 2 of 24
(10,590 Views)
The examples I look at do enable the selection of multiple channels. When you click on the channel control, simply click on Browse.

For configuring each channel differently, the configure channel function can be placed inside a for loop where you create an array for each configuration value (i.e. Range, type, etc.). Be sure to use a shift register for the task as you must use a single task. You simply cannot use multiple VIs with multiple tasks.
Message 3 of 24
(10,585 Views)

This morning I am focusing on using the Labview built-in example program for measuring thermocouples with 9213.  If I simply create an executable of this program and take it to my monitoring computer I get an error message regarding the naming of the channel.  It doesn't like the Dev1 and suggests using cDAQMod1/ai0 or cDAQMod2/ai0.  I do not understand the difference between Mod1 or or Mod2.  If I select past the error message then I can select a channel on the dropdown list and if I select a channel where a thermocouple is attached I can get a reading.  However, the graph continually overwrites itself, so I will need to make some changes to enable continuous plotting with historical measurements remaining.

 

I have not figured out how to select multiple channels simultaneously, but in the context help with the stock program it mentions using commas or colons to select multiple channels (it isn't clear how I could achieve that with a simple dropdown dialogue box as provided with the stock program).  So I may need to replace the interface for specifying channels.

0 Kudos
Message 4 of 24
(10,580 Views)
As I said, the drop-down for channel selection do allow for multiple channels. Please use the browse option and use shift-click or ctrl-click. To do it manually, the syntax is Devx/ai0:4 for example of continuous channels or Devx/ai0, Devx/ai3 for non-continuous channels.

A graph always gets overwritten. That is by design. Look into using a chart.
0 Kudos
Message 5 of 24
(10,577 Views)

Understood, it behaved as you described.  I'm reading through the DAQmx help section to better understand the inputs before I start coding a variation to the inputs and will replace the graph with a chart.