During my usage of 5242D, I program the code using Labview. It seems all work well but when I call the function ps5000aGetValues, the elements in buffer array are always all zeros, I mean all the elements in buffer array is "0". I could make sure all there is no error code appeared on PICO_STATUS. I use block mode (not rapid block mode).
Could you please give any comments for this issue?
- (55.38 KiB) Downloaded 38 times
The issue here is due to passing a LabVIEW array into the our dll functions ps5000aSetDataBuffers() and then expecting the array to update with data from the scope, after calling another function. Is against LabVIEW coding convenient.
Also it easy to make this mistake in other programming languages, passing managed memory buffers instead of unmanaged buffers.
Unfortunately I think most of our examples break this rule but still work by chance.
We have redone the ps5000a streaming example to address this issue.
But you can use the new memory buffer vi created for this for your code. I have attached a modified version of your code, and seem run correctly.
It uses our new buffer vi's at https://github.com/picotech/picosdk-ni-labview-shared
The data types for buffers input to ps5000aSetDataBuffers are changed as pictured- We are plan to update all the streaming example possibly some of the block/rapid block examples to use these new functions.
I assume you have looked at our ps5000a examples on github-
https://github.com/picotech/picosdk-ni- ... er/ps5000a
- (61.19 KiB) Downloaded 37 times