Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Combinine blocks of DAQ data in simulink?

Subject: Combinine blocks of DAQ data in simulink?

From: Richard Crozier

Date: 18 Jul, 2012 15:17:32

Message: 1 of 2

Hello,

I am trying to use the DAQ toolbox to import somw data into a simulink model. I have just started the process and successfully got the DAQ samplind data using the 'Analog Input' block.

However, when I output the data from the Analog Input block into a scope, I get one trace for every block of data. and on my daq I am not permitted to set the number of blocks to 1 (it must be at least two apparently). Is there a way to concatenate the samples so they appear as a continuous signal in my model?

Otherwise what is the appropriate way to deal with the sampled data?

I've tried using the Analog Input (Single Sample) but it's incredibly slow if I do this.

Thanks!

Subject: Combinine blocks of DAQ data in simulink?

From: Alan Mackay

Date: 23 Jul, 2012 15:49:11

Message: 2 of 2

"Richard Crozier" wrote in message <ju6k2c$de4$1@newscl01ah.mathworks.com>...
> Hello,
>
> I am trying to use the DAQ toolbox to import somw data into a simulink model. I have just started the process and successfully got the DAQ samplind data using the 'Analog Input' block.
>
> However, when I output the data from the Analog Input block into a scope, I get one trace for every block of data. and on my daq I am not permitted to set the number of blocks to 1 (it must be at least two apparently). Is there a way to concatenate the samples so they appear as a continuous signal in my model?
>
> Otherwise what is the appropriate way to deal with the sampled data?
>
> I've tried using the Analog Input (Single Sample) but it's incredibly slow if I do this.
>
> Thanks!

Hi Richard,

I did quick search and came across this: http://www.mathworks.de/matlabcentral/answers/32558#comment_69878

It appears that you need to use the Signal Processing Toolbox buffer/unbuffer blocks as a work around to this.

This also ties up with an example on the file exchange which uses a buffer/unbuffer: http://www.mathworks.com/matlabcentral/fileexchange/12524

I find it strange that MathWorks don't highlight this in their example which clearly has 4 traces on a 2 channel analogue input.

Alan.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us