Skip to main content

festo-cpx-io

festo-cpx-io is a python package which bundles python modules to facilitate operation of Festo CPX systems.

Documentation can be found here and in the examples directory.

Installation

Release

The latest release is available in the public PyPi repo. Install via pip:

pip install festo-cpx-io

If you want to use the cli or the logging feature you have to install the optional dependencies via:

pip install festo-cpx-io[cli]

For development dependencies use:

pip install festo-cpx-io --group dev

From git repo

You can also install directly from the git repo. It is recommended to use astrals uv.

  1. Clone the repository

    git clone <git-url> <destination>
    
  2. Change into the clone directory

    cd <destination>
    
  3. Setup all dependencies and install

    uv sync
    
  4. Install optional dependencies

    uv sync --all-extras
    

Usage

CLI - cli

festo-cpx-io is the main entry point to the CLI. It supports various subcommands which execute some basic functions.

For more information use the help flag (festo-cpx-io -h).

usage: festo-cpx-io [-h] [-v] [-i IP_ADDRESS] [-q] {cpx-e,cpx-ap} ...

options:
  -h, --help            show this help message and exit
  -v, --version         print current version
  -i IP_ADDRESS, --ip-address IP_ADDRESS
                        IP address to connect to (default: 192.168.0.1).
  -q, --quiet           remove output verbosity

subcommands:
  {cpx-e,cpx-ap}        Subcommand that should be called

Subcommands

  • cpx-e is a subcommand to execute commands on CPX-E devices
usage: festo-cpx-io cpx-e [-h] -t TYPECODE [-m MODULE_INDEX] {read,write} ...

options:
  -h, --help            show this help message and exit
  -t TYPECODE, --typecode TYPECODE
                        Typecode of the cpx setup
  -m MODULE_INDEX, --module-index MODULE_INDEX
                        Module index to read (default: 1).

action commands:
  Action to perform

  {read,write}
  • cpx-ap is a subcommand to execute commands on CPX-AP devices
usage: festo-cpx-io cpx-ap [-h] [-si] [-ss] {read,write} ...

options:
 -h, --help            show this help message and exit
 -si, --system-information
                       Print system information
 -ss, --system-state   Print system state
 -mt, --modbus-timeout Set a modbus timeout in seconds. Minimum timeout is 0.1s (100 ms).
                       Exception: setting timeout to 0.0s means an infinite timeout (no timeout).
                       If you don't specify a timeout we set it internally to None and the default
                       timeout on the device itself remains active!
action commands:
 Action to perform

 {read,write}

For example reading channel 2 from module 3 on a CPX-AP device with ip address 192.178.0.10: festo-cpx-io -i 192.178.0.10 cpx-ap read -m 3 -c 2

CPX-SYSTEM - cpx_system

CPX-E

Import the library with from cpx_io.cpx_system.cpx_e.cpx_e import CpxE.

Setup your system with a python context manager and print the attached modules. You can use the typecode of your system to setup all the modules, hand over a list of pre-instantiated modules in the CpxE constructor or instantiate an empty CpxE and add the modules later. In every case, the order of the modules must be consistent with the actually used hardware setup.

with CpxE(<typecode_string>, ip_address=<your_ip_address>) as myCPX:
    print(myCPX.modules)

For more information on how to setup the system and how to adress the modules read the docs see the examples.

CPX-AP

Import the library with from cpx_io.cpx_system.cpx_ap.cpx_ap import CpxAp.

The AP system will do all of the system setup for you. That means that you don't have to provide any more information than the ip-address. The modules are built during the runtime by a description file that will be collected directly from the modules. Since all the functionality of each module is created on your system, the documentation is also generated and stored on your device (e.g. your PC). You need to get the path by printing the system information with CpxAp.print_system_information(). Or just print(CpxAp.docu_path)

with CpxAp(ip_address=<your_ip_address>) as myCPX:
    myCPX.print_system_information()

For more information on how to setup the system and how to adress the modules, read the docs see the examples.

Metadata

Release files for festo-cpx-io 0.11.3

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

Built distribution (wheel)

Table of built distributions (wheels) for festo-cpx-io 0.11.3
File Interpreter ABI Platform Actions
festo_cpx_io-0.11.3-py3-none-any.whl Python 3 none any Details for festo_cpx_io-0.11.3-py3-none-any.whl

Release files / festo_cpx_io-0.11.3-py3-none-any.whl

Download URL festo_cpx_io-0.11.3-py3-none-any.whl
Size 74.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8a85c3ffdb1ddca3d4a8706561c588f6b38edf3b2dc1a83cc89f96f80d4d761
BLAKE2b-256 checksum
How to use checksums
4a8beee0340e0a1e2652ab63b286e14585f585fcf2d21c30dcd43358e5cf6328
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Security for festo-cpx-io 0.11.3

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.

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