How to create 2 parallel processes that share data in Matlab?

12 vues (au cours des 30 derniers jours)
Evan Hashemi
Evan Hashemi le 23 Juil 2021
Commenté : Evan Hashemi le 26 Juil 2021
Right now I have a .NET object that I use to read data from some hardware. I also need to process that data in real time so I can perform other operations. I currently have the data acquisition take place in a timer callback and the processing take place in a while loop (both processes access the data from the same workspace).
However, this is not good enough for a real time system. I can sometimes see delays of up to 380ms since the data cannot be processed while the program is in the callback. So I have been looking into parallel processing (with parallel computing toolbox) to speed the process up. But, as you could imagine, I am having great difficulty doing so.
Is it possible for me to create too workers, one with the .NET object that does all of the data acquisition, and another that does all of the processing at the same time? If so, how should I go about this? Or if there is a different approach that I am not aware of? I would deeply appreciate any help that someone can offer.

Réponses (1)

Ajay Chauhan
Ajay Chauhan le 23 Juil 2021
Hi Evan,
Looks like there is some missing information in the 1st paragraph.
Also, not sure if it is related to your use case, but here is doc that can be a good start:
  1 commentaire
Evan Hashemi
Evan Hashemi le 26 Juil 2021
My appologies for the late response, I actually have seen this doc before. However I am still confused on how to acutally make the different workers perform the two functions I spoke of before

Connectez-vous pour commenter.

Catégories

En savoir plus sur Call Web Services from MATLAB Using HTTP dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by