06-15-2006 03:58 AM - edited 06-15-2006 03:58 AM
while( totalRead<3000000 )
{
DAQmxErrChk(DAQmxGetReadAvailSampPerChan(taskHandle, read));
if(read>=1000)
{
DAQmxErrChk(DAQmxErrChk (DAQmxReadAnalogF64(taskHandle,1000,10.0,DAQmx_Val_GroupByScanNumber,data,bufferSize,read,NULL)));
if( read>0 ) totalRead += read;
}
}
3. If the analog input from one channel is slow and the sampling rate need not be as high as 100K, how can I simultineously sample several channels with different sampling frequencies for each of them? I referred to this post http://forums.ni.com/ni/board/message?board.id=250&message.id=16434&query.id=23366#M16434 but it only samples channels one by one, not simultineously.
Your help will be appreciated!
David
Message Edited by RedGrouper on 06-15-2006 03:59 AM
06-15-2006 04:38 AM
Hi,all,
Some sample code would be greatly apprecated!
David
06-19-2006 10:35 AM
10-04-2006 05:32 AM
Hi,
If I follow the first method, do I need to set up the Read Relative To and Offset properties? Is there sample code that realized similar functions?
Thank you very much!
David
10-05-2006 09:37 AM
Hi David,
I do not see any reason for you to set the Read Relative To or Offset properties. By default each subsequent read will start where the previous read left off. It is kind of like a bookmark. You read to a particular point in the buffer and then the bookmark shows where you stopped. So long as you do not stop or clear your task, the bookmark will remain in place and your next read will start in the appropriate location.
Once the user has pressed the button to stop, then you can stop and clear your task.
Regards,
Jennifer O.
Applications Engineer
National Instruments