|
From: Dalal, M. (ARC-TI)[S. G. T. I. (S. Inc.)] <mic...@na...> - 2014-02-18 23:16:19
|
I see something else, which is probably unrelated to the concurrency problem, but wanted to point out.
ApplyVacuumTo_Sequence is a normal sequence, and according to the reference doc, "A Sequence succeeds if and only if all its actions succeed…". One action in your sequence has outcome Skipped. From looking at the code, we check only for a Failure outcome, so ApplyVacuumTo_Sequence should succeed even if actions in it are skipped. This seems like the desirable behavior, so we should correct our documentation, after confirm it with a test. I'm unable to do so at the moment, but if you (hopefully) see this action succeed, let us know.
An alternative to a normal sequence is
UncheckedSequence {
…
}
which as you would guess ignores the outcome of its subactions.
BTW, sorry for not replying earlier, but I'm buried in another project, one that doesn't use PLEXIL.
Cheers,
Mike
Catherine,
Perhaps the while loop in MonitorTimeout is just spinning and hence blocking the plan. Monitors are typically written with Start conditions, which are checked once per macro step or quiescence cycle. Could you try this:
MonitorTimeout:
{
ExitCondition isVacuumApplied;
StartCondition Lookup(time,0.1) - startTime <= timeOut;
pastTimeOut = true;
}
I'll think about this some more, and may have another idea…
Mike
On Feb 18, 2014, at 7:50 AM, Catherine Szeto <Cat...@ti...<mailto:Cat...@ti...>> wrote:
Any feedback or alternatives I should try?
From: Catherine Szeto
Sent: Thursday, February 13, 2014 10:45 AM
To: 'Fry, Charles R. {Chuck} (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]'
Cc: ple...@li...<mailto:ple...@li...>
Subject: RE: [plexil-support] Concurrence not working (previously sent before, but this time without attachment)
Sure. MonitorTimeout is simple so I put its entirety here and I put a snippet of ApplyVacuumTo_Sequence:
MonitorTimeout:
{
ExitCondition isVacuumApplied;
while((Lookup(time,0.1) - startTime) <= timeOut) {}
pastTimeOut = true;
}
ApplyVacuumTo_Sequence
{
**variable assignments here**
ExitCondition (Lookup(time,0.1) - startTime) > timeOut;
RepeatCondition …;
LibraryCall SetSpecialValves();
LibraryCall TurnVacuumValves();
….
isVacuumApplied =true;
}
My goal is to have ApplyVacuumTo_Sequence execute while have some kind of timer that forces ApplyVacuumTo_Sequence to abort if it goes over the given “timeOut” time before it finishes execution. If it is aborted, I need to print to the terminal that ApplyVacuumTo_Sequence was aborted due to timeout. I put MonitorTimeout as a way to set a flag in case ApplyVacuumTo_Sequence is forced to finish due to being overtime, so another node can read that flag to print to the terminal about the timeout.
Catherine
From: Fry, Charles R. {Chuck} (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] [mailto:chu...@na...]
Sent: Wednesday, February 12, 2014 6:15 PM
To: Catherine Szeto
Cc: ple...@li...<mailto:ple...@li...>
Subject: Re: [plexil-support] Concurrence not working (previously sent before, but this time without attachment)
What is the interaction between MonitorTimeout and ApplyVacuumTo_Sequence? Can you send us a code fragment?
-- Chuck
On Feb 12, 2014, at 3:00 PM, Catherine Szeto <Cat...@ti...<mailto:Cat...@ti...>> wrote:
Hello,
I am trying to run two actions concurrently, but one (ApplyVacuumTo_Sequence) always waits with its first subaction as “skipped” while the other (MonitorTimeout) continues to execute. The waiting action doesn’t continue until the other one is finished. Without the MonitorTimeout action, ApplyVacuumTo_Sequence executes all of its subactions without a problem. All MonitorTimeout has is a while loop that exits after a timeout is reached. If it is relevant, the subaction that is waiting is one that calls another plan through LibraryCall.
Please confirm if this is correct Concurrence behavior or not. Thank you.
Catherine Szeto
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk_______________________________________________
plexil-support mailing list
ple...@li...<mailto:ple...@li...>
https://lists.sourceforge.net/lists/listinfo/plexil-support
Chuck Fry
Senior Software Engineer
Dell | Services, Federal Government
Office: 650 604 1882 Mobile: 408 230 2715
M/S 269-1, Building N269/260-7
NASA Ames Research Center
Moffett Field, CA 94035-1000
I do not speak for Dell, SGT, Code TI, or NASA, nor do they speak for me.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk_______________________________________________
plexil-support mailing list
ple...@li...<mailto:ple...@li...>
https://lists.sourceforge.net/lists/listinfo/plexil-support
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk_______________________________________________
plexil-support mailing list
ple...@li...
https://lists.sourceforge.net/lists/listinfo/plexil-support
|