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
1
vote
2 answers

Modbus registers can be only read and cannot be written

I am trying communicate via Modbus protocol to a uC2 SE controller for a air-water chiller. A serial RS485 to USB port COM is connected with the controller and I was able to read registers, but it is not possible to change their values by using…
1
vote
1 answer

How do I fix the checksum error in modbus

I have a script which should collect the concentration data from a sensor connected with MODBUS. When i run the script, this error occures: Traceback (most recent call last): File "C:\Users\AquaBattery.HP-LAPTOP\Desktop\H2-reading.py", line 33, in…
Lucas
  • 51
  • 1
  • 4
1
vote
1 answer

Trying to Control a DGH D8500 modbus via python

i have this Two channel Analog Output modbus RTU protocol USB Interface named, DGH D8500. I need to control the voltage of the channels dynamically and automated through python. I connected it i tried it with its own program, but I'm failing to…
1
vote
1 answer

Handling unusual response from slave register - Extra 'FF' added by manufacturer

I am communicating to a micro controller successfully through RS485 (USB to RS485 adapter over windows COM port). I have written a small program using minimalmodbus to handle the modbus RTU communication and it works perfectly. The micro controller…
Kinno
  • 13
  • 2
1
vote
1 answer

Error in writing to multiple slaves in minimalmodbus

I am trying to interface with a temperature controller using Modbus RTU. I am not very familar with the topic, but I have been able to write code that can read the temperature of my three temperature controllers, but when I try to write to the three…
1
vote
1 answer

minimalmodbus read data bits

data blocks I cant seem to be able to read I'm only quite new to python and modbus and I have been struggling to work out how to read the MSBytes and LSBytes of this controller using both pymodbus and minimalmodbus for a week or two now so hopefully…
Cory C
  • 125
  • 1
  • 9
1
vote
0 answers

python minimal modbus write float word swap

The PLC I am trying to use minimal modbus to write_float to needs the words swapped. I already tested the hardware with Modbus Poll that works. The Minimal Modbus write_float also works, but with the wrong word order. I checked the documentation…
user3005949
  • 117
  • 2
  • 12
1
vote
1 answer

Python: convert array of uint16_t to string (from Arduino over RS-485)

I'm trying to send json over modbus rtu (I know, it is very bad use of modbus.) My schema is similar to: I have connected Arduino USB to PC as COM5 and RS485 converter connected to USB-RS485 to PC as COM4. If I read data from Arduino using QModBus…
martin
  • 1,707
  • 6
  • 34
  • 62
1
vote
2 answers

Can I read Modbus RS485 data received on a slave computer with Python?

I am working on a slave computer and want to save the data transmitted from the master via Modbus RS485, into a text file. The master computer constantly send writing and reading request to the slave computer I am working on, below is a picture…
Yang
  • 177
  • 4
  • 20
1
vote
2 answers

Modbus read is successful but a modbus write returns null ( using minimal modbus )

I am reading and writing registers from a device with the following parameters baudrate - 9600 stopbit-1 no_of_bits - 8 parity - odd i am currently using the minimal modbus library. my code to read register is pasted below # serial line …
Nags
  • 11
  • 3
1
vote
2 answers

Initializing a device using minimalmodbus over rs-232

I am looking for some advice on using the python (2.7) library "minimalmodbus" (version 0.7) to communicate with a Test Equity Modela 115a-F4T thermal chamber. I am pretty new to using python to program hardware, so I am not quite sure if my…
1
vote
1 answer

MinimalModbus read_registry error

I am trying to read registry information from a modbus device using MinimalModbus. However, every time I attempt to read registry 40003 which has a value of 220 I receive this error: raise ValueError('The slave is indicating an error. The response…
GreenSaber
  • 1,118
  • 2
  • 26
  • 53
1
vote
1 answer

What is this error given by RS485 Modbus-RTU Device

I am using minimalmodbus to communicate with a PID controller (Love 16C-3) via RS485 using a USB-RS485 adapter cable. However when trying to read the register, the following error is shown. What does this error mean? raise ValueError('The slave is…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
0
votes
0 answers

Problem with the continuous call of the "read_register" function of the minimalmodbus library in a thread loop

I'm developing a Windows interface through QT creator that interacts with a Modbus device. With several buttons, I'm able to communicate with the device without any problems (i.e. read and write registers). I added what I called "live log"…
0
votes
0 answers

How do I communicate with an rs485 device using python on a Raspberry Pi 4?

I am trying to read force and torque values from an FT300 Force Torque Sensor using my Raspberry Pi 4. I used the code below on my Mac taken from this GitHub project: https://github.com/castetsb/pyFT300 It works perfectly as long as I changed the…