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.

<strong>Characteristics</strong><br />

VAR intnum feeder1_error;<br />

VAR intnum feeder2_error;<br />

.<br />

PROC init_interrupt();<br />

.<br />

CONNECT feeder1_error WITH correct_feeder;<br />

ISignalDI di1, 1, feeder1_error;<br />

CONNECT feeder2_error WITH correct_feeder;<br />

ISignalDI di2, 1, feeder2_error;<br />

.<br />

ENDPROC<br />

.<br />

TRAP correct_feeder<br />

IF INTNO=feeder1_error THEN<br />

.<br />

ELSE<br />

.<br />

ENDIF<br />

.<br />

ENDTRAP<br />

An interrupt is generated when either of the inputs di1 or di2 is set to 1. A call is<br />

then made to the correct_feeder trap routine. The system variable INTNO is used<br />

in the trap routine to find out which type of interrupt has occurred.<br />

Intnum is an alias data type for num and thus inherits its properties.<br />

Related information<br />

Described in:<br />

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

Alias data types <strong>Basic</strong> <strong>Characteristics</strong>-<br />

Data Types<br />

7-intnum-2 <strong>RAPID</strong> Reference Manual

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

Saved successfully!

Ooh no, something went wrong!