Hi Coppellia
I use non-threaded child script to run my simulation. The problem is that I want to use two algorithms which the first must be completed before the second starts. From the moment that the entire script executes iteratively like a giant while loop process, how can I use two controllers in series not parallel?
running scripts
Re: running scripts
Hello,
since non-threaded child scripts are constantly called (and also constantly need to give control back), you could do something like:
But better would be to use a threaded child script.
Cheers
since non-threaded child scripts are constantly called (and also constantly need to give control back), you could do something like:
Code: Select all
function sysCall_init()
task1Finished=false
task2Finished=false
end
function sysCall_actuation()
if not task1Finished then
-- compute iteratively task1
else
if not task2Finished then
-- compute iteratively task2
end
end
end
Cheers