How to change output drive mode to open drain for ni-DAQmx
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to change the digital output drive mode on my NI 6003 Daq to open-drain mode. How do I do that with the data acquisition tool box and the NI Daq-mx adapter. I don't see a function or a property for it in the digital output channel I created.
0 Commenti
Risposte (1)
Sruthi Geetha
il 30 Gen 2017
The session interface in Data Acquisition Toolbox does not have direct support for changing the drive type of a digital output channel (when supported by the device).
However, it would be possible to implement a workaround calling low-level NI-DAQmx vendor driver functions for accessing this functionality via the undocumented MEX "projection layer" available in Data Acquisition Toolbox.
The NI-DAQmx driver offers the following functions for changing the output drive type property of a certain channel: DAQmxGetDOOutputDriveType DAQmxSetDOOutputDriveType DAQmxResetDOOutputDriveType
These functions are made available to be called directly from MATLAB using a MEX "projection layer" daq.ni.NIDAQmx.DAQmxGetDOOutputDriveType daq.ni.NIDAQmx.DAQmxSetDOOutputDriveType daq.ni.NIDAQmx.DAQmxResetDOOutputDriveType
Refer to the attached example code and wrapper functions, as a usage example for calling these functions and changing the Output Drive Type for a digital output channel: test_DO_DriveType.m NI_DAQmxSetDOOutputDriveType.m NI_DAQmxGetDOOutputDriveType.m
0 Commenti
Vedere anche
Categorie
Scopri di più su Data Acquisition Toolbox Supported Hardware in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!