Test and Measurement Forum

Thread safety - PicoScope 6402 series

Post your Linux discussions here

Thread safety - PicoScope 6402 series

Postby andrejm » Sun Mar 23, 2014 7:51 pm

Hi,

I use one PicoScope 6402 with the 64bit libps6000.so library. I currently perform device configuration (ps6000MemorySegments, ps6000SetTrigger family, ps6000SetEts) in one thread and channel specific configuration (ps6000SetChannel, ps6000SetDataBuffer) in a second thread.

Is it safe if two threads both call a different ps6000 function?

What about if two threads both call the same ps6000 function, for example ps6000SetChannel or ps6000SetDataBuffer. Is the library thread safe?

Thanks,
Andrej
andrejm
Newbie
 
Posts: 0
Joined: Sun Mar 23, 2014 7:25 pm

Re: Thread safety - PicoScope 6402 series

Postby Karunen » Mon Mar 24, 2014 3:28 pm

Hi Andrej,

If a function is sent to the driver while it is still executing a function,
then it will put the second function on hold until the first function has finished executing.

Thanks,
Karunen

Technical Specialist
Pico Technology
Karunen
Zen Master
Zen Master
 
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Re: Thread safety - PicoScope 6402 series

Postby andrejm » Sun Apr 06, 2014 9:43 pm

Thanks for the info Karunen.

What happens if I use multiple PicoScope units in multiple threads? For example if call ps6000GetValues in two threads at the same time, one for each device. Would ps6000GetValues functions execute in parallel or would one wait for the other to finish?

Best regards,
Andrej
andrejm
Newbie
 
Posts: 0
Joined: Sun Mar 23, 2014 7:25 pm

Re: Thread safety - PicoScope 6402 series

Postby mario_ » Mon Apr 07, 2014 7:27 am

Hi Andrej,

There can be only one unit open in per process. To open multiple devices you would need one process per device - but then they would work seamlessly (assuming there is enough bandwidth on usb bus).

Regards,
Mario
mario_
Site Admin
Site Admin
 
Posts: 112
Joined: Fri Sep 13, 2013 12:57 pm

Re: Thread safety - PicoScope 6402 series

Postby hmaarrfk » Tue Apr 15, 2014 4:59 pm

Does that mean that if I want to use multiple Picoscopes, I need to start forking off different processes???

Are there any plans to allow one process to communicate with multiple picoscopes?
hmaarrfk
Newbie
 
Posts: 0
Joined: Sun Jun 24, 2012 11:41 pm

Re: Thread safety - PicoScope 6402 series

Postby mario_ » Thu Apr 17, 2014 9:59 am

Hi hmaarrfk,

You could try dynamically loading another instance of libps6000.so to see if it works, ( should, but I haven't try that yet ;) ).

The feature has been recognized some time ago and is in the current pipeline. However it has to be introduced in windows drivers first to allow porting to Linux version.

Mario
mario_
Site Admin
Site Admin
 
Posts: 112
Joined: Fri Sep 13, 2013 12:57 pm


Return to Linux

Who is online

Users browsing this forum: No registered users and 0 guests