05-04-2017 09:53 AM
I want to set the output rate of two output channels of NIDAQ 6009 in MATLAB. codes followed:
"
s1 = daq.createSession('ni');
s2 = daq.createSession('ni');
addAnalogOutputChannel(s1,'Dev1','ao0','Voltage');
addAnalogOutputChannel(s2,'Dev1','ao1','Voltage');
s1.Rate = 900;
s2.Rate = 900;"
but there is always an error at 's1.Rate = 900;'
error is 'Rate cannot exceed 0 in the current configuration.'
Is the output rate is fixed for DAQ 6009 or there is something wrong with codes?
Thank you for answering my question
Regards
Xiaoran
05-18-2017 05:35 AM
03-03-2021 06:36 PM
You only defines input channel rate.
ch1 = addAnalogInputChannel(s,'Dev1', 'ai1', 'Voltage')
s.Rate = 9600