Is runBlock a blocking call?

Post general discussions on using our drivers to write your own software here
Post Reply
Jansen
Newbie
Posts: 0
Joined: Tue Jun 17, 2014 2:56 pm

Is runBlock a blocking call?

Post by Jansen »

Hi,
I'm writing a software which manages two devices. A remote board and a picoscope (6402B).

When starting a capture the software sets up the scope and sends a command to the board, which then sets a pin to high level as a trigger.

Sometimes it happens that the scope seems to miss the trigger signal and I'm currently investigating why. One of my thoughts is, that the scope wasn't yet ready to capture.
I'm wondering if the call to ps6000RunBlock blocks until the scope is ready or if i have to wait some time before activating the board?
The documentation says that the scope needs up to 50ms to be ready when using the normal block mode.

Hitesh

Re: Is runBlock a blocking call?

Post by Hitesh »

Hi Jansen,

The ps6000RunBlock function uses a callback to indicate when the device has completed collection of data (or alternatively poll the ps6000IsReady function), so it is possible to execute other commands after calling ps6000RunBlock (although the signal generator cannot be started while waiting for a trigger).

It can take a few milliseconds to setup the device for data collection so you may wish to incorporate a small delay before instructing the remote board to set the pin to a high level.

I hope this helps.

Jansen
Newbie
Posts: 0
Joined: Tue Jun 17, 2014 2:56 pm

Re: Is runBlock a blocking call?

Post by Jansen »

Hi Hitesh,

thanks for the fast response. I'm already using the callback function.
Hitesh wrote:It can take a few milliseconds to setup the device for data collection so you may wish to incorporate a small delay before instructing the remote board to set the pin to a high level.

I hope this helps.
Yes, this helps. I've added a 50ms delay after calling runBlock and now every trigger gets captured! :)

Post Reply