Test and Measurement Forum

PicoLog ADC 20/24 Python library

Forum for discussing PicoLog

PicoLog ADC 20/24 Python library

Postby Sean » Mon Oct 30, 2017 9:01 pm

I wrote a Python 3 library for the PicoLog ADC 24:

https://github.com/SeanDS/datalog

It probably works with the ADC 20 as well, but it has only been tested on the ADC 24. We successfully got it to work on a Raspberry Pi (v1) without issue using the ARM build of the libpicohrdl drivers provided by PicoTech.

Feel free to use the library, and contribute patches, suggestions and bug reports!
Sean
Newbie
 
Posts: 0
Joined: Tue Jan 19, 2016 4:28 pm

Re: PicoLog ADC 20/24 Python library

Postby Martyn » Tue Oct 31, 2017 8:22 am

Thank you for posting this :)
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 2816
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: PicoLog ADC 20/24 Python library

Postby Sean » Tue Oct 31, 2017 12:11 pm

No problem.

We do have a strange issue with the ADC24 though. When it is first plugged in to the Pi, you have to start the program, wait for it to timeout (after maybe 30 seconds), then run it again. For some reason, the first time you run it, the handle returned by HRDLUnitOpen() is invalid (i.e. not >= 1), which causes my library to (correctly) report an error. After trying to open the unit again, it works. Hitesh also reproduced this problem (ticket number TS00080001) but that was in February and I've so far not seen a fix. It'd be nice to get this fixed in the firmware as my library does seem to follow the spec here!

Another issue is when you stop the program without calling HRDLCloseUnit(). After trying to open it again, you get a segfault or other C error. It'd be great to have some way to break a lock on the unit from a previous run, or reset it somehow by software. Right now I have to physically unplug and plug back in to fix this.
Sean
Newbie
 
Posts: 0
Joined: Tue Jan 19, 2016 4:28 pm

Re: PicoLog ADC 20/24 Python library

Postby Hitesh » Wed Nov 01, 2017 9:15 am

Hi Sean,

Could you please e-mail support@picotech.com and we can discuss this further.

Unfortunately due to other pressing work, there has not been a fix for the issue, although this is something that hopefully will be looked into in the near future. We are aware of the second issue as well.

Regards,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2515
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to PicoLog

Who is online

Users browsing this forum: No registered users and 0 guests