04-25-2012 08:19 AM
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.
04-26-2012 07:50 AM
Bonjour Dayodavor,
Avez vous essayé d'utiliser ce programme:
Quel est le résultat?
Cordialement,
Romain DUVAL || RF & Semiconductor Staff System Engineer || CLA || CTA
National Instruments France
05-03-2012 03:48 AM
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.
05-10-2012 02:22 AM
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
05-15-2012 08:56 PM
05-23-2012 09:55 AM
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.