Questions tagged [modbus-tcp]

A messaging structure developed by Modicon. It is used to establish master-slave/client-server communication between intelligent devices.

A messaging structure developed by Modicon in 1979. It is used to establish master-slave/client-server communication between intelligent devices. (from http://www.modbus.org/faq.php)

302 questions
2
votes
2 answers

Modbus TCP:Is there any better way for reading registers randomly one or more?

We are writing a Windows Service to read the data from PLC using Modbus TCP protocol at the polling interval of 1 sec through Socket programming in c#. Windows Service will receive random registers of the PLC to read the register values. Expected…
2
votes
1 answer

Python modbus communcation reading words on Mitsubishi PLC using ModbusTcpClient library

I am trying to communicate and read the words on a Mitsubishi PLC (Q06udeh) using the following code: from pymodbus.client.sync import ModbusTcpClient client = ModbusTcpClient('10.1.1.4',port=5007) client.connect() result =…
2
votes
1 answer

Python3 socket client to send and receive hex string

I am stuck in this socket client Python3 code: import socket import codecs def Main(): host = '127.0.0.2' port = 502 mySocket = socket.socket() mySocket.connect((host,port)) message =…
DDDD
  • 153
  • 1
  • 8
2
votes
0 answers

C# Modbus SlaveException reading registry

I'm working on a c# project Which have to comunicate with PLC by TCP Modbus. I'm using Nmodbus Library and it works fine. The problem is when I try to read/write Registry over 12000. I get this exception: Exception 'Modbus.SlaveException' …
2
votes
1 answer

Raspberry pi modbus on rj45

Hi there (I apologize for my english, that not my native lang) I have a sort of "blackbox" who send me data trought a RJ45 port, in a MODBUS format and I want to read the data with my Raspberry Pi 2. I searched a lot on google, but the only…
Miaourt
  • 21
  • 3
2
votes
1 answer

Send query to a Modbus device over Internet

I just started working on a Modbus project with no background. What I am trying to do is Query an active Modbus device by using its IP address, reading registers etc. I connected the device by using 'telnet' command with the relevant IP address and…
egebey
  • 23
  • 1
  • 3
2
votes
1 answer

PInvoke signature does not match the unmanaged target signature

I'm trying to create a wrapper C# file for modbusm.dll (win-tech.com/html/mbusocx.htm) ,I'm using dumpbin output for this. Dump of file modbusm.dll File Type: DLL Section contains the following exports for modbusm.dll 00000000…
jobinelv
  • 23
  • 1
  • 1
  • 8
1
vote
0 answers

Write data ower Modbus tcp to HUAWEI SUN2000 KTL error

I would like to change the PV inverter settings via Modbus TCP. the system reads correctly when I write I get an error!!! I use Raspberry PI and Python. Modbus address is 40125 and data is RW (readable and writable, U16 unsigned integer (16…
Maario
  • 13
  • 4
1
vote
0 answers

How does plc4j Modbus switch to big endian

My device only supports big-endian mode, plc4j uses little-endian by default, how does plc4j use big-endian mode I can't find a solution now
zq liu
  • 11
  • 1
1
vote
2 answers

Reading modbus registers

I have python script which reads registers from energy meter and saves values to database. Script was working fine until today when i tried to run it and i got error: AttributeError: 'ModbusIOException' object has no attribute 'registers' I can…
user13592259
1
vote
1 answer

plc_modbus read and write taking too much time

I'm using modbus_t to establish communication between PC and Siemens PLC (I'm not so familiar with modbus.h library). To read and write, I'm using modbus_write_registers() modbus_read_registers() to realise vehicle control. However these two…
CaTTTTTy
  • 11
  • 1
1
vote
0 answers

Linux libmodbus multi thread free(): double free detected in tcache 2 Aborted (core dumped)

Hi all im working in linux libmodbus tcpip server client process I am reading the data from 3 different server, when all the server are connected then there is no issues but when i disconnect one server form the network then the following error is…
Nagaraj JP
  • 11
  • 2
1
vote
0 answers

Elfin EW11 TCP Client does not send data

I want to use an Elfin EW11 device as a Modbus TCP Client/Master to send requests to a Modbus TCP Server/Slave (another Elfin EW11). It is connected via RS485 to my Test-Computer/PC. PC ---RS485--> Elfin EW11 TCP Client ---WLAN---> Elfin EW11 TCP…
Jerry
  • 11
  • 3
1
vote
0 answers

How to link the received variables from tcp-modbus to the respective widget that should deal with it on wxWidgets?

I am working on a GUI with wxWidgets to communicate with a PLC. I dedicate a thread especially for the communication via the ModBus protocol. The read variables are send back to the GUI as a custom event containing the adress of the variable and the…
Chenoille
  • 45
  • 6
1
vote
1 answer

Change Unit ID in modbus_read_registers of libmodbus

I have used the libmodbus to build a project to connect to my device by modbus-tcp. The project run. But Unit ID is wrong. My ID slave is 0xFE. However it is fixed as 0xFF whenever I send a modbus-tcp package. I had tried to change it by function…
Bell Blue
  • 11
  • 2