Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Find number of samples acquired with DAQmxConfigureLogging

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

0 Kudos
Message 1 of 4
(3,384 Views)

Hi Norman,

 

You should be able to do this with DAQmxGetReadTotalSampPerChanAcquired:

 

int32 DAQmxGetReadTotalSampPerChanAcquired(TaskHandle taskHandle, uInt64 *data);

 

 

Best Regards,

John Passiak
0 Kudos
Message 2 of 4
(3,380 Views)

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

0 Kudos
Message 3 of 4
(3,170 Views)

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 

0 Kudos
Message 4 of 4
(3,143 Views)