Hi,
Can you please explain how the following code from the example app functions:
'Find the maximum number of samples the time interval (in TimeUnits)
'the most suitable time units and the maximum oversample at the current timebase
Dim timebaseStatus As Short = 0
Dim timebase As Short = timebaseNumericUpDown.Value
Dim numSamples As Integer = CInt(tbNumSamples.Text) 'this is mine so I can select the number
Dim timeInterval As Integer
Dim timeUnits As TimeUnits
Dim oversample As Short = 1
Dim maxSamples As Integer = 0
Do Until timebaseStatus = 1
timebaseStatus = ps2000_get_timebase(ps2000Handle, timebase, numSamples, timeInterval, timeUnits, oversample, maxSamples)
If timebaseStatus = 0 Then
timebase = timebase + 1
End If
Loop
What is the math I need to do to set these values?
EDIT: Is the time/div in the scope app just there to control display? Meaning it has nothing to do with data capture? UPDATE: Found that, yes nothing to do with capture.
You can use this function to determine whether the sampling rate you wish to use for your data capture is valid.
The timebase index of 0 should correspond to the fastest possible sample interval for the device (5 ns for the PicoScope 2205A), with subsequent timebase indices corresponding to a sampling interval twice that of the previous.
The number of samples is the number of samples per channel while the max_samples parameter should give you the maximum number available based on your channel set-up.
The example starts with the smallest possible that tries to find the fastest possible sample rate.
Do you know the desired sample rate or are you trying to find the fastest possible?
I'm writing a vb.net form example right now that we will use to add the PicoScope to our in-house ATE system. It is just to learn to use the scope.
I guess I figured out that I need to think differently. I started on the bench and have been using scopes a long time, so I think like that. What I've decided is I need to think of an ADC, rather than a scope, and program that way.
Can you supply the formula used to determine the various parameters? I don't have one specific signal. I also commented in another thread, but we would like to be able to use the math functions also. THD, Freq...all would be very useful for us.
We test some pretty high end modules here at Quantum Design. Having the much higher speed available from your scope would allow us to capture high frequency noise that we just can't see sampling at 200mS intervals.
Both are correct. If it is the sample interval you are looking for (which is what you would then use to work out the timebase index) then you can use the latter.
The ps2000_get_timebase() function will indicate the maximum number of samples that can be collected based on the channels that are enabled.