DAQmx examples

Examples of talking to a National Instruments (NI) DAQ card without the data acquisition toolbox.
2,1K téléchargements
Mise à jour 14 mai 2010

Afficher la licence

Examples of using matlab to talk to a National Instruments (NI)
DAQ card _without_ the 'data acquisition toolbox'

I have mainly used code and examples from Jens Roesner here:
http://www.jr-worldwi.de/work/matlab/index.html
However, I had to make a few slight tweaks to get it to work for me. I have only tested this on Matlab 7.8.0 (R2009a) on WinXP with a NI PCI 6220 board, so no guarantees.

Using Jens' code, I got an error -200088 whenever I tried to create a channel. To get it working, I had to change the initial task handles to uint32([]) which then returned a pointer for taskhandle

I also had trouble with creating tasks, then losing the taskhandle, and not being able to create the same task because of a name conflict. The solution is to not name any of the tasks - names don't seem to be useful anyway. So all my functions pass an empty string as a name.

Other changes are just cosmetic -
made functions for common tasks to simplify my main code
put all task handles in structure so easy to clear

Citation pour cette source

Nathan Tomlin (2024). DAQmx examples (https://www.mathworks.com/matlabcentral/fileexchange/27609-daqmx-examples), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2009a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Data Acquisition Toolbox Supported Hardware dans Help Center et MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.0.0.0