How to run 2 scrips simultaneously, one for sending output to lab equipment and one for reading sensor output.
2 ビュー (過去 30 日間)
古いコメントを表示
I have a test testup which consists of a shaker with a mechanism mounted on it, and two laser sensors which measure their relative distance to two points on the mechanism.
I'm trying to run two scripts simultaneously to control my test setup and read the sensor output.
The first one is for sending out a sine wave to a shaker and the second one is for reading the sensor output of the two sensors.
Both scrips are automatically generated scripts made from the analog output generator and the analog input recorder.
What would be the easiest way to get these scripts to run at the same time.
I'm using Matlab 2020b
0 件のコメント
回答 (1 件)
Jon
2020 年 9 月 23 日
編集済み: Jon
2020 年 9 月 23 日
I'm not sure about licensing restrictions, but in Windows (probably similar for other OS) you can right click on the MATLAB icon and open a second instance of MATLAB. Then you can run one script in one instance and the other in the second instance.
You could also use two timer functions with appropriate callback functions to interleave the operation. MATLAB is essentially single threaded though so it may not be exactly what you want.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Periodic Waveform Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!