A simple Modbus/TCP client library for Python. pyModbusTCP is pure Python code without any extension or external module dependency.
Questions tagged [pymodbustcp]
44 questions
0
votes
0 answers
pyModbusTCP fails every second function
Basically I'm supposed to test modbus functionality right now and for whatever reason modbus fails to read the registers every second call, ex:
Functions:
# Modbus functions
def read_system_uptime(c, ssh):
try:
# Get uptime with ubus
…

Wowy
- 137
- 2
- 11
0
votes
1 answer
pyModbusTCP Raspberry Pi to PC connection eth0
The story so far. I Set up a Server and Client using the very helpful Johannes YouTube tutorial, initially I did this on the Raspberry Pi without any issues using…

Reowald
- 41
- 7
0
votes
2 answers
pyModbusTCP acc64 SUnSpec
I am trying to read values from an inverter (for solarpanels). The inverter uses Modbus (TCP/IP) with SunSpec protocol.
I am using pyModbusTCP and I can connect to the inverter and get values of type int16 and uint16 but not string or acc64.
I am…

DanielG
- 1
- 1
0
votes
0 answers
How to get the ip of the client that is connected to the modbus server?
I am using ModbusTcpServer(context, identity=identity, address=(listener_address, listener_port)), here ModbusTcpServer is a function that is imported from pymodbus, I want to get the IP of client that get connected to the server for the logging…

UPENDRA BARTWAL
- 11
- 2
0
votes
0 answers
Raspberry Pi Modbus Client FIFO
I've scoured the internet and can't find anything that will fit my needs.
I am trying to figure out if it's possible to set up the PI as a client with a FIFO and have the server read from that FIFO. I have an array of PIs and so I need to have some…

BBridges
- 130
- 14
0
votes
1 answer
ModbusTCP traffic showing up in WireShark as TCP packets
I am using pyModbusTCP to send ModbusTCP packets on my local host. My code seems to work correctly, but in Wireshark my packets are showing as TCP instead of ModbusTCP. When I go to "Analyze > Enable Protocols" ModbusTCP is enabled. Another weird…

Vic
- 33
- 1
- 9
0
votes
1 answer
How to get pymodbus to correctly communicate with PLC?
Before I ask, I just want to mention that I have spent a few days researching this and can't seem to find my way out of this basic issue. I have read the docs and spent time here. Otherwise I wouldn't have asked.
I have inherited a massive…

driv3r
- 1
- 1
0
votes
0 answers
How do I read and write to a PLC through python code on my laptop via ethernet?
I am doing a project of communicating with a PLC through python code on my Laptop using pyModbusTCP. I am getting stuck on how to go about the process as there isn't much info on the net. I have made a simulation of it using pyModbusServer and…

Sajay Varghese
- 1
- 3
0
votes
1 answer
Python comunication modbus tcp with plc saia sbc
I am trying to read the registers and flags of the saia sbc PCD2 M4_x plc via Modbus TCP communication. I know the IP address and the communication port of the plc, however every time I read a flag or a register I always get different values…

Tommaso Faedo
- 5
- 2
0
votes
1 answer
How to shape a CALL in PYMODBUS (Modicon?)
i am in a serius battle with a solar inverter right know (INGETEAM 3play) i am connected by TCP / IP.
I need to understand how to shape my call becouse i am not having the answer i want, and also i dont' know how many bits i am waiting for an…

Cristobal Rencoret
- 37
- 7
0
votes
0 answers
Get data from SMA Cluster Controller using Pymodbus
I am trying to get data from a SMA Cluster Controller using pymodbus, but I don't get any response. In example, the documentation says that request in address 30005 with 2 registers and to the unit 1 I'll get the Serial Number for the Cluster…
0
votes
1 answer
How to take float value with pymodbus TCP library?
I am reading some values from a machine with pymodbusTCP library, but i have wrong values when i read floats.
The function to get the values is:
def ler_dado(endereco,tipo):
if tipo == "float":
valor =…

JonP
- 1
- 1
- 2
-1
votes
1 answer
PyModbus - trigger an action/function when holding register is read
I've setup a running Pymodbus server based on the 'Updating Server' (v2.5.3) example.
https://pymodbus.readthedocs.io/en/v2.5.3/source/example/updating_server.html
Everything works ok.
Now i want to trigger a function (which will simply increment a…
-1
votes
2 answers
Negative value prints as big number in python
im pulling data from a modbusTCP server, but when i should receive a negative value it shows as a big number.
self.export = self.c.read_holding_registers(37113, 2)[1]
I know it has something to do with it being signed or unsigned but im really…

Mads Gadeberg
- 1,429
- 3
- 20
- 30