Hi everyone,
I hope I am in the good section for this kind of question : I'm new to the NI environment/hardware.
I'm currently using a NI PXI-1033 with 5 cards installed : 1x NI PXI 6221, 2x NI PXI 4461 and 2x PXI 4462.
On one of the NI PXI 4461, I'm using both inputs and outputs. The inputs are two microphones and the outputs are connected to an amplifier to drive two independant speakers. I'm using the Matlab interface to use the PXI cards.
Now, my problem is when I'm trying to do some input and output simultaneously via Matlab, I get the error :
Property must have the same value for all channels on this device.
Property: DAQmx_RefClk_Src
Task Name: _unnamedTask<11FB>
Status Code: -200106
Both the input and output are defined in the Matlab script and working perfectly when ran one at the time. But when I'm trying to run both at the same time, I get the error. The program is the following :
acqTime=15;
s = daq.createSession('ni');
s.Rate=24000;
s.NumberOfScans=acqTime*s.Rate
Ch_Ref=addAnalogInputChannel(s,'Dev3','ai0','Voltage'); % Ref 1 in
Ch_HP3=addAnalogOutputChannel(s,'Dev3','ao0','Voltage'); % Haut-parleur #3
noiseSpeaker1=audioread('mute5_10whitenoise24k.wav');
outputSignal=[noiseSpeaker1];
queueOutputData(s,outputSignal);
% Mise en route de la séquence
disp('******** Playback started ********');
s.startForeground;
disp('******** Playback finished ********');
release(s);
The audioread file is simply a whitenoise generated with Audacity.
Thank you very much for your support and if I'm not in the good section/forum, please guide me !
H.