07-09-2008 04:21 PM
07-09-2008 08:55 PM
07-10-2008 11:30 AM
07-10-2008 12:21 PM
During a continuous acquisition, for example, you can always read the most recent 1000 points by setting Relative To to Most Recent Sample and Offset to -1000. Even when a Reference Trigger is configured, you can begin reading samples immediately by setting Relative To to First Sample."
Hope this clears it up
Best Regards,
07-10-2008 01:18 PM
07-11-2008 05:16 PM
Hi Vijay,
When doing a continuous acquisition the DAQ card begins sampling and buffering samples as soon as the task starts. The first 1000 samples you read will the samples 0-999. Then if you delay and read 1000 samples you will still receive samples 1000-1999. This is because the DAQ driver buffers the acquired samples. There are two ways around this. The first is to change your task from continuous acquisition to finite acquisition. Then once the task starts it will only acquire as many samples as you specify. You can then read and process those samples. When you need more samples you can stop and start the task to acquire more right then. The other option is to do what Jonathan mentioned above and control where you are reading sample from in the buffer. You can setup the task to always read the newest 1000 samples by setting the “Relative To” property to Most Recent Sample and the “Offset” property to -1000. In your case these properties are part of the DAQStream class and are the ReadRelativeTo and ReadOffset properties.
Please let me know if you have any questions and take care.
Thanks,
07-12-2008 01:23 PM
07-14-2008 06:55 PM
Hi Vijay,
This error may be caused by the sampling rate you are using. The 6120 supports up to 800kS/S using the onboard sample clock. You can go up to 1 MHz by using an external clock or generating a clock using an onboard counter and enabling Warp Mode on the card. Currently the only way I know how to enable Warp Mode is using a LabVIEW Vi available in the Developer Zone, Implementing Warp Mode on NI-6120 an NI-613x Devices. I will try to find a way to enable Warp Mode in .net for you.
In the meantime can you try lowering the sampling rate to 800kHz and see if the error goes away?
Please let me know if you have any questions.
Thanks,
07-14-2008 07:15 PM
07-15-2008 06:13 PM