Interrupt functionality in C or Python

Topics about the Software of Revolution Pi
Post Reply
Kim
Posts: 6
Joined: 10 Feb 2017, 03:01
Answers: 0

Interrupt functionality in C or Python

Post 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.
User avatar
volker
Posts: 1046
Joined: 09 Nov 2016, 15:41
Answers: 1

Re: Interrupt functionality in C or Python

Post 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.
Unser RevPi Motto: Don't just claim it - make it!
Post Reply