|
|
| Author |
Message |
AnthonyCSheehy Active User

Joined: 04 May 2007
Posts: 7
|
Posted: Fri May 04, 2007 10:30 am Post subject: Unbalanced stack error with PS3000 function |
|
|
I am programming in VB.net using VS2005 pro. I have a Picoscope 3224.
I have my declare function as follows:
Declare Function ps3000_run_streaming_ns Lib "ps3000.dll" (ByVal handle As Short, ByVal sample_interval As Long, ByVal time_units As Short, ByVal max_samples As Long, ByVal auto_stop As Short, ByVal noOfSamplesPerAggregate As Long, ByVal overview_buffer_size As Long) As Short
However, I get a stack imbalance whenever I call the function, with the suggestion that what I am passing to the unmanaged code is not what the unmanaged code is expecting. it maybe a coincidence, but only functions with the time_units parameter throw this error. The documentation only specifies a type of PS3000_TIME_UNIT?
short ps3000_run_streaming_ns (
short handle,
unsigned long sample_interval,
PS3000_TIME_UNITS time_units,
unsigned long max_samples,
short auto_stop,
unsigned long noOfSamplesPerAggregate,
unsigned long overview_buffer_size )
I have tried a short type but this also fails. Any help? |
|
| Back to top |
|
 |
AnthonyCSheehy Active User

Joined: 04 May 2007
Posts: 7
|
Posted: Fri May 04, 2007 11:45 am Post subject: |
|
|
actually, I have discovered the problem. The unsigned long need to be reference with a uinteger type in VB, and the time_unit is a short.
Now onto the ps3000_get_streaming_last_value() which does not have a define function in the examples... so if you have one for me, that would save me time. |
|
| Back to top |
|
 |
ziko Site Admin

Joined: 01 Dec 2006
Posts: 606
Location: St Neots
|
Posted: Tue May 22, 2007 9:32 am Post subject: |
|
|
HI and thank you for your post.
Please refer to PS3000044.pdf manual located in your installed folder, this has the necessary information (page 33).
Kind regards
Ziko |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|