My problem was caused by failing to change the analog input property "Signal Type" from Sample-based to Frame-based. This way samples from one channel make up an array specified by the Block size property. Additionaly, following the analog intput block output, I use the "Unbuffer" block to get the harvested data flow just as intended from the start. (1 sample at a time)
Simulink Analog Input Block Size limitation with NI DAQ card
1 view (last 30 days)
Show older comments
Hello,
I'm trying to extract a single channel signal waveform from my NI DAQ 6211 in Simulink using the Analog Input block in Asynchronous mode. By default the Block Size property is set to 2 which leads to extraction of 2 waveforms based on output of only one Hardware channel in a manner similar to a demultiplication (however, unwated in this case). I understand that to get a single waveform the Block Size property should be set to 1. However, when trying to do so I get an Configuraion Error saying that 2 is the smallest value for Block Size property. (This is not the case with the winsound0 sound card as input for example).
Is there a workaround to this problem or do I have to manipulate with the "demultiplexed" data to put it back into a single time array order? If so, how can I do this in Simulink in a least CPU consuming manner?
Kind regards
Michael
3 Comments
Philip Wang
on 28 Sep 2015
Hi,
Can you explain a little more into the details? I am actually encountering the same problem with the PCI-6034E device.
Instead of trying to reduce the block size, I increase it to my sampling rate and run the data acquisition for one second.
I thought this would work but I end up having an strange array which has a third index.
In other word, I was trying to get data(1,1) but end up getting things like data(1,1,2)...
Don't know what's my real signal now...
Rajesh Raveendran
on 11 Feb 2020
Hello,
Even I have the same issue, I just need one signal (1x1) instead of a block of data (2x1). Any ways to make it back to data I originally expect?
Answers (0)
See Also
Categories
Find more on Simultaneous and Synchronized Operations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!