Questions tagged [minimalmodbus]

MinimalModbus is an easy-to-use Python module for talking to instruments (slaves) from a computer (master) using the Modbus protocol, and is intended to be running on the master. The only dependence is the pySerial module (also pure Python).

The minimalmodbus Python Modbus library is hosted on https://github.com/pyhys/minimalmodbus and has its documentation at https://minimalmodbus.readthedocs.io

80 questions
0
votes
1 answer

python minimalmodbus protocol implementation for SMC LEC 6: write to multiple coils

minimalmodbus does not provide a way to set multiple coils at once. I cannot find a workaround. objective: The modbus protocol description in the datasheet of the SMC LEC 6 controller, see link. I try to follow the directions from the example…
0
votes
1 answer

How to read register of digital counter with minimalmodbus

I'm trying to read the values of an industry digital counter with Modbus RTU RS-485. Using USB-RS-485 conversion, and here is the master send code is taken from the following datasheet, Datasheet Link I am expecting that the read input register is…
Lactobacillus
  • 27
  • 1
  • 1
  • 7
0
votes
1 answer

Looking for an error in my Modbus Console.WriteLine

I have this C# Code, and it is producing an error on the Console.WriteLine($"Register {startAddress + i}={registers[i]}"); line. I have tried double )), and placed it everywhere in the statement. I simply cannot see where the error is. I am probably…
lnxbox
  • 1
0
votes
2 answers

Minimalmodbus, randomly generates wrong crc

I am currently working on a project of data acquisition with a RaspberryPi. When i launch my request script, sometimes (rare but too often) my slave (computer) detects a CRC error or invalid length. I'm guessing the error could come from the fact…
Searme
  • 26
  • 1
  • 7
0
votes
2 answers

Two same values for 2 different registers - minimalmodbus

I have started to work with minimal modbus with an AcuRev 2000 whose register map is in this link https://www.accuenergy.com/support/modbus-map/?modbus-map=acurev-2000-modbus-map, I am reading frequency (8192-8193) and voltage in line 2…
0
votes
1 answer

Minimalmodbus - RS485 shield for Raspberry Pi

I am trying to interface Seeed Studio's RS485 shield for Raspberry Pi along with the Python Minimalmodbus library on Raspberry Pi 2B - NOT WORKING!!! shield : https://www.seeedstudio.com/RS-485-Shield-for-Raspberry-Pi.html I tested following on…
MondoNovo
  • 1
  • 1
0
votes
1 answer

Find valid slaveaddresses or number of slaveaddresses in minimalmodbus

The documentation doesn't offer a way to do this and as far as i know a bus is not designed to do this. But maybe there is a kind of answer one can get from the devices without disturbing anything to determine which ones are there?
0
votes
1 answer

change baudrate in minimalmodbus

absolute beginner in Python (and Linux for that matter) trying to setup a modbus RTU master to control a stepper motor. Eventually I will try to implement the solution on a Raspberry Pi, but for now I'm trying to get it to work on a Windows machine.…
0
votes
1 answer

Minimalmodbus reconnect

Working on raspberry with Arduino connected over USB. Communicating over python with minimalmodbus library Trying to make reconnection when Arduino was unplugged for a while. I tried to repeat the connection code again on error, didn't helped. Is…
0
votes
1 answer

Python minimalmodbus reading 16-bit register

We have a heating controller that using 16-bit registers to read data. Example: register 512 - bit from 0 to 16 is using to read temperature. This code works fine for this exmaple #!/usr/bin/env python import minimalmodbus import…
kib0rg
  • 25
  • 4
0
votes
2 answers

Dealing with minimalmodbus exceptions in Python

I'm trying to create a small home monitoring system. I have a series of wireless transmitters that transmit measurement data to a base station. I can query that base station using Modbus RTU to find out the latest measurement values from each…
entropiae
  • 9
  • 4
0
votes
0 answers

How to adjust datetime series when reading from instruments?

I am using minimalmodbus to communicate via Modbus RS-485. The code is reading 4 registers every 6 seconds. Then, every minute the average for each variable is saved in a csv file. The goal is to have the time series data every minute, but from time…
HuHu
  • 25
  • 6
0
votes
1 answer

Minimalmodbus function code 0x46 and sub function 06

I am communicating with an irradiation sensor using minimalmodbus in Python 3.x. I can stablish a communication and read the registers of the sensor. The Baudrate of the sensor is 9600 but I want to change it to 38400. The datasheet of the sensor…
Dani
  • 21
  • 6
0
votes
1 answer

snmpd pass to run python

Im trying to query a modbus device trough snmp using snmpd to pass a python script to retrieve data. #! /bin/bash if [ "$1" = "-g" ] then echo .1.3.6.1.4.1.52612.10.3.1 echo string python /usr/local/bin/readvolt.py fi exit 0 And this is the…
suryo
  • 21
  • 3
0
votes
1 answer

MinimalModbus Timing out on bulk Bit reading

hopping someone here can help please. Im communicating with a modbus device and getting data back as expected, im pretty new to this so i need a bit of advice, im trying to read all of the bit registers on my device (Eaton SC200) for a custom HMI.…