08-24-2017 07:54 AM
Hello friends,
I'am using the DAQ board NI USB 6215 in application of active noise control, to execute this activity I need read data from one input and write (after some processing) in one output. For this I'm using MATLAB, with DATA ACQUISITION TOOLS, to make a simulink interface and control of my model.
For start my tests I tried to read a sinusoidal signal, from an external source, on an analog input port and I sent this signal for a analog output port.
To lauch the data for simulink I'm using an ANALOG INPUT block, of data acquisition tools, with a block size of 2, for read the signal and sending for ANALOG OUTPUT (SINGLE SAMPLE) block, of data acquition tools too, to write the signal. To check the results I putting the external signal and the signal that I'm writing in a time scope.
The problem I'm having is that: The signal that I'm writing isn't equal enough that the signal I'm reading. The writing wait a delay time for start and have cuts (times where the out is 0 when must be a normal sinusoidal wave), and also, the writing signal have a delay to follow my input signal (not in real-time). When I increase the sample time this characteristics is increased too.
Some images of my results and my simulink model are annexed. The red wave is my input signal and the blue is my output signal. I change the amplitude of my signal to evidence the delay.
Can somebody help?
08-28-2017 10:50 AM
Hi Matheus,
What it seems is that your output and input tasks are not synchronized.
I am not expert in Mathlab, but I'm sure you can test it use an example from Mathworks website.
I recommend you to use the example Acquire Data and Generate Signals at the Same Time to see how it works. You can also post your question on their discussion forum.
Regards,
08-29-2017 06:28 PM
Thank for your attention Iferreira, I will create m-blocks in simulink with this techniques.