ps4000aGetValuesBulk Hanging Up

Post your LabVIEW discussions here
Post Reply
jmadsenee
Newbie
Posts: 0
Joined: Fri Jun 03, 2016 2:59 pm

ps4000aGetValuesBulk Hanging Up

Post by jmadsenee »

I am using a Picoscope 4424A and the ps4000a.dll in a LabView vi using rapid block mode. I have written a basic vi that only acquires and then averages data. I set up a data buffer, start the aquisition (ps4000aRunBlock()), wait until the data is ready (ps4000aBlockReady()), then run ps4000aGetValuesBulk() to retrieve the data. This runs various amount of time (maybe over 19,000 cycles or maybe only 30), and then locks up in ps4000aGetValuesBulk(). Code attached. Anyone have any ideas?

Thanks!
Attachments
GetRapidBlockPS4000_2Ch.zip
(532.65 KiB) Downloaded 197 times

AndrewA
PICO STAFF
PICO STAFF
Posts: 401
Joined: Tue Oct 21, 2014 3:07 pm

Re: ps4000aGetValuesBulk Hanging Up

Post by AndrewA »

Hi,
I don't know why this would be happening.
But I can see the data types for "pParameter" and "lpReady" variables for the the "ps4000aRunBlock" function are 32 bit data types.
So are you using a 32-bit version of LabVIEW?
Also "lpReady" should be a I32 not a U32 data-type. You could change this and see if it makes any different to how long the code runs.
Regards Andrew
Technical Specialist

jmadsenee
Newbie
Posts: 0
Joined: Fri Jun 03, 2016 2:59 pm

Re: ps4000aGetValuesBulk Hanging Up

Post by jmadsenee »

Hi Andrew,

Yes, I am using 32 bit LabView. I did change the "lpReady" data type; it didn't help. I've noticed that it depends on which USB3 cable I use how long it will run. Does the Picoscope recover if there is a communication error? I've also broken into a cable and monitored the +5V with a scope. What is the minimum voltage required by the Picoscope?

Thanks!

jmadsenee
Newbie
Posts: 0
Joined: Fri Jun 03, 2016 2:59 pm

Re: ps4000aGetValuesBulk Hanging Up

Post by jmadsenee »

Hi Andrew,

When it locks up, it never returns from the ps4000aGetValuesBulk() function. What could possibly cause this?

AndrewA
PICO STAFF
PICO STAFF
Posts: 401
Joined: Tue Oct 21, 2014 3:07 pm

Re: ps4000aGetValuesBulk Hanging Up

Post by AndrewA »

Hi,
I have not heard any issues with ps4000aGetValuesBulk() locking up.

Are you using one of our blue USB cables? They have thicker wires for the gnd and +V to reduce voltage drops, compared with most other USB cables.
I expect this a USB 3 cable? Max. 3m lenght is recommend for USB 3 cables.
The USB 5v rail seen at the scope should stay with the USB spec of 4.5V - 5.5V.
If have access to a powered USB hub this should help if the PC/laptop is not outputting enough power.
Have you tested the same setup of scope and USB cable but using PicoScope 6/7 software?
You can also try different USB ports on your PC.
Regards Andrew
Technical Specialist

Post Reply