Questions tagged [pymodbus]

Pymodbus is a python implementation of modbus protocol providing both client and slave features.

PYMODBUS is a full modbus implementation of modbus protocal using python. It provides both client and server features and supports Modbus over RTU, ASCII, TCP, UDP protocols. The library also supports both synchronous and asynchronous variants of both client and server features.

Pymodbus is supported on both on python 2.7 and python 3.x

For more info refer

203 questions
0
votes
2 answers

pymodbus: Modbus RTU read register call blocked & never woke up or Auto-reconnect to Modbus RTU device

I am trying to create Modbus RTU client which will read data from serial port using pymodbus library. I am able to connect to Modbus RTU running on COM2 in Windows10 & able to read data of different types like Int32, Float, etc. Issue: After some…
OO7
  • 2,719
  • 1
  • 16
  • 30
0
votes
2 answers

Pymodbus: Modbus RTU using reactor - callback never called

I am trying to create Modbus serial/RTU client which will read data from serial port using Pymodbus library. Python: 3.6 Pymodbus: 2.1.0 Platform: Linux/Windows My sample code base is given below: def readDevices(modbusRTUDevice): deviceIP =…
OO7
  • 2,719
  • 1
  • 16
  • 30
0
votes
1 answer

Is is possible to control %QX0.0 LED light through OpenPLC ModBus?

just started my OpenPLC journey and created my first project using the tutorial and was wondering is It possible to turn on the LED through a packet sent to the default ModBus server port 502 instead of pressing the button physically? I have been…
0
votes
2 answers

How to write INPUT REGISTERS using pymodbus for external Modbus client which will read them

I have been tasked with implementing a pymodbus-based Modbus server. The server will run on a Linux machine like a Raspberry Pi or Up2 controller. It is expected to interface with a Modbus client which I have no control over. That external Modbus…
0
votes
0 answers

Retrieving pyModbus Data into a list

I'm using pymodbus to read the data from my equipment. Here's the code I use and it works! import pymodbus import serial from pymodbus.pdu import ModbusRequest from pymodbus.client.sync import ModbusSerialClient as ModbusClient #initialize a…
0
votes
2 answers

What's the reason for getting the result for the second try in ModbusTcp reading?

Sometimes I get an error response immediately when I read from a Modbus device at the first time, but when I try again this responded as the expected result. This is the error message at first…
Benyamin Jafari
  • 15,536
  • 14
  • 81
  • 116
0
votes
1 answer

Reading Response message in modbus using python

I am trying send the query and get the response message (data) through modbus using python with the help of pymodbus module. response=client.read_holding_registers(19200,126,unit=135) print(response) The response that is being printed is the…
0
votes
0 answers

Remove trailing bits from hex pyModBus

I want to built a function that sends a request from ModBus to serial in hex. I more o less have a working function but have two issues. Issue 1 [b'\x06', b'\x1c', b'\x00!', b'\r', b'\x1e', b'\x1d\xd3', b'\r', b'\n', b'\x1e', b'\x1d'] I cant remove…
victorR
  • 99
  • 10
0
votes
1 answer

pyModBus : check if coil is True or False

I am trying to learn how to introduce values to a PLC trough python ModBus module what I'm currently trying to do is just to read the value of coil 1 to check if its True or false so I am using order_ready = client.read_coils(0,…
victorR
  • 99
  • 10
0
votes
1 answer

Stop python script aborting when there is no internet connection

I have a python script running on a revPi which uses Azure IOT SDK. The script basically accepts a bunch of modbus registers from a .json file, adds a few properties and sends it to Azure IOT hub for analysis. The script is currently too dependent…
Inception
  • 365
  • 3
  • 21
0
votes
2 answers

Test request Modbus TCP

I have a question, I do a communication test by Modbus TCP and each request takes approximately 200ms, is it possible to improve these times? This is the code that I use for the tests: from pymodbus.client.sync import ModbusSerialClient as…
MM87
  • 41
  • 4
0
votes
1 answer

Should I ever use write_register() when write_registers() is more general (pyModbus)?

I'm starting to use pyModbus with Python 3.7. In pyModbus.client.sync.ModbusTcpClient there are two methods for writing: write_register() write_registers() Is there any benefit to using write_register() over write_registers() with a register list…
0
votes
0 answers

Python centralized information

I am currently doing a development in Pyhton (Kivy) for some machines that will be installed in various parts of the city, I wish that all the information of the machines is centralized and updated in real time. Example: User X registers on machine…
MM87
  • 41
  • 4
0
votes
1 answer

Modbus TCP Client does not connect

Background info: I am trying to read data from my energy meter. I have connected a gprs modem to the meter(via rs485) port. This modem sends data via tcp-ip protocol to a specified server and port. On the server(aws ec2 instance) I can see a…
0
votes
1 answer

How to get rid of LoopingCall in python code

I'm using Modbus server example code from pymodbus library to make a data forwarder (reading some serial data, formatting and then assigning data to modbus registers for Modbus master to read). My issue is serial delay (reading from 6 different…
coddr
  • 29
  • 5
1 2 3
13
14