02-28-2014 02:54 PM
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)".
Solved! Go to Solution.
03-03-2014 07:18 AM
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.
03-03-2014 08:02 AM
03-03-2014 08:30 AM
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.
03-03-2014 08:42 AM
03-03-2014 08:48 AM
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.