Questions tagged [modbus]

Modbus is a serial communications protocol published by Modicon in 1979 for use with its programmable logic controllers (PLCs). Simple and robust, it has since become a de facto standard communication protocol, and it is now amongst the most commonly available means of connecting industrial electronic devices.

Modbus is a serial communications protocol published by Modicon in 1979 for use with its programmable logic controllers (PLCs). Simple and robust, it has since become a de facto standard communication protocol, and it is now amongst the most commonly available means of connecting industrial electronic devices.

Useful links

961 questions
6
votes
0 answers

Java MODBUS RTU master example code

I need to write Modbus RTU master app in Java that support 03 - Read Holding Registers and 16 - Write Multiple Registers. I found three java libraries: jamod, j2mod, modbus4j. I try all of these libraries (I spend about 4 hours) and it still doesn't…
martin
  • 1,463
  • 5
  • 25
  • 57
6
votes
1 answer

Sending a boolean value to a PLC from Android

I was able to make a connection with a PLC to read data from it. Now there's one problem and it is that I have to write a method to modify the data from the PLC. To achieve this, I have to send two values to the PLC: an int value and a boolean…
Marialvy Martínez
  • 286
  • 2
  • 6
  • 19
5
votes
1 answer

Changing serial port configurations programmatically in c#

I have 2 types of devices that have different protocols and are connected with a single serial port. By protocol, I mean that serial port configurations are different. I have a protocol id p_id by which I can check which device is being currently…
Moeez
  • 537
  • 5
  • 33
  • 95
5
votes
1 answer

Raspberry Pi RS485/Uart Modbus

I'm attempting to get an RS485 adapter connected at the UART to communicate via modbus on a Raspberry Pi. My end goal is to have all this working with a Node application, but so far my dev has been with Python. My hardware connection looks…
David Ryan
  • 99
  • 1
  • 7
5
votes
1 answer

What does the pymodbus "unit" parameter mean?

I have some modbus TCP code written under pymodbus 1.2 the relevent code was result = modbus_client.read_holding_registers(40093, 3) After updating to pymodbus 1.4.0 it wouldn't work until I cargo culted the new unit parameter into the function call…
Joshua Clayton
  • 1,557
  • 16
  • 25
5
votes
2 answers

Android Modbus RTU library

Do apologize for the question I know its been in discussion before but I could not find the answer. I am trying to create an app to communicate over Modbus RTU with our Micro-controller. Is there any library available for Modbus RTU for Android or I…
Crazy Engineer
  • 325
  • 5
  • 16
5
votes
3 answers

Modbus sniffer tool required

I am looking for a good professional modbus sniffer tool to scan the master slave communication. Please any one have idea ? Regards Dani
Adnan
  • 193
  • 3
  • 8
5
votes
3 answers

Modbus TCP communication from HTML/Javascript Webpage

I have a device that uses Modbus TCP. I want to read data from it and display it on a webpage (Without an in between server). I have found a project that does almost this exact same thing as a Chrome…
dgProgrammer
  • 61
  • 1
  • 1
  • 5
5
votes
2 answers

What modbus library should I use for modbus protocol for GCC

We are building a product, which requires modbus communication (both rs-485 and TCP/IP). The code has to run on an embedded device which has Linux running on it. We have following criteria for the selecting the library that we would be using. It…
Chaitannya
  • 926
  • 1
  • 7
  • 16
5
votes
2 answers

Is this endianness conversion correct?

I'm reading through a library (github.com/adduc/phpmodbus) and there's this function for converting integer to little-endian or big-endian string of bytes: private static function endianness($value, $endianness = 0) { if ($endianness == 0) …
MightyPork
  • 16,661
  • 9
  • 66
  • 120
5
votes
1 answer

Modbus Custom Message & Sub functions (NModbus, TCP, Subfunctions)

I am using NModbus in a C# project, to read & write Modbus data from/to a number of I/O devices. I am using the Modbus TCP/IP protocol (ModbusIpMaster etc..) in the program. I have successfully communicated with the devices (through a Modbus…
user1938908
  • 51
  • 1
  • 2
5
votes
1 answer

Looking for Python code to act as a MODBUS slave

Does anyone know of an easy to use Python program that acts as a MODBUS slave? I need to do some integration testing with a MODBUS master. Code can be for serial or TCP. TY, Fred
fred basset
  • 9,058
  • 26
  • 82
  • 131
4
votes
1 answer

CRC16 (ModBus) - computing algorithm

I am using the ModBus RTU, and I'm trying to figure out how to calculate the CRC16. I don't need a code example. I am simply curious about the mechanism. I have learned that a basic CRC is a polynomial division of the data word, which is padded with…
Pratched
  • 225
  • 2
  • 9
4
votes
1 answer

Telling typescript to to not add ["default'] to new class

TypeScript code import ModbusRTU from 'modbus-serial'; var modbus = new ModbusRTU(); modbus.connectTCP("192.168.1.5", { port: 502 }); modbus.setID(1); setInterval(function() { modbus.writeRegister(2048, 2); }, 100); transpiles to "use…
peter.babic
  • 2,784
  • 1
  • 15
  • 23
4
votes
1 answer

Error in connecting 2 modbus slave pymodbus

I am working on pymodbus. Trying to read the data from multiple units (multiple slaves) it gives me data but when the 1 of the slaves did not respond or is off the other slaves also shows the error after some time. please help. Thank you from…
Eng
  • 41
  • 3
1
2
3
64 65