GithubHelp home page GithubHelp logo

Comments (4)

hgrecco avatar hgrecco commented on September 26, 2024

I think it is good to have a few guidelines for this. We should:

  • leverage from other libraries (as we do with PyVISA).
  • contribute back to them.
  • keep Lantz slim and highlevel (when possible).
  • provide solutions for common scenarios.

The first thing is to decide if pylibnidaqmx is the right choice. I agree with your assessment but I am not sure how active it is. In any case, we could collaborate with it (if the project leaders agree, of course) And in fact you have already by providing Python3 compatibility. If they accept the contribution, we can go forward.

Going to the wrapping. We tried to wrap Tasks and Channels in the past but did not worked very well for the final users. It was a good idea but was just too low level. The difficult but interesting thing about DAQmx is that tasks go beyond single instruments. This allows you to do complex stuff, but at the same time breaks the abstraction that we use in Lantz (1 instrument = 1 object). However, in my experience, there are lot of "single DAQ" uses and therefore my suggestion would be to provide those common scenario solutions.

Some wild thoughts: I think we should start by wrapping a device (in a similar way to what is done in drivers/ni/daqmx/base.py) but proving DictFeats for analog/digital input/outputs, and certain methods to create tasks on the fly for common operations. All these should leverage from pylibnidaqmx.

Because DAQmx has good introspection capabilities, we could create drivers on the fly. In other words, we do not need to create a NIXXXX class for all possible values of XXXX. We just need to have a functions that create the class or an object on demand based on introspection.

My suggestion would be (this is how I usually design an API): write an application using Lantz with DAQmx. Not the one we have, but the one you would like to have. The implementation will follow.

from lantz.

claypipkin avatar claypipkin commented on September 26, 2024

Just curious... was any progress made on this? I just discovered Lantz and am trying to get it to communicate with my ni9234 daq without much luck.

from lantz.

hgrecco avatar hgrecco commented on September 26, 2024

There is not. I would love to move forward in this direction but I have my hands full at the moment. Sorry

from lantz.

vascotenner avatar vascotenner commented on September 26, 2024

There is a working pyhton3 version of pylibnidaqmx: https://code.google.com/p/pylibnidaqmx/issues/detail?id=39
It has not been merged yet to master. I'm using it, but did not include it in the Lantz framework. I read only one channel at the time, or write to an analog output

from lantz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.