10-25-2011 01:38 PM
Hello again,
I am trying out some high sampling rates (25 Ms/s) on our USB 5132 using the NI shipping example FetchForever in VS 2008 C#.NET . Something is not optimized because even if I only grab 1 point per Fetch, the example crashes after a few hundred Fetches with:
Error BFFA4018.
Possible Reasons:
The requested data has been overwritten in memory so it is no longer available for fetching.
Status Code: -200004 .
Can I tweak the Fetch timeout, or do a Thread.Sleep, or something like that? Or, am I going to have to close the session to the 5132 between Fetches as was suggested in this post at http://forums.ni.com/t5/High-Speed-Digitizers/StreamToDisk-with-repeated-fetching/td-p/1727894 ?
Thanks,
Penny
Solved! Go to Solution.
10-25-2011 02:34 PM
Hi,
It seems to me that a 'trigger hold' would be helpful in this situation, so that I could finish acquiring before the next (immediate) trigger. However I see that the 5132 does not support trigger holds, as in http://zone.ni.com/reference/en-XX/help/370592N-01/digitizers/features_supported_smc_pxie/ . Is there some other way that I can have immediate triggers from the 5132 without running into this problem?
Thanks,
Penny
10-25-2011 02:50 PM
I just added a 15 second Thread.Sleep in my code after the call to sampleScopeSingleRecordReader.MemoryOptimizedFetchFromMultipleChannelsAsync() and got the same error. Any other suggestions would be greatly appreciated.
Thanks,
Penny
10-25-2011 07:48 PM
Hi,
OK, it is all fixed now. I went back to what I understand to be 'single record' acquisition, and then added a polling loop after the Fetch:
scopeSingleRecordReader.FetchFromMultipleChannelsAsync(channelNameTextBox.Text, 0, sampleScopeSession.Timing.ActualRecordLength, PrecisionTimeSpan.FromSeconds(50), null);
do { MessageBox.Show("fetched. waiting for scope session to close."); Thread.Sleep(1000); } while (sampleScopeSession.IsOpen);
Sorry for clogging up the boards. These digitizers are tricky.
Regards,
Penny