How to use the createTask to capture the hardware data
Show older comments
Hi,
I learning the createtask demo, for example
c = parcluster(); % Use default profile
j = createJob(c);
createTask(j, @rand, 1, {10,10});
createTask(j, @rand, 1, {2,10});
createTask(j, @rand, 1, {10,3});
submit(j);
wait(j);
taskoutput = fetchOutputs(j);
disp(taskoutput{1});
disp(taskoutput{2});
disp(taskoutput{3});
the step is
use the parcluster() function to set the profile
add job to cluster by createJob() function
and add the task to job by createTask() function
sumbit the job
and wait all worker to finish all task
the last, get the all task output by fetchOutputs()
in the application, if I create 2 Task,
the first, createTask(j, @getUartInterfaceData, ... .... ....);
the second, createTask(j, @ProcessUartInterfaceData, ... .... ....);
if i want read the UART Hardware to matlab using the first task, and process the Receive Data using the second task at the same time in real time, the answer:
how the share the data between two task ?
how the run the two task in loop ?
Accepted Answer
More Answers (0)
Categories
Find more on Profile and Improve Performance 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!