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.

Example<br />

Limitations<br />

Syntax<br />

If the interrupt occurs cyclically, a new computation of time is started from when the<br />

interrupt occurs.<br />

VAR intnum timeint;<br />

CONNECT timeint WITH check_serialch;<br />

ITimer 60, 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 communication<br />

is working. If it is not, program execution is interrupted and an error<br />

message appears.<br />

The same variable for interrupt identity cannot be used more than once, without being<br />

first deleted. See Instructions - ISignalDI.<br />

ITimer<br />

[ ’\’Single ’,’]<br />

[ Time ’:=’ ] < expression (IN) of num >’,’<br />

[ Interrupt ’:=’ ] < variable (VAR) of intnum > ’;’<br />

Related information<br />

Described in:<br />

Summary of interrupts <strong>RAPID</strong> Summary - Interrupts<br />

More information on interrupt management <strong>Basic</strong> <strong>Characteristics</strong>- Interrupts<br />

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

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

Saved successfully!

Ooh no, something went wrong!