04-30-2024 03:44 PM
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:
05-01-2024 07:16 AM
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).