Please enable JavaScript to view this site.

ESL Documentation

Response Definition

Respond to lack of stimulus after a number of seconds.

[interrupt] response to timeout SECONDS

[ACTION_STATEMENT] ...

interrupt

Allow ESL to leave and return to any block currently executing, except a guarded block, when the response is stimulated. ESL will first finish any current action statements in the block, then execute the actions in the interrupt response, and finally return to the block and await a stimulus from within the original block.

SECONDS

An integer value between 1 and 32K inclusive, representing the number of seconds during which ESL does not receive any stimulus.

ACTION_STATEMENT

An action statement.

Description

Use this statement to respond to lack of stimulus after a number of seconds. This definition does not recognize response to interval as a stimulus.

This definition can be specified within a block.

There can be only one active response to timeout statement at any given time.

Although the program will compile if you use an integer variable for SECONDS, it is a compile-time value only. Whatever the value of the variable is when the application is compiled will be the response time; for example:

integer Time_IV is 2

...

response to timeout Time_IV

The object code will respond to timeout 2, no matter what Time_IV is during runtime.

A response to timeout can be used to suspend ESL processing to allow an external application to complete any necessary processing. Since the SECONDS is not alterable, use response to interval to make this more flexible. The following example shows how to do this.

begin guarded

for I = 1 to NumberOfSeconds

response to interval 1

leave block

end loop

end

Example

response to timeout 60

stop Remote_Application

change to program Program_Logo

See Also

response to interval Response Definition