Mutex in Data Acquisition Toolbox
2 ビュー (過去 30 日間)
古いコメントを表示
In Data Acquisition Toolbox you can define callback functions. The callback functions are running in the background and make some signal processing. I would like to modify parameters of the signal processing algorithms 'on-the-fly'(from workspace by calling an appropriate function). Studying example suggests to use global variables in the workspace.
My question is what is the safe way to communicate between the workspace and the callback function? I.e. how global variables can be protected?
In other sw environments you have semaphore, mutex, critical section, etc. But in Matlab or in Data Acquisition Toolbox I could not find the official solution to this problem.
0 件のコメント
回答 (1 件)
Kurt Stewart
2019 年 10 月 9 日
There are some third party scripts out there to do data access control.... https://www.mathworks.com/matlabcentral/fileexchange/42910-semaphore
That might be useful.... have not tried it myself yet. I would recommend testing it out first
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Data Acquisition Toolbox Supported Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!