From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with "DAQmx_RefClk_Src" when using Input and Output simultaneously - PXI 4461

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.

0 Kudos
Message 1 of 2
(2,089 Views)

Hi,

 

Since you're using a language that NI doesn't support, I recommend that you contact the party regarding questions about proper program architecture. 

Marco C.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,049 Views)