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
4
votes
2 answers

Auto Discovery of the slave id of modbus device in a network

How to determine whether device connected to the network is modbus device after getting valid ip range through broadcasting mechanism or How to Auto Discover the slave id of modbus device connected to the gateway ?
Ayushi Gupta
  • 173
  • 1
  • 2
  • 13
3
votes
0 answers

minimalmodbus: No communication with the instrument (no answer) ModBus RTU via Ethernet for SDM630

I am using a Pi4B to try to read data from a SDM630 energy meter. Because the meter is far from the Pi I us a HF2211 ethernet to RS485 converter to bridge the distance. the HF2211 is in transparent mode so the payload of the ethernet messages is…
RobD
  • 91
  • 1
  • 7
3
votes
2 answers

Minimalmodbus: read multiple slaves on same serial port

I have a setup with 2 SDM120 kWh energy meters daisy chained on the same serial port (in the future I want to add a SDM630). I found "Using multiple instruments" in the MinimalModbus communication. I succeed in reading registers on the SDM120 on…
m2ts
  • 43
  • 5
2
votes
2 answers

Trouble reading MODBUS register using Python

I am trying to use Python (PyCharm) to read a register on a modbus device. I have confirmed the COM port, Baud rate and other communication settings and I can use the devices application to read the value (it is a water level logger). I am getting…
Joshua Patterson
  • 433
  • 1
  • 4
  • 15
2
votes
1 answer

Python Minimal Modbus CRC byte order

I'm looking to use Minimal Modbus to connect to my Solar Invertor (GivEnergy) via an RS485-USB adaptor. Unfortunately the implementation of the Modbus Protocol has reversed the CRC bytes, so Minimal Modbus fails on the CRC check. Is there a way of…
2
votes
3 answers

Can't connect to EPsolar Tracer 3210an charge controller from Windows 10 via Serial / Modbus

Summary I'm using this USB-to-RJ45 cable to connect my Windows 10 developer workstation to the EPEver Tracer 3210an solar charge controller. I'm using Python 3.8.6 with the minimalmodbus module to attempt to connect to the device, retrieve data, and…
user189198
2
votes
2 answers

Modbus RTU master - python script with minimalmodbus

I would like to control an actuator with a python script in MODBUS RTU master. I tried to use the library minimalmodbus to communicate (write bit, write & read registers) with my slave. When I start my code, I have some errors. So, someone can I…
Théo LE BORGNE
  • 21
  • 1
  • 1
  • 4
2
votes
2 answers

Can't communicate with Modbus device using minimalmodbus

I am failing to communicate with a device using minimalmodbus, Modbus RTU. I have connected the device to a raspberry pi via a usb to rs-485 adapter (FTDI chip) A to A and B to B. The device configurations are as follows: Port settings: Baud…
LecauseAndThePi
  • 155
  • 1
  • 4
2
votes
1 answer

How can i achieve slave in python using minimalmodbus?

I am using python minimamlmodbus library using this library i want to achieve slave and master communication in which i am going to be slave and the instrument will be master I have successfully achieve master and slave communication using…
2
votes
1 answer

Python script for RTU Modbus Slave

I am working on a automation test case for a system and need a automated modbus input device. My use case here is to implement a Raspberry pi based RTU modbus slave and connected to a modbus master. I want this Raspberry Pi based slave to populate…
vkrm
  • 31
  • 1
  • 1
  • 4
2
votes
1 answer

pyserial/Modbus - troubleshooting "No communication with instrument"

Beaglebone Black Wireless: Ubuntu 16.04, Computer: Ubuntu 16.04, Python 3.5.2 I am trying to communicate with a device via Modbus using a Beaglebone Black. I have read of people doing this same thing with a USB/RS485 dongle using minimalmodbus. I've…
2
votes
1 answer

extracting payload from slave in minimalmodbus python

I am using minimalmodbus to communicate with micro motion flow meter which uses rs485 protocol and i am using usb-rs485 converter. The micro motion modbus documentation is give here.…
2
votes
2 answers

Gefran 800P and minimalmodbus (Mac): "ValueError: Too short Modbus RTU response (minimum length 4 bytes). Response: '\x00' "

I am a beginner in Python (FYI) and trying to communicate with the Gefran 800P programmer/controller using minimalmodbus library (Python + Mac). I am using USB to RS485 Serial Converter Cable…
MMR
  • 31
  • 4
1
vote
2 answers

Energy Monitor using Minimalmodbus and PZEM 016 device

I am trying to clear the energy counter for a Peacefair AC PZEM 016 energy monitor. I have a nice little script going that measures the values of the registers, however, I can not clear the energy through the minimalmodbus library and keep getting…
1
vote
1 answer

How to read slave modbus holding registers by pymodbus?

I am trying to read holding registers over Modbus RTU with python. I can make it work with the minimalmodbus library, but not with the pymodbus library. What has so far worked is the minimalmodbus library: `import…
Jan
  • 11
  • 1
1
2 3 4 5 6