How to change output drive mode to open drain for ni-DAQmx
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Sruthi Geetha
el 30 de En. de 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 comentarios
Ver también
Categorías
Más información sobre Data Acquisition Toolbox Supported Hardware en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!