12.07.2015 Views

RAPID reference manual - Technology

RAPID reference manual - Technology

RAPID reference manual - Technology

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.

InstructionCONNECTRobotWare-OSCONNECT - Connects an interrupt to a trap routineCONNECT is used to find the identity of an interrupt and connect it to a trap routine.The interrupt is defined by ordering an interrupt event and specifying its identity. Thus,when that event occurs, the trap routine is automatically executed.ExampleVAR intnum feeder_low;CONNECT feeder_low WITH feeder_empty;ISignalDI di1, 1 , feeder_low;An interrupt identity feeder_low is created which is connected to the trap routinefeeder_empty. The interrupt is defined as input di1 is getting high. In otherwords, when this signal becomes high, the feeder_empty trap routine is executed.ArgumentsCONNECT Interrupt WITH Trap routineInterruptData type: intnumThe variable that is to be assigned the identity of the interrupt.This must not be declared within a routine (routine data).Trap routineIdentifierThe name of the trap routine.Program executionThe variable is assigned an interrupt identity which can then be used when ordering ordisabling interrupts. This identity is also connected to the specified trap routine.Note that before an event can be handled, an interrupt must also be ordered, i.e. theevent specified.LimitationsAn interrupt (interrupt identity) cannot be connected to more than one trap routine. Differentinterrupts, however, can be connected to the same trap routine.When an interrupt has been connected to a trap routine, it cannot be reconnected ortransferred to another routine; it must first be deleted using the instruction IDelete.<strong>RAPID</strong> <strong>reference</strong> <strong>manual</strong> - part 1a, Instructions A-R 59

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

Saved successfully!

Ooh no, something went wrong!