revpimodio2


Namerevpimodio2 JSON
Version 2.8.0 PyPI version JSON
download
home_pagehttps://revpimodio.org/
SummaryPython3 programming for RevolutionPi of KUNBUS GmbH
upload_time2024-11-13 13:14:21
maintainerSven Sager
docs_urlNone
authorSven Sager
requires_python>=3.2
licenseLGPLv2
keywords revpi revolution pi revpimodio plc automation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RevPiModIO

### 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](https://revolution.kunbus.com)

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](https://revpimodio.org/)

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.txt) license

            

Raw data

            {
    "_id": null,
    "home_page": "https://revpimodio.org/",
    "name": "revpimodio2",
    "maintainer": "Sven Sager",
    "docs_url": null,
    "requires_python": ">=3.2",
    "maintainer_email": "akira@revpimodio.org",
    "keywords": "revpi, revolution pi, revpimodio, plc, automation",
    "author": "Sven Sager",
    "author_email": "akira@narux.de",
    "download_url": "https://files.pythonhosted.org/packages/dc/2d/209b97578b54e2a5cc023a9912d803fafb1ff71336a1e032def00c5ceed2/revpimodio2-2.8.0.tar.gz",
    "platform": "all",
    "description": "# RevPiModIO\n\n### Python3 programming for RevolutionPi of KUNBUS GmbH.\n\nThe module provides all devices and IOs from the piCtory configuration in\nPython3. It allows direct access to the values via their assigned name. Read and\nwrite actions on the process image are managed by the module itself without the\nprogrammer having to worry about offsets and addresses.\n\nFor the gateway modules such as ModbusTCP or Profinet, own 'inputs' and\n'outputs' can be defined over a specific address range. These IOs can be\naccessed directly from the values using Python3.\n\n#### [RevolutionPi Hardware](https://revolution.kunbus.com)\n\nThe hardware configuration is done via a web page, which is located on the\nPiCore module. The program is called \u201cpiCtory\u201d.\n\nAll inputs and outputs can be assigned symbolic names to facilitate their\nhandling and programming. If this configuration is created and activated, the\ndata of the input, output and gateway modules are exchanged via a 4096-byte\nprocess image.\n\n#### [Our RevPiModIO module](https://revpimodio.org/)\n\nIf you use our module in Python3, it uses the piCtory configuration to create\nall the inputs and outputs with their symbolic names as objects. The programmer\ncan address these directly via the symbolic names and access the values of the\ninputs and outputs \u2013 both reading and writing!\n\n```\nimport revpimodio2\nrpi = revpimodio2.RevPiModIO(autorefresh=True)\n\n# If input t_on is high, set output h_on high\nif rpi.io.t_on.value:\n    rpi.io.h_on.value = True\n\n# Clean up and sync process image\nrpi.exit()\n```\n\nIn addition, it provides the developer with many useful functions that can be\nused to develop cyclic or event-based programs.\n\nIf you know the .add_event_detect(...) function of the GPIO module from the\nRaspberry Pi, you can also achieve this behavior with the Revolution Pi:\n\n```\nimport revpimodio2\nrpi = revpimodio2.RevPiModIO(autorefresh=True)\n\ndef event_detect(ioname, iovalue):\n    \"\"\"Event function.\"\"\"\n\n    # Set actual input value to output 'h_on'\n    rpi.io.h_on.value = iovalue\n\n    print(ioname, iovalue)\n\n# Bind event function to input 't_on'\nrpi.io.t_on.reg_event(event_detect)\n\nrpi.mainloop()\n```\n\nEven with hardware changes, but constant names of the inputs and outputs, the\nactual Python3 source code does not need to be changed!\n\n#### How it works:\n\n```\n                         |-----------------------------------------------------|\n                         |                                                     |\n                         |                  Python program                     |\n                         |                                                     |\n--------------------     |     ----------------          --------------------  |\n|                  |     |     |              |          |                  |  |\n|  RevPi hardware  |  <----->  |  RevPiModIO  |  <---->  | Your source code |  |\n|                  |     |     |              |          |                  |  |\n--------------------     |     ----------------          --------------------  |\n                         |                                                     |\n                         |-----------------------------------------------------|\n```\n\n#### Summary\n\nWith this module we want to spare all Python developers a lot of work. All\ncommunication with the process image is optimally performed inside the module.\nChanges to the inputs and outputs are also evaluated along with the additional\nfunctions of the module give the developer many tools along the way.\n\nMore examples: (https://revpimodio.org/en/blogs/examples/)\n\nProvided under the [LGPLv2](LICENSE.txt) license\n",
    "bugtrack_url": null,
    "license": "LGPLv2",
    "summary": "Python3 programming for RevolutionPi of KUNBUS GmbH",
    "version": "2.8.0",
    "project_urls": {
        "Homepage": "https://revpimodio.org/"
    },
    "split_keywords": [
        "revpi",
        " revolution pi",
        " revpimodio",
        " plc",
        " automation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f0d5500ad1b7757f22791a565171c52dae2cc9b4318acccd2fa2d9565dcfe2c3",
                "md5": "2683748d5034b0822436a157d21e014b",
                "sha256": "55ab5ac50570bd7b92eefc495dc13c00d4e58b553e2ebf243e536b31677259db"
            },
            "downloads": -1,
            "filename": "revpimodio2-2.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2683748d5034b0822436a157d21e014b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.2",
            "size": 70381,
            "upload_time": "2024-11-13T13:14:20",
            "upload_time_iso_8601": "2024-11-13T13:14:20.166504Z",
            "url": "https://files.pythonhosted.org/packages/f0/d5/500ad1b7757f22791a565171c52dae2cc9b4318acccd2fa2d9565dcfe2c3/revpimodio2-2.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dc2d209b97578b54e2a5cc023a9912d803fafb1ff71336a1e032def00c5ceed2",
                "md5": "dbd485af854d98db6f4d266e51d1c005",
                "sha256": "506e7ae9b6c38c914ee39976b385ce75faf6d76d737302ae3b4c9041dbacd95a"
            },
            "downloads": -1,
            "filename": "revpimodio2-2.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "dbd485af854d98db6f4d266e51d1c005",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.2",
            "size": 224592,
            "upload_time": "2024-11-13T13:14:21",
            "upload_time_iso_8601": "2024-11-13T13:14:21.458573Z",
            "url": "https://files.pythonhosted.org/packages/dc/2d/209b97578b54e2a5cc023a9912d803fafb1ff71336a1e032def00c5ceed2/revpimodio2-2.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-13 13:14:21",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "revpimodio2"
}
        
Elapsed time: 5.01842s