Real-Time Processing with Matlab
Show older comments
I have to build a MATLAB GUI that controls an instrument (Network Analyzer), gets it results in real-time and has to process some results without effecting the real-time regime of data collection. The processing includes building current preview image of the results and some manipulations like interpolation and fft.
The question is, how can I be sure that the processing will not effect the real-time budget of the instrument? Is there is a way to command Matlab not to wait for the results of processing if the instrument passes another piece of data in order to be able to collect all the data without omitting a part of it?
For example, if the Cycle of the arrival of data from the Network (NA) is T, the time of collection from the NA is Tc, and the time of Processing is Tp. How can I ensure that Matlab will be ready to collect the data every T time, no matter what is the Tp? Even if Tp<T-Tc, sometimes Matlab has its delays of processing, as it is not real-time program. What can be done to prevent the effect of such delays?
For addition, if Tp>T-Tc, how the processing can be commanded to be executed at the "background" without effecting the cycle of the collection?
Accepted Answer
More Answers (1)
Gavriel Aminov
on 21 May 2018
1 vote
4 Comments
Ameer Hamza
on 21 May 2018
Since you are not working on a real-time OS, such an issue can always happen. It depends on the complexity of the algorithm you are applying on the data. If the complexity is small, then probably it will not create an issue. Alternatively, you can refer to this FEX submission to get further ideas.
Ameer Hamza
on 21 May 2018
Guillaume
on 21 May 2018
I feel it's worth repeating: A hard real-time constraint cannot be guaranteed. Note that this is not matlab that cannot guarantee this, but your OS.
Gavriel Aminov
on 22 May 2018
Categories
Find more on Instrument Connection and Communication 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!