You specify the response to timeout statement if you want an action to occur when ESL has not received any stimulus after a specified number of seconds.
In the following example, if ESL has not received a stimulus from the user or from any application for 60 seconds, ESL will stop communications with Remote_Application and change to a new program.
response to timeout 60
stop Remote_Application
change to program Program_Logo
The response to timeout statement does not recognize response to interval as a stimulus. For example, if an ESL program has a message flashed on the screen every 15 seconds but does not receive any other stimulus for the specified number of seconds, the response to timeout statement will take effect.
A response to timeout statement can be specified within a block. The following example shows two response to timeout statements, one inside Block_1 and one in the main program. When the program is in Block_1, ESL does not execute the response to timeout 60 statement in the main program, but instead executes the response to timeout 15 statement. This is because there can be only one active response to timeout statement at any given time. However, if program execution is within the main program ) or in any unguarded block which does not have a response to timeout statement ) and nothing happens for 60 seconds, ESL executes the response to timeout 60 statement in the main program.
response to timeout 60
...
response to Main_Menu
begin Block_1
response to Restart
enable Open_Menu
response to timeout 15
stop all
end Block_1
...
begin Block_2
...