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.

CONNECT Connects an interrupt to a trap routine<br />

Example<br />

Arguments<br />

CONNECT is used to find the identity of an interrupt and connect it to a trap routine.<br />

The interrupt is defined by ordering an interrupt event and specifying its identity. Thus,<br />

when that event occurs, the trap routine is automatically executed.<br />

VAR intnum feeder_low;<br />

CONNECT feeder_low WITH feeder_empty;<br />

ISignalDI di1, 1 , feeder_low;<br />

An interrupt identity feeder_low is created which is connected to the trap routine<br />

feeder_empty. The interrupt is defined as input di1 is getting high. In other words,<br />

when this signal becomes high, the feeder_empty trap routine is executed.<br />

CONNECT Interrupt WITH Trap routine<br />

Interrupt Data type: intnum<br />

The variable that is to be assigned the identity of the interrupt.<br />

This must not be declared within a routine (routine data).<br />

Trap routine Identifier<br />

Program execution<br />

Limitations<br />

The name of the trap routine.<br />

The variable is assigned an interrupt identity which can then be used when ordering or<br />

disabling interrupts. This identity is also connected to the specified trap routine.<br />

Note that before an event can be handled, an interrupt must also be ordered, i.e. the<br />

event specified.<br />

An interrupt (interrupt identity) cannot be connected to more than one trap routine.<br />

Different interrupts, however, can be connected to the same trap routine.<br />

When an interrupt has been connected to a trap routine, it cannot be reconnected or<br />

transferred to another routine; it must first be deleted using the instruction IDelete.<br />

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

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

Saved successfully!

Ooh no, something went wrong!