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

1182 questions
3
votes
0 answers

Socket was interrupt - Modbus - J2Mod

I'm working on a modbus UDP implementation [ J2Mod(2.3.4) ] in Java. I have found almost no useful documentation. I wrote a slave as shown below. It basically, create a UDP Slave and add processImage for unitId=0 and unitId=1. Then it write out…
E141
  • 43
  • 6
3
votes
0 answers

JAVA MODBUS error

I am trying to run below code. I have a MODBUS transmitter connected at COM1 with Baud rate of 9600, transmitting data via USB cable. I want to collect that data. public static void main(String[] args) { SerialConnection con = null; …
Amar Shah
  • 89
  • 2
  • 9
3
votes
1 answer

Modbus Registers beyond 255 cannot be accessed SimpleModbus

I'm french student and I have been playing with SimpleModbus for 1 week, and it worked fine... Until I tried to implement a slave with a large amount of registers (1000 needed). Registers beyond 255 using slave 1 cannot be accessed. Whatever I do I…
Gabriel
  • 319
  • 3
  • 15
3
votes
5 answers

Something like StrTok() or Sscanf()?

So, I am reading from ModBos over serial port and get readings something like the following : '+0020.8+0022.8-00.046-00.002-00.005-001.99+00.000+00.003'; Basically, there will always be 8 floating point readings, preceded by a plus or minus sign,…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
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
3
votes
2 answers

Get Device info through pymodbus

I need to get device information (device name, etc) through pymodbus. Does anyone know how to accomplish that? Thanks
3
votes
1 answer

J2Mod basic Master and Slave Questions

I am trying to make a Modbus Slave and Master using j2mod (it's version 1.0.6 tho, so that is compatible with another program). And I do have some general questions about the code I found online. I have found almost no useful documentation what so…
3
votes
1 answer

libmodbus Unit ID altering

I am using the libmodbus libraries to communicate with a solar inverter with a Modbus interface (SMA). The Modbus specification document specifies that a certain Unit ID should be used to read registers on the device. The device offers a TCP…
Cornel Verster
  • 1,664
  • 3
  • 27
  • 55
3
votes
1 answer

Multiple Servers pymodbus connection issues Modbus TCP

I have an issue when I try to read holding registers using pymodbus and a raspberry pi. I can't seem to get two servers/slaves connected at the same time (either one or another will work, but together, I cannot read registers from both devices).…
Emerson
  • 270
  • 2
  • 4
  • 11
3
votes
4 answers

Convert collection of 32 bool values to 32-bit integer

So I'm new to C# and I've searched but I just don't know what I'm searching for. I have a boolean variable called inputs that has saved 32 true/false bits from a ModBus interface library. Here's an image explaining my 32 true/false values. Basically…
Bidaum92
  • 31
  • 6
3
votes
5 answers

can python software take place of logic ladder program in PLC through modbus?

Trying to figure out the best way of controlling industrial PLC's with Raspberry Pi/linux server - specifically using python and pymodbus (modbusTCP) over ethernet... Once the PLC internal registry is mapped properly to modbus, can software written…
user3300423
  • 33
  • 1
  • 1
  • 5
3
votes
0 answers

Exception while trying to read out holding registers from device via Modbus/TCP

im trying to read values from holding registers of a device (PowerMonitor made by Weidmüller) using Modbus/TCP. I use java and a modbus library called "jamod". My code: public class Master1 { public static void main(String[] args) { …
lksk
  • 31
  • 3
3
votes
1 answer

Should a Modbus Master need an Address?

I'm playing around with Modbus for an embedded system (I've never had to deal with this before) and I know that Modbus Slaves recieve an address ranging from 1-247 but does a Modbus Master also recieve an ID? If so, is it relevant to know the Modbus…
R. Johnson
  • 102
  • 12
3
votes
4 answers

How to write to PLC input registers using pymodbus

I want to write to PLC input registers using pymodbus. I am able to read them : from pymodbus.client.sync import ModbusTcpClient client = ModbusTcpClient('10.10.10.32') client.connect() reg =…
user3053231
3
votes
0 answers

Redis and memory

I am developing software in an embedded system (512 MB RAM). I'm using redis to take the place of a shared memory between processes inside a django application. We are talking about 150 values, stored every second, coming from a MODBUS device. They…