How to change output drive mode to open drain for ni-DAQmx
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Sruthi Geetha
2017-1-30
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Acquisition Toolbox Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!