Spectrum Analyzer!! - How to access data/plots from a FFT scope real time

5 views (last 30 days)
Hello everyone,
I am working on a graphic equalizer GUI that controls blocks in Simulink such as gains and audio filter inputs. The GUI operates perfectly, but I am working on a real time spectrum analyzer. I do not know how to access scope frames or data flow in real time. Essentially, I want to make the scope's information appear in the GUI's axes window. The GUI was designed using MATLAB's GUIDE
Any suggestions are appreciated.
I have looked into the Data Acquisition tool box, but I am under the assumption it does not work with 64-bit systems. Another idea was to some how sample the scopes frames and load them into the axes window in GUIDE, however I still do not know how to access the data real time or not.
Thank you, Rowan ECE

Accepted Answer

Jarrod Rivituso
Jarrod Rivituso on 26 Apr 2011
Edited: John Kelly on 26 Feb 2015
Simulink does allow you to access signal data from MATLAB during simulation via the use of runtime objects. Check out this doc link:
If I were you, I would either
  • Add a listener to a certain block and have the callback somehow update the GUI. This approach could be very computationally intensive if you aren't careful. You may see your system slow down if you try and have the callback directly modify the GUI axes.
  • Set up a timer and periodically poll the runtime object at a certain rate. This approach means you might "miss" some data, and depending on the polling speed you could see improved performance.
Note that I have assumed here that you are trying to access simulation data from a simulation that is being run on your host machine, and not trying to access simulation data from a simulation on some other machine / processor.
Kaustubha Govind
Kaustubha Govind on 28 Apr 2011
Have you also tried adding an event-listener function to PostOutputs and updating the GUI from that function?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by