The warning of "a channel that does not support on-demand operations was added" when using data acquisition with NI devices

33 views (last 30 days)
Hi, all,
I'm using data acquisition toolbox with NI cDAQ 9174 chassis. Two NI 9232 and one NI 9269 are put in slots of the chassis. One channel on one 9232 is connected to a GRAS microphone.
First I only want to get one analog input from GRAS IEPE microphone so I just follow the example code and create one analog input channel, then I get this warning. It really confuses me.
Here is my code
clc
clear all
close all
% Create NI session
devices = daq.getDevices
s = daq.createSession('ni')
% Set session rate
s.Rate = 51200;
% Add microphone input channel
inputChanel = addAnalogInputChannel(s,'cDAQ1Mod1','ai0','Microphone');
The code is very simple and straightforward. However, I get the warning message below.
Warning: A channel that does not support on-demand operations was added to the session. On-demand operations using inputSingleScan and outputSingleScan will be disabled. Only clocked operations using startForeground and startBackground can be done.
Some people got the same warning because they tried to add both analog and digital channels which I did not. But I'm concerned about the simulated DAQ device MATLAB detects. Is this simulated device causing the warning? How can I make this simulated device go away from MATLAB? Thanks in advance!
Data acquisition devices:
index Vendor Device ID Description
----- ------ --------- --------------------------------------------
1 ni cDAQ1Mod1 National Instruments NI 9232 (BNC)
2 ni cDAQ1Mod2 National Instruments NI 9232 (BNC)
3 ni cDAQ1Mod3 National Instruments NI 9269
4 ni SimDev1 National Instruments NI Simulated DAQ Device

Answers (1)

Yukun Xiao
Yukun Xiao on 21 Apr 2021
Hi, I‘m doing the same work as yours. This warning doesn't matter, and I have got the data from NI device successfully.
d=daq('ni');
addinput(d,'cDAQ9189-1D3614AMod1','ai0','Microphone')
% d.Rate=44100;
d.Channels.Sensitivity=47.9*0.001;
DAQ_1=read(d,seconds(1));
plot(DAQ_1.Time,DAQ_1.Variables)
xlabel('time')
ylabel('Amplitude')
But when I define the sampling rate as 44100, software showed warning and forced the sampling rate to 51200.How can I deal with it? Many Thanks.

Categories

Find more on Simultaneous and Synchronized Operations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!