10-01-2008 06:17 PM
10-01-2008 07:46 PM
More information on the above question...
My basic problem: I need to read the temperature from a Type C thermocouple. I found the coefficients for the Type C and wanted to add them to the existing Traditional DAQ thermocouple VI. This is where I get the -10401 error. Can I mix Traditional DAQ and DAQmx calls in the same program?
I tried using the DAQmx thermocouple VI, Acq Thermocouple Sample.vi. This vi creates a DAQmx task that includes a parameter for the type of thermocouple. The task is passed to DAQmx Read (Analog DBL 1chan 1 samp).vi to read a channel and return the data. Unfortunately, this vi uses a call library function node. This code can't be modified to add the calculation for the Type C thermocouple.
10-02-2008 09:38 AM
Hello wantacobra,
You can make calls to the Traditional DAQ and DAQmx drivers in the same VI or program as long as the following two conditions are met:
1. The version of Traditional DAQ is 7.1 or higher.
2. The Traditional DAQ and DAQmx drivers are not attempting to control the same DAQ device.
I believe that the error you are getting is likely the cause of the second condition not being met. In fact, your DAQ device, the PXI-6289 is only supported in DAQmx. You can see verify that your DAQ device is supported in DAQmx only by referencing the DAQmx readme. But, programming your C type thermocouple temperature measurement task in DAQmx may be problematic as MAX doesn't support C type thermocouples. There is a work around, however. The best way is to do one of the following:
1. Set up a custom Map Ranges scale in MAX using a conversion table, and apply it to an analog input task.
2. Apply a reverse temperature polynomial using a Code Interface Node, with polynomial coefficients that are specific to your thermocouple type.
Adding cold junction compensation complicates the problem. Fortunately, someone has already tackled this problem and created VIs that add CJC to C-type thermocouple measurements, and there's no need to re-invent the wheel. The attached .zip file contains the VIs you need to apply CJC to your C-type thermocouple measurements.
Best wishes,
Wallace F.