Starting with Picoscope and API

Having problems ? let us know the details here
Post Reply
Reynaulu
User
User
Posts: 4
Joined: Tue Nov 20, 2018 12:37 pm

Starting with Picoscope and API

Post by Reynaulu » Tue Nov 20, 2018 2:03 pm

Good evening everyone,

I am completely new to the world of Picoscope, Python programming etc.
I have a PICO 2206BMSO and I would like to record some very long signals thanks to a "streaming" mode (~1hour at 200ksample/s).

I installed the Picoscope 6 programm, and also the PicoSDK from the download ressources.
I have installed Python and Anaconda.I am really not familiar with those tools so I would like to know how I can start writing my own program ?
Can someone please tell me very basic instructions for starting writing a program that pilots the Picoscope :D

Thank you very much.

Hitesh
Site Admin
Site Admin
Posts: 2847
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Starting with Picoscope and API

Post by Hitesh » Wed Nov 21, 2018 9:58 am

Hi Reynaulu,

We have a set of Python bindings available via GitHub along with some basic examples for a 'block' mode capture. The PicoScope 2206B MSO uses the API functions provided by the ps2000a driver.

We are yet to provide examples for a streaming mode capture although I will add this to an existing request. In the meantime, you can reference the Programmer's Guide about using the wrapper library functions to collect data in streaming mode.

Hope this helps,
Hitesh

Software Dev. Engineer

Reynaulu
User
User
Posts: 4
Joined: Tue Nov 20, 2018 12:37 pm

Re: Starting with Picoscope and API

Post by Reynaulu » Wed Nov 21, 2018 10:38 am

Hi Hitesh,

Thank you for your answer !

I am sorry for asking such trivial questions but I already have looked through your github and the API Programmer's guide but I am sorry it is not basic instruction enough for me to start....

I downloaded Anaconda and Spyder and I am simply trying to import the ps2000a.dll but I can't figure how to do it. I think there might be a problem for where to find the .dll but I am working with my program and the ps2000a.dll in the same file. (cf screenshot).
The error I get is " ModuleNotFoundError: No module named 'PS2000a' "


I also tried the code in Github but I get a very similar error :
from picosdk.ps2000a import ps2000a as ps
ModuleNotFoundError: No module named 'picosdk'


How do you import first the ps2000a driver ?

Thank you very much
Attachments
pb_importfile.PNG
pb_importblockmode.PNG
pb_import1.PNG

Hitesh
Site Admin
Site Admin
Posts: 2847
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Starting with Picoscope and API

Post by Hitesh » Wed Nov 21, 2018 12:37 pm

Hi Reynaulu,

The ps2000a.dll (note the case) needs to be in a location on the Windows PATH environment variable.

For the python code, you need to run the following command from a Command Window (make sure you are in the root directory of the picosdk-python-wrappers folder):

Code: Select all

python install setup.py
Regards,
Hitesh

Software Dev. Engineer

Reynaulu
User
User
Posts: 4
Joined: Tue Nov 20, 2018 12:37 pm

Re: Starting with Picoscope and API

Post by Reynaulu » Tue Nov 27, 2018 4:07 pm

Hello,

Just a quick update in order to say that I succeeded in installing the wrapper. Just in case someone has the same problem as I did.
It was more tricky than expected but here is what I did :

Code: Select all

>>> import sys
>>> print sys.path         ##to check if all the interesting paths are there
>>>   sys.path.append("all folders containing picoSDK and the wrappers")                
>>> sys.argv.append("install")
>>>  import setup           
After that I could run some example from the picosdk-python-wrappers !

Thank you for your help

Post Reply