10-17-2011 01:33 PM
Hi Aaron,
I am just trying your suggestions now, in FetchForever - So far, I have put in this edit to grab the 2 channels instead of just 1:
// sampleScopeSingleRecordReader.MemoryOptimizedFetchFromSingleChannelAsync(channelNameTextBox.Text, 0, Int64.Parse(maximumPointsPerFetchTextBox.Text), PrecisionTimeSpan.FromSeconds(0), waveform, null); sampleScopeSingleRecordReader.MemoryOptimizedFetchFromMultipleChannelsAsync(channelNameTextBox.Text, 0, Int64.Parse(maximumPointsPerFetchTextBox.Text), PrecisionTimeSpan.FromSeconds(0), waveform, null);
As per your suggestion, I should now go and edit the definition of the output "waveform" to have two dimensions instead of 1. Could you possibily provide a hint on where to put that edit? Thanks again.
Regards,
Penny
10-18-2011 01:39 PM
Hi Aaron,
I think it is working now, having switched the data type to AnalogWaveformCollection and the functions from FetchSingle to FetchMultiple. Our only remaining problem is how to plot the data in the AnalogWaveformCollection. For the case of an AnalogWaveform, FetchForever fills in the table as:
dataTable.Rows[lastCount][channelName] = waveform.Samples[i].Value;
For an AnalogWaveformCollection, is there a similar way to parse out the samples, one at a time? I looked at the definition of AnalogWaveformCollection and do not seem to get it.
Thanks,
Penny
10-19-2011 11:14 AM - edited 10-19-2011 11:24 AM
Hi Penny,
It looks like you are on the right track with modifying the .NET example. As for the plot, I would take a look at the ConfiguredAcquisition example, which has a PlotRecords method that you can use as a reference to modify the FetchForever example.
I hope that helps! Let me know if you get hung up on this.
Regards,
Aaron
10-20-2011 10:52 AM
Hi Aaron,
Thanks, I dragged and dropped PlotRecords() from ConfiguredAcquisition.csproj and it pretty much worked right away.
Best regards,
Penny
10-25-2011 02:52 PM
Hi Aaron,
I seem to have run into some problems for high sampling rates, http://forums.ni.com/t5/High-Speed-Digitizers/Error-BFFA4018-on-USB-5132-using-NI-FetchForever-in-C/... . If you have any other thoughts could you please let me know?
Thanks,
Penny
10-25-2011 07:51 PM
Hi Aaron,
Never mind, all set. I think that the 5132 does seem to do better with the session opening and closing between triggers if the sampling rate and/or memory depth are high. Thank you also Stephen for your comments.
Thanks again,
Penny