Welcome to RevPiModIO Documentation!

RevPiModIO is a Python3 module for programming Revolution Pi hardware from KUNBUS GmbH. It provides easy access to all devices and IOs from the piCtory configuration, supporting both cyclic (PLC-style) and event-driven programming paradigms.

Note

New to RevPiModIO? Start with Installation and Quick Start.

Key Features

  • Dual Programming Models: Cyclic (PLC-style) and event-driven approaches

  • Direct Hardware Access: Simple Python interface to all I/O devices

  • Automatic Configuration: Loads piCtory device configuration

  • Event System: Callbacks for value changes and timer events

  • Open Source: LGPLv2 license, no licensing fees

Quick Example

Cyclic Programming:

import revpimodio2

def main(ct):
    if ct.io.button.value:
        ct.io.led.value = True

revpimodio2.run_plc(main)

Event-Driven Programming:

import revpimodio2
rpi = revpimodio2.RevPiModIO(autorefresh=True)

def on_change(ioname, iovalue):
    print(f"{ioname} = {iovalue}")

rpi.io.button.reg_event(on_change)
rpi.handlesignalend()
rpi.mainloop()

Documentation

External Resources

Indices and Tables