High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

StreamToDisk with repeated fetching?

Solved!
Go to solution

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

 

 

0 Kudos
Message 11 of 16
(3,239 Views)

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

 

0 Kudos
Message 12 of 16
(3,232 Views)
Solution
Accepted by Penny

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

National Instruments
0 Kudos
Message 13 of 16
(3,224 Views)

Hi Aaron,

Thanks, I dragged and dropped PlotRecords() from ConfiguredAcquisition.csproj and it pretty much worked right away. 

Best regards,

Penny

 

0 Kudos
Message 14 of 16
(3,214 Views)

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

 

0 Kudos
Message 15 of 16
(3,197 Views)

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

 

0 Kudos
Message 16 of 16
(3,192 Views)