03-02-2020 02:15 PM
I recently was tasked with using a PicoScope and ended up as flabbergasted as the rest of you. To further muddy the water, here is another example. I cleaned up the example code which resulted in the following. The buffers are put into a queue where the driver then updates their data. The stacked sequence structure contains a SetDataBuffers for each enabled channel.
03-03-2020 09:00 AM - edited 03-03-2020 09:03 AM
This is utterly obscure and only appears to work thanks to LabVIEW's lazy memory reallocation for optimization purposes. It is definitely not valid dataflow and can break by any number of reasons, including future LabVIEW memory allocation changes for reasons like optimization or security improvements.
The proper implementation would export additional functions from the DLL that are specifically written for LabVIEW and work with proper memory allocation schemes with a defined allocation and deallocation routine for the buffers.
03-03-2020 10:17 AM
I absolutely agree with you. Is anyone aware of any attempts to contact PicoScope and make them aware of this? Currently their SDK only includes the scope specific DLL's and their associated header files.
03-03-2020 02:17 PM
Dang... I know this isn't guaranteed to always work, but I have a project right now that uses shared memory to do very high speed data synchronization over SCRAMNet. I might have to actually try to pull this one off; right now, copying all of the data from the SCRAMNet memory location to a LabVIEW wire is taking something like half of my total loop time. Since LV doesn't normally provide ways to write directly to a memory location I have to rely on some looped dll calls anyway... and this MIGHT let me squeeze a bit more performance out of my code.
Of course any old update might break it, but I like to live dangerously. 😉
03-04-2020 10:46 AM
04-08-2020 03:05 PM
Just saw you post on Pico forum and was intrigued. I have been using the version of rapid block mode with the DVR and was quite confused as how/why it actually worked. I tried to make the code more efficient (recreating the DVRs takes several 10s of ms) to no avail as the data "vanishes" as soon as I try something more fancy like using the in place node...
I am not super hopeful they will provide something too definite as their LV examples are not far from spaghetti code.
L.
04-08-2020 03:48 PM
I was hoping for some interaction over the the Pico forum but it has been crickets.