Rename Physical Channel in the TDMS file When Using the Function DAQmxConfigureLogging

Updated Feb 20, 2018

Reported In

Software

  • LabWindows/CVI

Driver

  • NI-DAQmx

Issue Details

I'm using the function DAQmxConfigureLogging to log automatically into TDMS file. 
How to rename the physical channel in the TDMS file programmatically?
 

Solution

In order to write a different name instead of the physical channel in the TDMS file, you need to change the Name_To_Assign_To_Channel parameter on the DAQmxCreateAIVoltageChan function, or any other DAQmxCreateAI function. 
 

Example:
DAQmxCreateAIVoltageChan(taskHandle,"cDAQ1Mod1/ai0","VoltageCH0",DAQmx_Val_Cfg_Default,min,max,DAQmx_Val_Volts,NULL);
DAQmxCreateAIThrmcplChan (taskHandle, "cDAQ1Mod1/ai1", "TEMPCH1", 0.0, 100.0, DAQmx_Val_DegC, DAQmx_Val_J_Type_TC, DAQmx_Val_ConstVal, 25.0, "");


In the TDMS file, you will see the "VoltageCH0" and "TEMPCH1" instead of the physical channel. 
 

WAS THIS ARTICLE HELPFUL?

Not Helpful