thanks for your reply.
I have already tried your code using the functions in the provided SDK with the same result.
I have also implemented a solution using your snippet but the result is always the same.
About the conversion between managed and com data types I use to help myself with this hyperlink and I haven't experienced any problem until now.http://msdn.microsoft.com/en-us/library/sak564ww.aspx
After a buffer memory wrap around the device sets the autostop flag to 1 and stops streaming.
Here is a snippet of the last implementation obtained from your snippet:
Declare Function AvailableData Lib "ps3000awrap.dll" (ByVal handle As Short, ByRef startIndex As UShort) As Integer
Declare Function AutoStopped Lib "ps3000awrap.dll" (ByVal handle As Short) As UShort
Declare Function GetStreamingLatestValues Lib "ps3000awrap.dll" (ByVal handle As Short) As UShort
Declare Function IsReady Lib "ps3000awrap.dll" (ByVal handle As Short) As UShort
Declare Function ps3000aRunStreaming Lib "ps3000a.dll" (ByVal handle As IntPtr, _
ByRef sampleInterval As UInteger, _
ByVal sampleIntervalTimeUnits As short, _
ByVal maxPreTriggerSamples As UInteger, _
ByVal maxPostTriggerSamples As UInteger, _
ByRef autoStop As Short, _
ByVal downSampleRatio As UInteger, _
ByVal downSampleRatioMode As short, _
ByVal overviewBufferSize As UInteger) As short
status= ps3000aRunStreaming(Handle, _
status = GetStreamingLatestValues(Handle)
Loop While IsReady(Handle) = 0
newSamples = AvailableData(Handle, startIndex)
prev = prev + newSamples
Console.Write("Collected " & newSamples & "samples, ")
Console.Write("Index = " & startIndex & " ,")
Console.WriteLine("Total " & prev)
autoStop = AutoStopped(Handle)
Loop While autoStop = 0 Or TSTrigBtnStop.Checked
here is the result:
Collected 4194213samples, Index = 0 ,Total 4194213
Collected 5samples, Index = 65445 ,Total 4194218
Collected 0samples, Index = 0 ,Total 4194218
The buffer size is set to 4194218.
Could you give it a try?
My device is a Ps3204A.
Thanks for your help