|
From: López P. D. <die...@ed...> - 2015-11-23 15:12:16
|
Dear PLEXIL support:
Thanks for the reply, now LookUpOnChange works fine. Anyway, I'm still having troubles with my application. Particurarly, what I want to do is the following:
- I have a command node that executes a function implemented by means of a RPC server.
- I want to control previous command timeout using LookupOnChange, so I'm able to finish the previous command if timeout.
- I have a command that can stop the RPC command.
I tried to do this in different ways. I tried to use the synchronous command node but it fails (due to the invariant condition). Following is the PLEXIL node implementation:
String Command moveto(String pos);
//************************************************
MoveTo:
{
SynchronousCommand cpos=moveto(object_dest) Timeout 3.0, 1.0;
}
Also, I tried to do it in two concurrence nodes. It evaluates the timer only at the beggining and at the end of the command execution, and thus, the timeout is not working. Following is the PLEXIL code:
String Command moveto(String pos);
//***********************************************************
TimerNode:
{
EndCondition LookupOnChange(time,1)>=now+5 || Locomotion.outcome==SUCCESS;
}
Locomotion:
{
PostCondition cpos=="c13_15"
cpos=moveto(object_dest);
}
Thanks in advance,
Diego.
________________________________
De: Dalal, Michael (ARC-TI)[SGT, INC] <mic...@na...>
Enviado: miércoles, 18 de noviembre de 2015 19:38
Para: López Pajares Diego
Cc: Fry, Charles R. {Chuck} (ARC-TI)[SGT, INC]; ple...@li...
Asunto: Re: [plexil-support] Problem with LookupOnChange
I've revised the PLEXIL reference accordingly. Our apologies for this omission.
Thanks for your interest in PLEXIL.
Mike
K. Michael Dalal
SGT Inc. at NASA Ames Research Center
*Opinions expressed herein are my own*
LookupOnChange for time requires a tolerance argument.
For your example, you could use:
LookupOnChange(time, 1)
or
LookupOnChange(time, 15)
I hope this is helpful.
-- Chuck
On Nov 18, 2015, at 9:53 AM, López Pajares Diego <die...@ed...<mailto:die...@ed...>> wrote:
Dear PLEXIL support:
I'm using PLEXIL for operate a robot in a research project of the Universidad de Alcalá. I have a problem with a LookupOnChange for make a timer. At present I use OSNativeTime as time adapter, and the node which contains the timer is the next:
Timer:
{
Real now;
EndCondition LookupOnChange(time)>now+15;
now=LookupNow(time);
}
(15 are the seconds for stop the timer).
When I execute this node never ends.
NOTE: PLEXIL version is 2.5.
I would appreciate more information about LookupOnChange, and sorry if my english is very bad.
A greeting
Diego.
------------------------------------------------------------------------------
_______________________________________________
plexil-support mailing list
ple...@li...<mailto:ple...@li...>
https://lists.sourceforge.net/lists/listinfo/plexil-support
|