Skip to main content

Python library to access Studer-Innotec Next devices through Modbus RTU/TCP.

Prerequisites

Please read the complete documentation available on : Studer Innotec SA -> Support -> Download Center -> Software and Updates

Getting Started

1. Package installation

$ pip install nxmodbus

2. Hardware installation

  • Connect your Next installation through a Next gateway (e.g. nx-interface) to your controller (personal computer, Raspberry Pi, etc.)
    • (RTU) using a USB to RS-485 adapter.

    • (TCP) using the Ethernet interface connecting to your local area network.

3. Serial configuration

This package rely on pyserial standard package, in order to use the nxmodbus package make sure to instantiate it like :

import serial

serial_port = serial.Serial(SERIAL_PORT_NAME, SERIAL_PORT_BAUDRATE, parity=serial.PARITY_EVEN, timeout=1)
  • where SERIAL_PORT_NAME is your serial port interface, for example set it to ‘COM4’ (string argument) when using Windows otherwise you may set it to ‘/dev/ttyUSB0/’ on Linux

  • where SERIAL_PORT_BAUDRATE is the baudrate used by your serial port interface (use the Nx-interface to set the serial parameter of the server)

4. Run an example from /examples folder

Go to /examples folder with a terminal and execute this script

$ python ex_rtu_read_param.py
$ python ex_tcp_read_param.py

Check client_rtu file or client_tcp file to understand it.

5. Open documentation

Open documentation from Read The Docs

Warnings

  • Use devices addresses generated into addresses file

  • It is strongly recommended NOT to spam the Next gateway with multiple requests. The correct way to communicate with the Next gateway is to send a request and to wait for the response before sending the next request. If no response comes from the nxmodbus after a delay of 1 second, we can consider that the timeout is over and another request can be send. It is also how Modbus RTU is intended to work.

Authors

Studer Innotec SA - Initial work - Studer Innotec SA

License

This project is licensed under the MIT License - see the LICENSE file for details

Metadata

Release files for nxmodbus 0.4.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 nxmodbus 0.4.0
File Size Uploaded
nxmodbus-0.4.0.tar.gz 68.3 kB Details

Built distribution (wheel)

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

Total release size: 140.0 kB

Release files / nxmodbus-0.4.0.tar.gz

Download URL nxmodbus-0.4.0.tar.gz
Size 68.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e30561b28f2dff2a8e0f8db004a1197950257225229a6285021ac0dfbfdcb9fd
BLAKE2b-256 checksum
How to use checksums
f21505823b02d5cd29aca6dbf2f5e5094cb48721bba8aab65dc7098bcbfdaf6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release files / nxmodbus-0.4.0-py3-none-any.whl

Download URL nxmodbus-0.4.0-py3-none-any.whl
Size 71.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a09bea4ea31afeb876e0f8fbc25a80aa5de6b6873e2f9194e3ff7282ae2ce9a5
BLAKE2b-256 checksum
How to use checksums
63373c05326068c9b70a9e7f7c2feca9e6b4001e066f0a53f4b1e1ec1dea9771
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

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