Comments (4)
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.
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.
There is not. I would love to move forward in this direction but I have my hands full at the moment. Sorry
from lantz.
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)
- VISA library path of simulated instrument
- Update links to documentation
- inst.finalize() leaves device in remote mode (using "with inst ...")
- Interface to adjust inst.query_delay in Lantz driver. HOT 2
- DictFeatWidget fails to initialize when keys are not explicitly set
- In case of a DictFeat, LabeledFeatWidget._widget doesn't have a value_to_feat method and communication fails
- In case of DictFeat, DriverTestWidget.update_on_change() has no effect
- DriverTestWidget.widgets_values_as_dict() broken
- Driver refresh() fails with DictFeats
- Not imported : from lantz.ui.qtwidgets import start_test_app
- Python2 HOT 4
- lantz import issues
- Remote Network Instrument HOT 1
- Foreign library with cdll instead of windll
- Qt5 support HOT 1
- Import lantz issue pyqt HOT 1
- USB to Serial devices
- ValueError: 'bytesize' is not a valid attribute for type SerialInstrument HOT 1
- Archive repository and link to lantzproject/lantz
- AttributeError: module 'PySide.QtSvg' has no attribute '__version__'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lantz.