Access a device in multiple threads

2 views (last 30 days)
Tariq Bugrara
Tariq Bugrara on 17 Apr 2013
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?

Answers (0)

Categories

Find more on Test and Measurement in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!