Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Save channel names with ANSI C function DAQmxConfigureLogging

I am using a 6366 PXI card to record 4 channels into one tdms file using the following code

 

	/*********************************************/
	// DAQmx Configure Code
	/*********************************************/
	DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
	DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","channel1",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
	DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai1","channel2",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
	DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai2","channel3",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
	DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai3","channel4",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
	DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",10000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,1000));

	/*********************************************/
	// DAQmx TDMS Configure Code
	/*********************************************/
	DAQmxErrChk (DAQmxConfigureLogging(taskHandle,"C:\\example.tdms",DAQmx_Val_Log,"GroupName",DAQmx_Val_OpenOrCreate));

 There is no problem in the recording, except I assumed the names I assigned to each channel in the DAQmxCreateAIVoltageChan function would be saved in the channel name properties of the file.

 

When I read the recorded files, the channel name property for each channel is empty.

 

Does the logging function assign empty names when saving the tdms file or do I need to specify them manually?

Thank you for your help.

0 Kudos
Message 1 of 6
(3,296 Views)

Bonjour Dayodavor,

 

Avez vous essayé d'utiliser ce programme:

 

TDMS logging DAQmx CVI

 

Quel est le résultat?

 

Cordialement,

 

 

Romain DUVAL || RF & Semiconductor Staff System Engineer || CLA || CTA
National Instruments France

0 Kudos
Message 2 of 6
(3,289 Views)

Bonjour Romain,

Merci de votre réponse.

Malheureusement, l'enregistrement du fichier ne comprend pas de nom de voie avec le programme que vous m'avez indiqué.

Dans le code gérant l'enregistrement, je n'ai pas vu non plus mention de noms de voie.

 

Cordialement.

0 Kudos
Message 3 of 6
(3,276 Views)

Hello Dayodavor,

 

If it doesn't work you also could use the former way to proceed as explain here.

 

regards

Romain DUVAL || RF & Semiconductor Staff System Engineer || CLA || CTA
National Instruments France

0 Kudos
Message 4 of 6
(3,267 Views)
The name of the channel that you give in the CreateChannel call should be the same as the name of the channel in the TDMS file. Is this not what you are seeing?
Thanks,

Andy McRorie
NI R&D
0 Kudos
Message 5 of 6
(3,254 Views)

Romain, Andrew thank you for your answers!

 

The name of the channel that you give in the CreateChannel call should be the same as the name of the channel in the TDMS file. Is this not what you are seeing?

Indeed, I can't see the channel name in the tdms file. However, I started thinking it might be because of the way I read them: I use Matlab, following the example here. Now that you confirm that the name should be the same, I will continue investigating.

 

 

If it doesn't work you also could use the former way to proceed as explain here.

I will try this method, thank you.

 

 

0 Kudos
Message 6 of 6
(3,232 Views)