Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Adding CommandGroup in parallel? (http://www.chiefdelphi.com/forums/showthread.php?t=135777)

microbuns 03-15-2015 10:42 AM

Adding CommandGroup in parallel?
 
We have a command group that we wish to execute in parallel within another bigger command group. We can add the command group sequentially no problem, but the inner command group does not seem to execute when added in parallel. Any ideas?

otherguy 03-16-2015 10:20 AM

Re: Adding CommandGroup in parallel?
 
If the two command groups both have commands within them that require the same subsystem, I believe the command group that is added last will execute. The group added earlier will be ended. Two commands requiting the same subsystem cannon run simultaneously (you can't drive a motor fwd and rev at the same time), whichever command comes last will win (unless you explicitly guarded against this in your code).

You may need to restructure your commands into more groups, or you may need to split your subsystems up into more tightly defined groups of hardware. For exams a lift subsystem may contain a motor that changes vertical position and a solenoind controlling a brake. But depending on how you want to structure your commands, you may need to split the brake and motor into their own individual subsystems.

If that's not it:
Can you assign each group to a button and verify that each group works correctly when they are run independently?

Can you post your code (including the code for the commands in the command groups)?

microbuns 03-16-2015 01:10 PM

Re: Adding CommandGroup in parallel?
 
Otherguy - I think this is it. It didn't occur to me, but now that I think about it, there is a very small overlap in the subsystems I wish to use. Thanks!


All times are GMT -5. The time now is 10:46 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi