Skip to main content

RevPiModIO

Documentation:

For a complete reference of all classes, methods, and functions, please see the official documentation: https://revpimodio2.readthedocs.io/

Python3 programming for RevolutionPi of KUNBUS GmbH.

The module provides all devices and IOs from the piCtory configuration in Python3. It allows direct access to the values via their assigned name. Read and write actions on the process image are managed by the module itself without the programmer having to worry about offsets and addresses.

For the gateway modules such as ModbusTCP or Profinet, own 'inputs' and 'outputs' can be defined over a specific address range. These IOs can be accessed directly from the values using Python3.

RevolutionPi Hardware

The hardware configuration is done via a web page, which is located on the PiCore module. The program is called “piCtory”.

All inputs and outputs can be assigned symbolic names to facilitate their handling and programming. If this configuration is created and activated, the data of the input, output and gateway modules are exchanged via a 4096-byte process image.

Our RevPiModIO module

If you use our module in Python3, it uses the piCtory configuration to create all the inputs and outputs with their symbolic names as objects. The programmer can address these directly via the symbolic names and access the values of the inputs and outputs – both reading and writing!

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

# If input t_on is high, set output h_on high
if rpi.io.t_on.value:
    rpi.io.h_on.value = True

# Clean up and sync process image
rpi.exit()

In addition, it provides the developer with many useful functions that can be used to develop cyclic or event-based programs.

If you know the .add_event_detect(...) function of the GPIO module from the Raspberry Pi, you can also achieve this behavior with the Revolution Pi:

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

def event_detect(ioname, iovalue):
    """Event function."""

    # Set actual input value to output 'h_on'
    rpi.io.h_on.value = iovalue

    print(ioname, iovalue)

# Bind event function to input 't_on'
rpi.io.t_on.reg_event(event_detect)

rpi.mainloop()

Even with hardware changes, but constant names of the inputs and outputs, the actual Python3 source code does not need to be changed!

How it works:

                         |-----------------------------------------------------|
                         |                                                     |
                         |                  Python program                     |
                         |                                                     |
--------------------     |     ----------------          --------------------  |
|                  |     |     |              |          |                  |  |
|  RevPi hardware  |  <----->  |  RevPiModIO  |  <---->  | Your source code |  |
|                  |     |     |              |          |                  |  |
--------------------     |     ----------------          --------------------  |
                         |                                                     |
                         |-----------------------------------------------------|

Summary

With this module we want to spare all Python developers a lot of work. All communication with the process image is optimally performed inside the module. Changes to the inputs and outputs are also evaluated along with the additional functions of the module give the developer many tools along the way.

More examples: (https://revpimodio.org/en/blogs/examples/)

Provided under the LGPLv2 license

Metadata

Release files for revpimodio2 2.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for revpimodio2 2.9.0
File Size Uploaded Provenance
revpimodio2-2.9.0.tar.gz 243.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for revpimodio2 2.9.0
File Interpreter ABI Platform
revpimodio2-2.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 311.8 kB

Release files / revpimodio2-2.9.0.tar.gz

Download URL revpimodio2-2.9.0.tar.gz
Size 243.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6e055f8195fcd48b705add32751f120fd13945aacc2a6278a57df02afd461735
BLAKE2b-256 checksum
How to use checksums
e3a44bfd1cad0f75397e9c770a41903e99f1c803d3857a8133410cffd415da22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / revpimodio2-2.9.0-py3-none-any.whl

Download URL revpimodio2-2.9.0-py3-none-any.whl
Size 68.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0145e6cefcfcac898639f1c6c900a937343dd0a860bd86a4b52627b7a4ce4d31
BLAKE2b-256 checksum
How to use checksums
0a74f2671f1db870e363a2b2f56fd9184e86a54bc6f92e7ed2fe76c526f4c982
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for revpimodio2 2.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.9.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page