Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

revpimodio2-2.9.0rc2.tar.gz (243.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

revpimodio2-2.9.0rc2-py3-none-any.whl (68.4 kB view details)

Uploaded Python 3

File details

Details for the file revpimodio2-2.9.0rc2.tar.gz.

File metadata

  • Download URL: revpimodio2-2.9.0rc2.tar.gz
  • Upload date:
  • Size: 243.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for revpimodio2-2.9.0rc2.tar.gz
Algorithm Hash digest
SHA256 ccaa4931f427ce2a0700b7ae1481510ba6c7262c09aecfa6dea5dea89136fb36
MD5 ea291c33296001cad4e84424178adc7a
BLAKE2b-256 353628ed2d51880614c67cb73968cd0ea2af97fcf9c016fa2a0a6d5faf04899b

See more details on using hashes here.

File details

Details for the file revpimodio2-2.9.0rc2-py3-none-any.whl.

File metadata

  • Download URL: revpimodio2-2.9.0rc2-py3-none-any.whl
  • Upload date:
  • Size: 68.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for revpimodio2-2.9.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 2186b80f952c89552d1da0d38142170e629438c9d0c7b27a49d180acecb49d79
MD5 312313c79d90eb08afaa55fd369b44e4
BLAKE2b-256 c3684c5908390ef296d3d3e86f81e06e77e8fa1429066aeb9de0a5733f0d7f0b

See more details on using hashes here.

Release history Release notifications | RSS feed

2.9.0

2 files

This release

2.9.0rc2 This release

2 files

2.8.1

2 files

2.8.0

2 files

2.7.2

2 files

2.7.1

2 files

2.7.0

2 files

2.6.1

2 files

2.6.0

2 files

2.5.10

1 file

2.5.9

1 file

2.5.8

1 file

2.5.7

1 file

2.5.6

1 file

2.5.5

1 file

2.5.3

1 file

2.5.2

1 file

2.5.1

1 file

2.5.0

1 file

2.4.5

1 file

2.4.2

1 file

2.4.1

1 file

2.4.0

1 file

2.3.3

1 file

2.3.2

1 file

2.3.1

1 file

2.2.5

1 file

2.2.4

1 file

2.2.3

1 file

2.2.2

1 file

2.1.6

1 file

2.1.5

1 file

2.1.3

1 file

2.1.2

1 file

2.0.7

1 file

2.0.6

1 file

2.0.5

1 file

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