|
From: Catherine S. <Cat...@ti...> - 2015-07-29 18:44:29
|
In my original case, it seemed like the ExitCondition never became true even though it should have. Did the first two pressure-checking nodes turning true affect the ExitCondition? I understand your explanation, but I'm not sure what parent node was causing the issue in this case.
Thanks for your prompt replies and assistance, by the way. I appreciate it.
Catherine
From: Fry, Charles R. {Chuck} (ARC-TI)[SGT, INC] [mailto:chu...@na...]
Sent: Wednesday, July 29, 2015 12:30 PM
To: Catherine Szeto
Cc: Fry, Charles R. {Chuck} (ARC-TI)[SGT, INC]; <ple...@li...>
Subject: Re: [plexil-support] Three near-identical StartConditions, only one is not working
Yes, it appears that was the cause. ExitCondition behaves very similarly to InvariantCondition with a reversed logical sense: as soon as the ExitCondition of a parent node becomes true, every descendant node is aborted.
This includes Assignment nodes. When aborted, an Assignment node restores the variable's previous value.
-- Chuck
On Jul 29, 2015, at 10:20 AM, Catherine Szeto <Cat...@ti...<mailto:Cat...@ti...>> wrote:
I tried that and I got successful results! To be sure, I tried the test with the pressures meeting the StartCondition and then not meeting the StartCondition. The loops stops when the StartConditions are all met and keeps going if they are not, which is expected.
Was the redundancy between the ExitCondition and the RepeatCondition the root cause of my original issue?
Catherine
From: Fry, Charles R. {Chuck} (ARC-TI)[SGT, INC] [mailto:chu...@na...<http://nasa.gov>]
Sent: Wednesday, July 29, 2015 11:15 AM
To: Catherine Szeto
Cc: Fry, Charles R. {Chuck} (ARC-TI)[SGT, INC]; <ple...@li...<mailto:ple...@li...>>
Subject: Re: [plexil-support] Three near-identical StartConditions, only one is not working
Remove the ExitCondition on WaitingForCorrectPressureLevel and see what happens. It appears this redundant test is causing the loop to exit as soon as the last flag is assigned the value true.
-- Chuck
On Jul 29, 2015, at 7:53 AM, Catherine Szeto <Cat...@ti...<mailto:Cat...@ti...>>
wrote:
Chuck,
Since I couldn't figure out anything wrong with the distiller pressure node, I tried rearranging the three "Check...Pressure" nodes as brine, distiller, and product, versus the brine, product, and distiller. This time the product node was having issues exiting out. It seems to me that the loop is not correctly executing the third node, no matter which one it is. For easier testing, all three pressures are coded as "0" with the "scaledNomVacPressure" coded as "35".
I used the debug feature as you suggested. Below is what the console output was for one iteration. I highlighted the distiller pressure check in question. I've attached a screenshot of the Plexil viewer screen.
[Node:transition]Transitioning 'CheckBrinePressure' from WAITING to FINISHED at 1438124839.65869
[Node:outcome]Outcome of 'CheckBrinePressure' is SKIPPED
[Node:transition]Transitioning 'ASSIGNMENT__44' from FINISHED to INACTIVE at 1438124839.65869
[Node:transition]Transitioning 'PrintBrinePressure' from FINISHED to INACTIVE at 1438124839.65869
[Node:transition]Transitioning 'ASSIGNMENT__46' from FINISHED to INACTIVE at 1438124839.65869
[Node:transition]Transitioning 'PrintProductPressure' from FINISHED to INACTIVE at 1438124839.65869
[Node:transition]Transitioning 'ASSIGNMENT__48' from FINISHED to INACTIVE at 1438124839.65869
[Node:transition]Transitioning 'PrintDistillerPressure' from FINISHED to INACTIVE at 1438124839.65869
[Node:transition]Transitioning 'CheckProductPressure' from WAITING to FINISHED at 1438124839.65869
[Node:outcome]Outcome of 'CheckProductPressure' is SKIPPED
[Node:transition]Transitioning 'ASSIGNMENT__44' from INACTIVE to FINISHED at 1438124839.65869
[Node:outcome]Outcome of 'ASSIGNMENT__44' is SKIPPED
[Node:transition]Transitioning 'PrintBrinePressure' from INACTIVE to FINISHED at 1438124839.65869
[Node:outcome]Outcome of 'PrintBrinePressure' is SKIPPED
[Node:transition]Transitioning 'CheckDistillerPressure' from WAITING to EXECUTING at 1438124839.65869
[Node:transition]Transitioning 'ASSIGNMENT__46' from INACTIVE to FINISHED at 1438124839.65869
[Node:outcome]Outcome of 'ASSIGNMENT__46' is SKIPPED
[Node:transition]Transitioning 'PrintProductPressure' from INACTIVE to FINISHED at 1438124839.65869
[Node:outcome]Outcome of 'PrintProductPressure' is SKIPPED
[Node:transition]Transitioning 'ASSIGNMENT__48' from INACTIVE to WAITING at 1438124839.65869
[Node:transition]Transitioning 'PrintDistillerPressure' from INACTIVE to WAITING at 1438124839.65869
[Node:transition]Transitioning 'ASSIGNMENT__48' from WAITING to EXECUTING at 1438124839.65869
[Node:transition]Transitioning 'ASSIGNMENT__48' from EXECUTING to FAILING at 1438124839.65989
[Node:transition]Transitioning 'PrintDistillerPressure' from WAITING to FINISHED at 1438124839.65989
[Node:outcome]Outcome of 'PrintDistillerPressure' is SKIPPED
[Node:transition]Transitioning 'CheckDistillerPressure' from EXECUTING to FAILING at 1438124839.65989
[Node:transition]Transitioning 'WaitingForCorrectPressureLevel' from EXECUTING to FAILING at 1438124839.65989
[Node:transition]Transitioning 'ASSIGNMENT__48' from FAILING to FINISHED at 1438124839.65998
[Node:outcome]Outcome of 'ASSIGNMENT__48' is INTERRUPTED
[Node:transition]Transitioning 'CheckDistillerPressure' from FAILING to FINISHED at 1438124839.65998
[Node:outcome]Outcome of 'CheckDistillerPressure' is INTERRUPTED
[Node:transition]Transitioning 'WaitingForCorrectPressureLevel' from FAILING to ITERATION_ENDED at 1438124839.65998
Catherine
From: Fry, Charles R. {Chuck} (ARC-TI)[SGT, INC] [mailto:chu...@na...<http://nasa.gov/>]
Sent: Tuesday, July 28, 2015 4:34 PM
To: Catherine Szeto
Cc: Fry, Charles R. {Chuck} (ARC-TI)[SGT, INC]; <ple...@li...<mailto:ple...@li...>>
Subject: Re: [plexil-support] Three near-identical StartConditions, only one is not working
I don't see any issues with the files you sent this time.
Are you familiar with Plexil's debug trace faciliity? Is this running in an environment where you can spill a lot of debug info to a "console" or log file?
If you can, I'd like to see the output from a run with the following debug configuration:
:Node:transition
:Node:outcome
:Node:failure
The text above should be placed in a file named 'Debug.cfg' in the working directory from which Plexil is launched.
If you can't do this, let me see if I can find another way to ferret out what's really happening.
-- Chuck
On Jul 28, 2015, at 6:13 AM, Catherine Szeto <Cat...@ti...<mailto:Cat...@ti...>> wrote:
Sorry about that. I attached a plan with a similar name. Attached are the correct files.
Yes, the pressures start high and go lower. I cannot figure out if I have any incorrect syntax either, but it's bizarre that the nodes for the other two pressures are working fine while the last one is not.
Catherine
From: Fry, Charles R. {Chuck} (ARC-TI)[SGT, INC] [mailto:chu...@na...<http://nasa.gov/>]
Sent: Monday, July 27, 2015 6:28 PM
To: Catherine Szeto
Cc: <ple...@li...<mailto:ple...@li...>>
Subject: Re: [plexil-support] Three near-identical StartConditions, only one is not working
Hi Catherine. The attached files don't contain the fragments you quote below. Are you paraphrasing or did you mean to send some other files?
I don't see anything in the quoted code that looks incorrect.
I presume all the pressures are starting high and trending lower?
-- Chuck
On Jul 27, 2015, at 2:56 PM, Catherine Szeto <Cat...@ti...<mailto:Cat...@ti...>> wrote:
Hello Plexil team,
I have this part in my code in the attached Plexil plan:
CheckDistillerPressure:
{
StartCondition Lookup(PressureCdsskmCdTank) <= scaledNomVacPressure;
SkipCondition distillerPressureCorrect || (Lookup(PressureCdsskmCdTank) > scaledNomVacPressure);
distillerPressureCorrect = true;
PrintDistillerPressure: { pprint("EVT: distiller", Lookup(PressureCdsskmCdTank), "." );}
}
The plan basically has two separate loops and the plan runs one of the loops depending on a "full" or "empty" parameter. Both the "full" and "empty" loops have an inner loop that keeps checking "product", "brine", and "distiller" pressures. The inner loop prints out a statement when each pressure has met the correct pressure, and then exits when all three have met the correct pressure. When I run the plan, the "brine" and "product" pressures have no issues. The node checking for distiller pressure (the one copied and pasted above) never starts. I did some simple debugging by having the "distiller" pressure continuously printed, and was able to verify that the distiller pressure, "Lookup(PressureCdsskmCdTank)", is reading the correct input and actually is meeting the correct pressure. I tried hard-coding the "scaledNomVacPressure" in the StartCondition to "35", which is the correct pressure threshold, but that didn't changed anything.
The nodes that check for the product, brine, and distiller pressures are virtually identical, so I cannot figure out why the distiller pressure is having trouble while the brine and product are not. I would appreciate any suggestions to look into. For context, this is the loop that checks for the pressures:
WaitingForCorrectPressureLevel:
{
ExitCondition ((Lookup(time,0.1) - StartTimer.EXECUTING.START) > Lookup(VacuumTimeoutINTL)) ||
(brinePressureCorrect && productPressureCorrect && distillerPressureCorrect);
RepeatCondition (Lookup(time,0.1) - StartTimer.EXECUTING.START) <= Lookup(VacuumTimeoutINTL) &&
(!brinePressureCorrect || !productPressureCorrect || !distillerPressureCorrect);
CheckBrinePressure:
{
StartCondition Lookup(PressureCdsskmBrineTank) <= scaledNomVacPressure;
SkipCondition brinePressureCorrect || (Lookup(PressureCdsskmBrineTank) > scaledNomVacPressure);
brinePressureCorrect = true;
PrintBrinePressure: { pprint("EVT: brine", Lookup(PressureCdsskmBrineTank), "." );}
}
CheckProductPressure:
{
StartCondition Lookup(PressureCdsskmProductTank) <= scaledNomVacPressure;
SkipCondition productPressureCorrect || (Lookup(PressureCdsskmProductTank) > scaledNomVacPressure);
productPressureCorrect = true;
PrintProductPressure: { pprint("EVT: product", Lookup(PressureCdsskmProductTank), "." );}
}
CheckDistillerPressure:
{
StartCondition Lookup(PressureCdsskmCdTank) <= scaledNomVacPressure;
SkipCondition distillerPressureCorrect || (Lookup(PressureCdsskmCdTank) > scaledNomVacPressure);
distillerPressureCorrect = true;
PrintDistillerPressure: { pprint("EVT: distiller", Lookup(PressureCdsskmCdTank), "." );}
}
} //end of WaitingForCorrectPressureLevel
} //end of ApplyVacuumToAll_Sequence_FullLoop
Thanks,
Catherine
<ApplyVacuumTo.ple><ApplyVacuumTo.plx>------------------------------------------------------------------------------
_______________________________________________
plexil-support mailing list
ple...@li...<mailto:ple...@li...>
https://lists.sourceforge.net/lists/listinfo/plexil-support
Chuck Fry | QTS Inc.
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 QTS Inc., SGT, Code TI, or NASA, nor do they speak for me.
<ApplyVacuumToAll.ple><ApplyVacuumToAll.plx>
Chuck Fry | QTS Inc.
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 QTS Inc., SGT, Code TI, or NASA, nor do they speak for me.
<Pressure check issue.PNG>
Chuck Fry | QTS Inc.
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 QTS Inc., SGT, Code TI, or NASA, nor do they speak for me.
Chuck Fry | QTS Inc.
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 QTS Inc., SGT, Code TI, or NASA, nor do they speak for me.
|