User guide
eWON 500-2001-4001-4002 User Guide - Programming the eWON
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 125
There are a number of actions that can be programmed to occur upon event, like ONTIMER:
Suppose you add the above lines in the INIT SECTION, it will start timer 1 with an interval of 10 seconds
and program a "goto MyLabel" request when timer 1 ellapses.
What actually happens when the ONTIMER occurs is that the eWON posts the "goto MyLabel" request in the BASIC queue.
When the CYCLIC SECTION will be finished, the timer request will be extracted from the queue and then executed.
If the CYCLIC SECTION takes a long time to execute, then the time can elapse more than once during its execution,
this could lead to more timer action to be posted in the queue:
The basic queue can hold more than 100 requests, but if TIMER goes too fast or if other events like ONCHANGE are used the queue can
overflow, in that case an error is logged in the events file and requests are dropped.
You can also see that the ONTIMER request is not executed with the exact precision of a timer, depending on the current load of the BASIC when
the timer elapses. When an ASP block has to be executed for the delivery of a WEB page to a client, the ASP block is also put in the queue
Example: if ASP block contains the following lines:
TSET 1,10
ONTIMER 1,"goto MyLabel"
Queue pos Content Type
…
3
2 goto MyLabel
1 goto ewon_cyclic_section CYCLIC_SECTION
Table 87: BASIC Queue - 3
Queue pos Content Type
…
5
4 goto MyLabel
3 goto MyLabel
2 goto MyLabel
1 goto ewon_cyclic_section CYCLIC_SECTION
Table 88: BASIC Queue - 4
FromWebVar = Var1!
PRINT #0;TIME$