Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Can read dedicated thermocouple channel on only one out of two BNC 2120 connected to same DAQ

Dear Community,


I cannot measure the thermocouple temperature on AI9, the dedicated channel for thermocouples on my second BNC 2120 connected in my DAQ, altough I can measure the temperature of a thermocouple on AI1, the dedicated channel for thermocouples on my first BNC 2120. I can also measure voltage on all channels (AI0 to AI15).

 

I have connected 6 BNC 2120 to 3 PXIe-6358 DAQ devices in a PXIe-1073 chassis. They are multifunction DAQ with 16 AI channels, where AI0-7 go into connector 0 and AI8-15 go into connector 1. The BNC-2120 is listed in the documentation among the accessories that can be connected to X-series DAQ. It is written that you can use one BNC accessory on connector 0 of any X Series device, and that an additional BNC accessory may be used on connector 1 of any X series device except the NI 6345/6349/6355/6365/6375 devices (so mine should work).


The BNC 2120 have a dedicated thermocouple channel on AI1 (with built in CJC), which I can read using LabVIEW or with this simple python code:

 

import nidaqmx
import nidaqmx.constants as constants
with nidaqmx.Task() as task:
task.ai_channels.add_ai_thrmcpl_chan(physical_channel="PXI1Slot5/ai1", units=constants.TemperatureUnits.DEG_C, thermocouple_type=constants.ThermocoupleType.K, cjc_source=constants.CJCSource.BUILT_IN)
data = task.read()
print(f"Acquired data: {data:f}")

 

This works for "PXI1Slot5/ai1", but when I execute the code above with physical_channel="PXI1Slot5/ai9" instead, I get the following error:
"DaqError: Physical channel specified does not exist on this device.

Refer to the documentation for channels available on this device.
Physical Channel Name: ai16
Channel Name: PXI1Slot5/ai9
Task Name: _unnamedTask<1>
Status Code: -200170"

 

I would be grateful if anyone who has encountered the same problem before could share his or her ideas for a solution or workaround.

 

 

Here is some additional information in case it might help:

 

  • I get the same error for all channels AI8-15 of the BNC 2120 in the second slot (connector 1), even those that are not dedicated thermocouple channels. In comparison, I get no error for all the channels of the BNC 2120 in the first slot (connector 0) except AI0 (so no error for AI1-7). For AI0 I get a different error though if I try to read thermocouple temperature:
    "Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property. Property: AI.Thrmcpl.CJCSrc
    Requested Value: Built-In
    Possible Values: Constant Value, Channel
    Channel Name: PXI1Slot5/ai0
    Task Name: _unnamedTask<2>
    Status Code: -200077"
  • All channels are displayed when I want to select a thermocouple channel on the vi, and I can measure voltage on all channels. For instance replacing task.ai_channels.add_ai_thrmcpl_chan() with task.ai_channels.add_ai_voltage_chan() in the code above works for all physical channels "PXI1Slot5/ai0" to "PXI1Slot5/ai15".
  • The problem described above occurs in the same way for the 4 other BNC 2120 connected to 2 other PXIe-6358 DAQ, and measuring voltage works on all their channels too.
  • When switching the connector slots of the two BNC 2120, the problem remains.
  • Switching thermocouples does not change anything.
0 Kudos
Message 1 of 2
(137 Views)

I actually found a workaround which I post here for reference. I realized that I only had this problem with reading thermocouple temperature described above when I used the built-in CJC source. So instead, I read the voltage of the CJC channel (AI8), convert it into temperature and use it as the user defined CJC value for the thermocouple channel (AI9).

with nidaqmx.Task() as task0, nidaqmx.Task() as task:
    task0.ai_channels.add_ai_voltage_chan(physical_channel="PXI1Slot5/ai8")    
    CJCtemp = 100*task0.read()
    task.ai_channels.add_ai_thrmcpl_chan(physical_channel="PXI1Slot5/ai9", units=TemperatureUnits.DEG_C, thermocouple_type=ThermocoupleType.K,
                                         cjc_source=constants.CJCSource.CONSTANT_USER_VALUE, cjc_val=CJCtemp)
0 Kudos
Message 2 of 2
(89 Views)