|
From: Chris L. <Chr...@md...> - 2014-04-01 15:28:09
|
Good morning,
I am a complete newcomer to PLEXIL, so please excuse me if this is problem is due solely to my ignorance.
It appears that Lookup(time, tolerance) always returns 0.
I am using plexil-3 on Ubuntu 12.04.
The test program is a modification of plexil-3/examples/temporal/TimedIterationTest.ple
[Note that similar results were found using plexil 2.5 both precompiled and rebuilt, using timed-iteration.ple]
Code snippet below:
TimedIterationTest:
{
// variables snipped here
foo = TimedIterationTest.EXECUTING.START;
pprint("Start time = ", foo);
foo = Lookup(time, timeTolerance);
pprint("Lookup time = ", foo);
startTime = TimedIterationTest.EXECUTING.START + initialWait;
pprint("Run to start at", startTime);
// If either the "Start" or "EndCondition" lines below are uncommented, I do not get any printouts
// past this point - not even "Iteration completed at"
Iterate:
{
//Start Lookup(time, timeTolerance) >= startTime;
RepeatCondition i < repeatCount;
//EndCondition Lookup(time, timeTolerance) >= Iterate.EXECUTING.START + iterationInterval;
i = i + 1;
pprint("Iteration", i, "at", Iterate.EXECUTING.START);
pprint("Lookup ", i, "at", Lookup(time, timeTolerance));
}
pprint("Iteration completed at", Iterate.EXECUTING.END);
}
To compile this, I'm using:
plexilc TimedIterationTest.ple
To run this, I'm using:
plexiltest -plan TimedIterationTest.plx
When I run, I get:
No simulation script specified; using empty script.
Running executive from /home/ugps/plexil-3
Plan: TimedIterationTest.plx
Script: /home/ugps/plexil-3/examples/empty.psx
Libraries:
Library directories:
PORT:
Start time = 0
Lookup time = 0
Run to start at 10
Iteration 1 at 0
Lookup 1 at 0
Iteration 2 at 0
Lookup 2 at 0
Iteration 3 at 0
Lookup 3 at 0
Iteration 4 at 0
Lookup 4 at 0
Iteration 5 at 0
Lookup 5 at 0
Iteration 6 at 0
Lookup 6 at 0
Iteration 7 at 0
Lookup 7 at 0
Iteration 8 at 0
Lookup 8 at 0
Iteration 9 at 0
Lookup 9 at 0
Iteration 10 at 0
Lookup 10 at 0
Iteration completed at 0
If I uncomment the Start and EndCondition lines, I get:
No simulation script specified; using empty script.
Running executive from /home/ugps/plexil-3
Plan: TimedIterationTest.plx
Script: /home/ugps/plexil-3/examples/empty.psx
Libraries:
Library directories:
PORT:
Start time = 0
Lookup time = 0
Run to start at 10
And just to be sure, I set iterationCount = 100000 so that it would certainly go over 1 second of execution time. Still I get:
...
Iteration 99995 at 0
Lookup 99995 at 0
Iteration 99996 at 0
Lookup 99996 at 0
Iteration 99997 at 0
Lookup 99997 at 0
Iteration 99998 at 0
Lookup 99998 at 0
Iteration 99999 at 0
Lookup 99999 at 0
Iteration 100000 at 0
Lookup 100000 at 0
Iteration completed at 0
Any help would be greatly appreciated. Thanks.
Chris
Chris Langley, Ph.D., P.Eng.
Senior Engineer, Guidance, Navigation, and Control
MDA Space Missions
9445 Airport Road
Brampton, Ontario
CANADA L6S 4J3
1 (905) 790-2800 x4199
|