Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CM3 Support #93

Open
ochoadavid opened this issue Sep 7, 2017 · 3 comments
Open

CM3 Support #93

ochoadavid opened this issue Sep 7, 2017 · 3 comments

Comments

@ochoadavid
Copy link

Hi! I'm trying to use a CM3 Current Data Logger from a linux server. Is there any plans to add support for it in pico-python?

I'm willing to code it (or at least help!), but I'm not sure how to start. Can someone give me advice?

David

@hmaarrfk
Copy link
Collaborator

hmaarrfk commented Sep 7, 2017

Hey David,

Thanks for being interested.

Just to make sure you aren't duplicating work, have you tried the official picoscope python library? I'm taking away loyal followers from this git repo, but I think picoscope has since started to support python to a certain extent.

In either case, it seems that the dataloggers have at most 15 functions, compared to the 40+ for regular scopes. They seem pretty different. But some are similar and should give you a hang of the programming style we have chosen.

You should look for the programming manual on their website.

Honestly though, all this organization is just fancy stuff. Try to get the OpenUnit, CloseUnit, PLCM3GetUnitInfo functions up and running. The code should be nearly identical.

For the final product, I would create maybe 2 python files: picolog.py and maybe a file called picologcm3.py
These would be akin to picoscope.py and ps6000.py in our current code and would have similar imports.

The way we organized things is to have picoscope.py have no knowledge of C datatypes. This means that the _lowLevelOpenUnit converts python to C. This is mostly done so that the file picoscope.py can follow "Python conventions" and the _lowLevel functions are free to break all Pythonic rules.

Fork the repo, and create a new branch, I can help you with bugs you encounter along the way and finally merge things into this one. The dataloggers seem pretty separate, I won't really worry if you have too many stylistic differences.

@ochoadavid
Copy link
Author

Hi Mark!

Thank you for your response.

I'm haven't been able to find any official python library. It seems that there is some ongoing work on the forums but I think that this one is the most advanced yet.

Anyway I wasn't aware of those programing manuals and with that info I will try to implement some functions.

Thanks again, and hopefully will be back here soon to merge,
David Ochoa

@hmaarrfk
Copy link
Collaborator

hmaarrfk commented Nov 8, 2017

Hi David Ochoa,

I'm glad that those links were of use to you.

Yeah, typically, manufacturers don't have enough time to develop the libraries into a "pythonic" way. This is what we aimed to do here.

Anyway, it would be interesting to see what you were able to do with the data logger and python. If it follows our same style, I would be glad to pull them in.

If you decided to take your own direction in terms of coding style and libraries used, I could at the very least point to your repository.

Let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants