Questions tagged [modbus-tk]

24 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
4
votes
1 answer

How to set up simple slave and master with modbus-tk RTU (Python)

I wanted to set up a communication between a Raspberry PI (slave) and my PC (Master) through Modbus protocol. Currently, I'm using modbus-tk (python) to set up the communication protocol. The issue is that the Master was not able to read the…
joejoe
  • 43
  • 1
  • 5
3
votes
4 answers

modbus-tk for Modbus RTU, read/write multiple registers (fn code 23), returns exception code 1

I am using modbus-tk to serially communicate with a device via Modbus RTU over a RS-485 network. I am trying to figure out how to use function 23, READ_WRITE_MULTIPLE_REGISTERS. This is my first time using function 23. Here is my current…
Intrastellar Explorer
  • 3,005
  • 9
  • 52
  • 119
3
votes
1 answer

Modbus-tk RTU Slave holding register read signed integer

I created a modbus slave using modbus-tk as below. I use Simply modbus master software(http://www.simplymodbus.ca/RTUmaster.htm) as the master. How to set the slave to represent a signed integer instead of an unsigned. For example, when I send a 16…
Yang
  • 177
  • 4
  • 20
2
votes
1 answer

Need help using modbus_tk library

I'm using modbus_tk library to use as a Modbus RTU slave. I have an off the shelf Modbus RTU master simulator running on another PC through a usb to 485 converter. I cannot see my holding register in the Master. I have verified that the serial link…
mspath
  • 35
  • 4
2
votes
1 answer

Python modbus-tk modbus server is merging two requests and hence getting CRC error

I am using modbus-tk library for modbus serial server. All the communication is up and working. There is one instance where master is writing one register and next request is read but modbus-tk is merging the two request and hence getting CRC…
Sumit
  • 1,953
  • 6
  • 32
  • 58
2
votes
1 answer

PLC modbus [WinError 10054]: existing connection was forcibly closed by the remote host

I tried the same code earlier, it was perfect running. Later I programmed my "Siemens LOGO 12/24 rce" using "LOGO!Soft Comfort 8.2" and even then it perfectly worked. But when I'm re-programming using Python then it shows: Exception has occurred:…
Magic Oak
  • 31
  • 3
2
votes
2 answers

Can't connect to slave with Python's modbus_tk

I'm currently trying to develop an application that uses the Modbus-RTU protocol, and I have to use modbus_tk in Python 2.7. I'm supposed to use bits of code from another application which is able to communicate with the micro-controller via modbus.…
AdrienW
  • 3,092
  • 6
  • 29
  • 59
2
votes
0 answers

Modbus-tk CPU load reduce

Thank you very much for the answer answer. Where can I find this file? ...after modifying the `modbus_rtu.py' in the following way... I'm using Raspbian, tried to find and replace the code in these files: pi@rpiplc00 / $ sudo find / -name…
Azat
  • 196
  • 1
  • 8
1
vote
1 answer

Mimic Chint DDSU666 Meter with python

i am looking for some help. i already figured out how to read the Chint DDSU666 energy meter, these meters are used with modbus RTU to communicate with solar battery inverters. so i would like to mimic this type of meter to adjust charging and…
1
vote
1 answer

Python modbus library that supports extended address spacing?

I have a Modbus RTU device that has information stored within non-standard data addresses. For example, it stores read values (32-bit IEEE-754 float, converter link) in register number 1003 - 1004. I think this means I can no longer use standard…
Intrastellar Explorer
  • 3,005
  • 9
  • 52
  • 119
1
vote
0 answers

Write Multiple Registers failing with Modbus RTU in python on Linux router

I'm currently trying to establish modbus communication between a commercial router (UR71 from Ursalink) and a Modbus RTU (ZBRN2 from Schneider Electric). UR71 router is running on Linux OpenWRT LEDE-17.01 Python is v2.7.13 Python is using modbus-tk…
VPGG
  • 11
  • 1
1
vote
3 answers

MODBUS-tk Read floating point values from slave in the master

I have created modbus slave to write data to the registers. I am able to write both float values and integer values from the slave side. In the modbus master I am able to access only the integer values but not able to read float values. I went…
Abhinandan s
  • 11
  • 1
  • 4
1
vote
2 answers

Is it possible to run the following web queries in parallell?

I am using Python with the modbus_tk package to poll n PLCs. Each poll takes ~5 seconds. Is it possible to run these in parallel so that it doesn't take n*5 seconds to get all the data back? My current code: for ip in ip_addresses: master =…
Brian Leach
  • 3,974
  • 8
  • 36
  • 75
0
votes
0 answers

Modbus-TK: Errors when Master reads my server

I add a slave to transfer Data to a Master (separate Device). The problems start, when I connect the device. I get the errors: invalid request: Invalid CRC in request invalid request: Request length is invalid 2 invalid request: Request length is…
1
2