09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ITimer Orders a timed interrupt<br />

Examples<br />

Arguments<br />

ITimer (Interrupt Timer) is used to order and enable a timed interrupt.<br />

This instruction can be used, for example, to check the status of peripheral equipment<br />

once every minute.<br />

VAR intnum timeint;<br />

CONNECT timeint WITH iroutine1;<br />

ITimer 60, timeint;<br />

Orders an interrupt that is to occur cyclically every 60 seconds. A call is then<br />

made to the trap routine iroutine1.<br />

ITimer \Single, 60, timeint;<br />

Orders an interrupt that is to occur once, after 60 seconds.<br />

ITimer [ \Single ] Time Interrupt<br />

[ \Single ] Data type: switch<br />

Specifies whether the interrupt is to occur once or cyclically.<br />

If the argument Single is set, the interrupt occurs only once. If the argument is<br />

omitted, an interrupt will occur each time at the specified time.<br />

Time Data type: num<br />

The amount of time that must lapse before the interrupt occurs.<br />

The value is specified in seconds. If Single is set, this time may not be less than<br />

0.1 seconds. The corresponding time for cyclical interrupts is 0.5 seconds.<br />

Interrupt Data type: intnum<br />

Program execution<br />

The variable (interrupt identity) of the interrupt. This should have previously<br />

been connected to a trap routine by means of the instruction CONNECT.<br />

The corresponding trap routine is automatically called at a given time following the<br />

interrupt order. When this has been executed, program execution continues from where<br />

the interrupt occurred.<br />

<strong>RAPID</strong> Reference Manual 8-ITimer-1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!