PicoLog ADC 20/24 Python library

Forum for discussing PicoLog
Post Reply
Sean
Newbie
Posts: 0
Joined: Tue Jan 19, 2016 4:28 pm

PicoLog ADC 20/24 Python library

Post by Sean »

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!

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: PicoLog ADC 20/24 Python library

Post by Martyn »

Thank you for posting this :)
Martyn
Technical Support Manager

Sean
Newbie
Posts: 0
Joined: Tue Jan 19, 2016 4:28 pm

Re: PicoLog ADC 20/24 Python library

Post by Sean »

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.

Hitesh

Re: PicoLog ADC 20/24 Python library

Post by Hitesh »

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,

grigoletti
Newbie
Posts: 0
Joined: Fri Mar 02, 2018 11:13 am

Re: PicoLog ADC 20/24 Python library

Post by grigoletti »

Has the second issue (the one about missing to call HRDLCLoseUnit() ) been fixed?

Hitesh

Re: PicoLog ADC 20/24 Python library

Post by Hitesh »

Hi grigoletti,

Not at the present moment, although the issue will be investigated further.

Regards,

grigoletti
Newbie
Posts: 0
Joined: Fri Mar 02, 2018 11:13 am

Re: PicoLog ADC 20/24 Python library

Post by grigoletti »

Dears,
do you have any news on the HDRLCloseUnit() issue? I have a picolog installed on a remote windows machine and everytime the machine suffers from an unexpected reboot (due to a powercut or and update for example) I have to physically unplug the device and plug it again. Is there a way to overcome this issue?

Regards,
Gianluca

Post Reply