Page 1 of 1

Interrupt functionality in C or Python

Posted: 18 Mar 2017, 23:45
by Kim
I've been looking through the example code in both C and Python looking to see if it's possible to set an interrupt callback on an input pin of the DIO module. Can you please advise if this functionality is currently available? All the code I've seen just uses infinite while loops to scan the input pins.

Re: Interrupt functionality in C or Python

Posted: 19 Mar 2017, 13:19
by volker
KIM,
you are right: EN61131-3 only defines cyclical workflows and therefore our actual driver PiControl has no features to handle events. Event driven workflows are common to desktop applications and therefore are part of all modern programming languages. As RevPi shall be used to overcome software paradigms in industrial control devices and PLCs we are looking forward to new ways of programming the RevPi Core (e.g. IEC-61499 and its event driven and distributed way to control). We also are on the way to add event processing to the PiControl system and the PiCtory configuration tool. because we think that especially IoT will benefit a lot from such additions. We have not yet decided the features of this addition but you will probably get some kind of subscription to IO points which would result in a sw message triggering an isr as soon as properties of the IO point are changing.
Right now the only way to deal with this is to set up a task which cyclically polls the process image and would trigger processes in case of an event.