Please enable JavaScript to view this site.

ESL Documentation

A stimulus response specifies the action statements that ESL is to perform when the stimulus library generates an event.

 

When the library generates an event, it provides two parameters: an event number and an event parameter. These are integer values that the library can use to provide information regarding the event. A stimulus response can optionally specify a value that must match the event number or the event parameter in order for the response to be performed.

 

When you define a response to stimulus, the event filter and the parameter filter can each be:

 

A numeric constant

A numeric variable, which is not a local subroutine variable or parameter

A numeric literal

An asterisk, which will match any value

 

In order for the response to be invoked:

 

The event filter must match the event number provided by the DLL when it invokes the response. If * is specified, any event number will match.

The parameter filter must match the event parameter provided by the DLL when it invokes the response. If * is specified, any event parameter will match.

 

Both filter values are optional. If neither is specified, the response will be invoked whenever the stimulus library asks ESL to invoke it.

 

When searching for a matching response to a stimulus event, ESL executes the first response that matches the given event number and parameter. ESL searches all currently active blocks for a matching response, until either the outermost block has been searched or a guarded block has been reached. If a matching response is not found, no response is executed and the event is discarded.

 

# This response will be executed only when

# eventnumber = F1 and eventparam = F2. 

response to stimulus StimulusName F1 F2

    ...

 

# This response will be executed whenever

# eventnumber = F1.

response to stimulus StimulusName F1

    ...

 

# This response will be executed whenever

# eventparam = F2.

response to stimulus StimulusName * F2

    ...

 

# This matches any stimulus event 

response to stimulus StimulusName

    ...