Data Acquisition in Simulink is Slow and Incorrect
Show older comments
I have a very simple model to test my data acquisition setup. The model includes a DSP Sine Wave block going to an Analog Output block, and an Analog Input block going to a Time Scope (see below screenshot).

I am using an NI cDAQ-9174 chassis with an NI-9201 input and NI-9263 output. I have connected the input to the output. My goal with this simple model is to send a sine wave to the DAQ board and read it back in to the Time Scope. However, when I run the simulation, a 1-second simulation takes more than a minute to run. Furthermore, the data I can see in the Time Scope does not seem to resemble the Sine Wave output data at all.
I have tested the same setup with a MATLAB script, creating an 'output' variable with the sine wave data, queuing the data to send to the DAQ, and reading it back in. The results are pretty quick and accurate in MATLAB.
Why does this setup not work in Simulink?
Accepted Answer
More Answers (0)
Categories
Find more on Data Acquisition Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


