On Sun, Nov 15, 2009 at 7:31 PM, Alan <[email protected]> wrote:

> For instance the following script would change path, send beacon,
> and after beacon is sent then the counter would be reset and path
> would be changed back to nul:
>
> On Second
>   Increment Counter 1
>   If Counter 1 = 1705
>     Exec "PATH WIDE2-1"
>     Pause
>     Exec "BEA !3900.00N112300.00W#PHG27302/ W1, PLS use WIDE1-1,WIDE2-1 for 
> access/A=003000"
>     Pause
>     Pause
>     Set Counter 1 = 0
>     Exec "PATH -"
>   End Block
> End Block

Okay, I understand WHAT you are doing, but can you explain WHY you
want the pauses? What function do they serve?

> Rather than something like this:
>
> On Second
>   Increment Counter 1
>   If Counter 1 = 1705
>     Exec "PATH WIDE2-1"
>     Exec "BEA !3900.00N112300.00W#PHG27302/ W1, PLS use WIDE1-1,WIDE2-1 for 
> access/A=003000"
>   End Block
>   If Counter 1 = 1707
>     Set Counter 1 = 0
>     Exec "PATH -"
>   End Block
> End Block

As Scott says, this would be a better way to keep track of what you
are doing, and to have different commands run at different times.

You just test the counter value versus the action desired. The OT2 is
not just running straight line code from the script engine, there are
many processes being run at a time, and the script engine is just one
of the processes being handled. If the PAUSE were to shut down the
microprocessor for a second, it would stop everything. Packet
decoding, packet encoding, sensor input, control output, everything
would stop.

To pause the script engine for a second, keeping a tally of seconds,
and executing commands based on which second we are in makes more
sense. You're basically doing what I did with the weekly net
announcement script, but on a much shorter time interval. There's no
way I would want to tell the OT2 acting as a digipeater to go to sleep
for 7 days between net announcements.

We still need to get Scott to allow us to have a non-volatile outgoing
path configuration so we aren't writing to the memory all the time...
somebody get that man some Dr. Pepper, and a box of Twinkies!

James
VE6SRV

Reply via email to