09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ISleep Deactivates an interrupt<br />

Example<br />

Arguments<br />

ISleep (Interrupt Sleep) is used to deactivate an individual interrupt temporarily.<br />

ISleep sig1int;<br />

The interrupt sig1int is deactivated.<br />

ISleep Interrupt<br />

Interrupt Data type: intnum<br />

Program execution<br />

Example<br />

The variable (interrupt identity) of the interrupt.<br />

The event connected to this interrupt does not generate any interrupts until the interrupt<br />

has been re-activated by means of the instruction IWatch. Interrupts which are generated<br />

whilst ISleep is in effect are ignored.<br />

VAR intnum timeint;<br />

CONNECT timeint WITH check_serialch;<br />

ITimer 60, timeint;<br />

.<br />

ISleep timeint;<br />

WriteBin ch1, buffer, 30;<br />

IWatch timeint;<br />

.<br />

TRAP check_serialch<br />

WriteBin ch1, buffer, 1;<br />

IF ReadBin(ch1\Time:=5) < 0 THEN<br />

TPWrite “The serial communication is broken”;<br />

EXIT;<br />

ENDIF<br />

ENDTRAP<br />

Communication across the ch1 serial channel is monitored by means of interrupts<br />

which are generated every 60 seconds. The trap routine checks whether the<br />

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

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

Saved successfully!

Ooh no, something went wrong!