NI DAQ channel terminal in MATLAB is read-only
7 ビュー (過去 30 日間)
古いコメントを表示
Hello, I am using an NI-9422 to read in a signal for motor speed. I am reading in through the data acquisition toolbox in MATLAB. I can read the frequency fine for 1 terminal but I am struggling to understand how to read multiple terminals or a specific terminal.
For instance, the current assigned terminal is PFI5 and if I try to assign a variable ch to my channel and then re-assign the ch.terminal as PFI7 it says it's read only. I've also unplugged, and plugged the chassis back in and the default terminal changes which I can only solve by moving my wires.
What am I missing? Thanks for any help.
0 件のコメント
採用された回答
その他の回答 (1 件)
chrisw23
2023 年 2 月 28 日
As long as the PFI is configured as Input it should be readOnly.
Each PFI line can be individually configured as a static digital input or a static digital output.
Check the current I/O state.
4 件のコメント
chrisw23
2023 年 3 月 1 日
I'm not using the DataAcqToolbox but the DAQmx API instead but I think it is similar.
When you define the task you have to add all channels you want to use and you can't get access to a channel that is not defined for that task.
i.e.
obj.ContinuousAnalogInTask.AIChannels.CreateVoltageChannel(...
% physicalChannelName
% nameToAssignChannel (alias)
% enum NationalInstruments.DAQmx.AITerminalConfiguration
% minimumValue
% maximumValue
% NationalInstruments.DAQmx.AIVoltageUnits
参考
カテゴリ
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!