How to Output Scans to DAQ but Ignore Digital Outputs
2 ビュー (過去 30 日間)
古いコメントを表示
Hello All,
I have a DAQ USB-6003 interfacing with Matlab. I currently have 1 analog input, 1 digital output, and 1 analog output. I understand that I can use 'write' command to output to the DAQ. However, because I have a digital output with no clock, it tells me that "on-demand" operations only are available for that channel.
Therefore, if I try to use an MxN scan matrix to send using the 'write' command, it throws an error (see image). I am wondering if there is a way to only output to the analog channel(s) and ignore the digital channel.
Thanks
0 件のコメント
回答 (1 件)
Umar
2024 年 7 月 2 日
編集済み: Walter Roberson
2024 年 7 月 2 日
Hi Holden,
After reviewing your comments, please ensure that your scan matrix is correctly configured. Make sure that only the analog channels you want to write to are included in the scan matrix. Let me provide example of how you can create a scan matrix in Matlab for analog output:
% Define your analog output channels
analogChannels = [0 1]; % Specify the analog channels you want to use
% Create a scan matrix with values for analog output
scanMatrix = [0.5 1; 0.3 0.7]; % Example values for analog output
% Write the scan matrix to the analog output channels
outputData = scanMatrix';
writeData = [analogChannels; outputData];
write(s, writeData); % Assuming 's' is your analog output session
Please ensure that the analogChannels array contains the indices of the analog channels you want to use, and the scanMatrix contains the values you want to output to those channels.
Hope this will help resolve your problem.
6 件のコメント
Umar
2024 年 7 月 2 日
No problem Holden, we are glad that your problems are resolved. Happy 4th of July.
参考
カテゴリ
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!