Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual

Page 59

Advertising
background image

6Ć19

Note that it is possible to disable the timeout period for a hardware

event. Disable the timeout for I/O modules that, unlike the Resolver

module, do not generate a periodic interrupt. This format of the

event definition should be used carefully since the timeout provides

an extra level of protection in the event of a hardware failure. The

following is the alternate hardware EVENT NAME format:

EVENT NAME=event_name,

&

INTERRUPT_STATUS = I/O_variable_name,

&

TIMEOUT = DISABLED

Example:

10 COMMON IO_INT_REG%

.

.

.
90 EVENT NAME=HW_EV1,

&

INTERRUPT_STATUS=IO_INT_REG%,

&

TIMEOUT=DISABLED

The format is identical to that for a hardware event except that the

word DISABLED" is entered in place of an integer constant for the

timeout period. The timeout field cannot be left off or set to zero (0).

This forces the user to turn off the timeout by entering the word

DISABLED".
Note that the limit on the number of hardware and software events in

all tasks in a rack is 32.

6.6.2

SET and WAIT ON Statements

The SET statement is used to set an event or indicate that it has

occurred. Executing this statement makes any other tasks that were

suspended while waiting for that event to occur (or setting of that

event) eligible to run. WAIT ON causes task execution to stop until

the EVENT NAME is set by the SET statement. The format of the

SET statement is:

SET event_name

where:

event_name =

name of the hardware or software event previously defined by at

least one task

The format of the WAIT ON statement is:

WAIT ON event_name

where:

event_name =

previously defined by at least one task; same as the

corresponding SET statement.

The following is an example of EVENT NAME, SET, and WAIT ON

statements. Task ABC is performing a calculation every 40

milliĆseconds. Task XYZ is suspended waiting for event GAIN_OVER

to occur so that it can perform some calculations of its own. Task

XYZ needs to run only when event GAIN_OVER occurs, which, in

this example, will indicate that the variable GAIN is beyond a certain

maximum.

Advertising
This manual is related to the following products: