Access a device in multiple threads

Hello,
I'm using the parallel computing toolbox and am trying to run a script that moves my robot, while having another script run at the same time (reading the robot speed every few ms and plotting its position on a graph). I have it set up so that I create a job/task that moves the robot and while that task runs, I read the speed frequently.
The problem I have is that I cannot move the robot in the job/task because I made the connection in the main MATLAB thread, not the separate task. To confirm this, I attempt to connect to the device in the task, and it was able to move around fine. However, I am not able to read the speed from the device in the main thread since its not connected to the device.
Any advice?

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Robotics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by