LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SCXI - Thermocouple Channel Setup Challenge

Solved!
Go to solution

Refactoring legacy code to Win 10 to squeeze out the last bit of SCXI in the lab while we migrate to cDAQ hardware. 


Windows 10/64     CVI 2017     NIDAQmx - 19.0 (the last version supporting SCXI)

PCI-6071E card > SCXI-1001 chassis > SCXI-1102 module > SCXI-1300 terminal block

 

Synopsis: If I create a thermocouple channel in the 1102 module and run it without first creating and running it as a voltage channel, I get bad data.

Details: Using NIDAQmx functions DAQmxCreateAIThrmcplChan ( ) and DAQmxCreateAIStrainGageChan ( ) when generating channels.

 

What Does Not Work:

1) Power On on the chassis

2) Run the program

3) Create a daq task > thermocouple channel

4) Take data > data is not correct.  Almost seems like the amplifier is floating.

 

What Does Work:

1) Power On on the chassis

2) Run the program

3) Create a daq task > voltage channel

4) Take data > data is correct (voltage units)

 

5) Without exiting the program, stop the daq task and reconfigure that same channel as thermocouple

6) Take data > data is correct (temperature units)

                    ~~~ OR ~~~

5) Exit the program completely, and restart.

6) Create a daq task > thermocouple channel

4) Take data > data is correct!

 

It's like the hardware has to be set first in the 1102 module as voltage in order to work, and the thermocouple call is not making that happen. If you restart the program without powering down the chassis, it works fine. If you power down the chassis it starts over. I've tried various function calls to force the hardware setup prior to implementing the daq task without success. An SCXI-1112 Thermocouple Module runs fine first time, it's only the 1102 module that has the problem.

 

I get the same problem with the NI thermocouple example code in CVI 2017. It's definitely a hardware/OS/driver/version issue, but the fact that it works fine with the right sequence of events says there must be a path to success. 

 

Anyone have an idea on how I can kick the 1102 module in the pants to accept the thermocouple channel assignment out of the gate?

 

0 Kudos
Message 1 of 3
(1,979 Views)

Follow-Up:

If I run a voltage Test Panel in NI-MAX before running the program, it works fine when creating a thermocouple channel first time as well.  There's definitely something about establishing the communication with the module and DAQ card that is needed before you can create a thermocouple channel.

I had a ticket No. 3304152 going but killed it off after the tech person pretty much ran out of ideas. Can someone else from National Instruments support add anything?

0 Kudos
Message 2 of 3
(1,935 Views)
Solution
Accepted by topic author scottrod

Fixed it.

 

I run this code snippet for the thermocouple channel in a different task before creating the actual channel.

 

TaskHandle tempTaskHandle;
DAQmxCreateTask ("", &tempTaskHandle);
DAQmxCreateAIVoltageChan (tempTaskHandle, SC1Mod1/ai0, "", DAQmx_Val_Diff, -10.0, 10.0, DAQmx_Val_Volts, NULL);
DAQmxStartTask (tempTaskHandle);
DAQmxClearTask (tempTaskHandle);

0 Kudos
Message 3 of 3
(1,933 Views)