Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem when synchronizing two cards with Matlab

Hi, I have a PCI-6052E and a PCI-6071E. I was trying to acquire data from both cards' analog input channels, with the start trigger synchronized.

I have set up an RTSI cable and am using Matlab's data acquisition toolbox. Please see the attached file. I'm setting ai2's trigger type as 'HwDigital' so that it receives trigger from 'RTSI0'. However, when SamplesPerTrigger property of ai2 is set to Inf (line 10), there is an error when starting the tasks. If it's set to a finite number, the program works fine.

 

Maybe I'm doing something silly here, but I wonder if HwDigital trigger can only evoke acquisition of finite data points. What shall I do if I need continuous recording?

I'm using Matlab 2012a and NIDAQmx driver.

Thanks!

 

The error in matlab is:

 

Error using daq.analoginput_nidaqmx_2_103/start
NIDAQmx error : Requested value is not a supported value for this property. The
property value may be invalid because it conflicts with another property.
Property: DAQmx_SampQuant_SampPerChan Requested Value: 0 Valid Values Begin
with: 2 Valid Values End with: 33554432  Task Name: MWDAT0140  Status Code:
-200077

Error in daqdevice/start (line 62)
start( daqgetfield(obj,'uddobject') );

Error in sync_cards_debug (line 20)
start(ai2)

0 Kudos
Message 1 of 3
(3,280 Views)

Hello zlyhere,

 

The error code is stating that you are trying to read zero samples from the task when it needs at least two. Try posting to The MathWorks Inc. ® forums because they have the software support for the MATLAB ® code.

MATLAB are trademarks of The MathWorks, Inc.

 

Best Regards,

Wear

Applications Engineer

 

Wear
National Instruments
Product Support Engineer
0 Kudos
Message 2 of 3
(3,256 Views)

I see. Thanks!

0 Kudos
Message 3 of 3
(3,228 Views)