01-10-2012 08:49 AM
With TDMS logging:
DAQmxCreateTask("",&taskHandle);
DAQmxCreateDIChan(taskHandle,"dev1/port2_16","",DAQmx_Val_ChanForAllLines);
DAQmxCfgSampClkTiming(taskHandle,"/dev1/PFI5",12500000,DAQmx_Val_Rising,DAQmx_Val_ContSamps,25000000);
DAQmxConfigureLogging(taskHandle,"D:\collect.tdms",DAQmx_Val_Log,"GroupName",DAQmx_Val_CreateOrReplace);
DAQmxStartTask(taskHandle);
Is there a way to find out (monitor) the number samples acquired without stopping the task?
Norman To
Software Developer
COM DEV - Test Solution Group
155 Sheldon Drive, Cambridge, ON N1R 7H6
Tel: 519-622-2300 x4273
Email: Norman.To@comdev.ca
01-10-2012 12:34 PM
Hi Norman,
You should be able to do this with DAQmxGetReadTotalSampPerChanAcquired:
int32 DAQmxGetReadTotalSampPerChanAcquired(TaskHandle taskHandle, uInt64 *data);
Best Regards,
01-30-2014 06:39 AM
Hi,
Is there a DAQmx VI where I can read the number of captured samples? Can i use the code in this thread to create my own solution?
I am reprogramming some software on account of a hardware change (from a Goldammer card to a NI 6211 - the Goldammer had a VI where captured samples could be read as output) and I can't find any way to count the captured samples. My program waits until there are 50 samples in the 6211, then reads these into the software.
It is because i want to make sure that my software keeps up with the card, and if the number of captured samples becomes to large i want to flush these and get fresh samples instead.
As you might have guessed I'm not an experienced Labview user, and I suspect that the solution can't be too hard.
Thanks in advance,
Vilhelm
01-31-2014 09:10 AM
Hi Will,
You can use the DAQmx read.vi to read the number of samples. I hope this helps.
Regards,
William Fernandez
Applications Engineer
National Instruments