필터 지우기
필터 지우기

How to change output drive mode to open drain for ni-DAQmx

조회 수: 1 (최근 30일)
Oscar Bi
Oscar Bi 2017년 1월 27일
답변: Sruthi Geetha 2017년 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.

답변 (1개)

Sruthi Geetha
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

카테고리

Help CenterFile 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!

Translated by