This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Modbus RTU
#1
hi, I have a problem regarding the modbus, I have a LM with 3 rs-485 ports and on all 3 I have some timeout problems and rarely also crc errors, I manage everything via script, I have already tried to add delay between readings of the registers of the same devices and delay between readings of the devices themselves, I tried to make a log to see the error this is the most common situation , 

* string: [02][04][1A][1F][00][02][47][26]
Waiting for a confirmation...
<04><00><00><81>ERROR Operation timed out: select

so randomly I have this situation ( <04><00><00><81>ERROR Operation timed out: select ) in multiple random slave.
best regards, Omega Technology.
Reply
#2
Do you have GND connected between LM and Modbus devices?
Reply
#3
(25.03.2025, 14:32)admin Wrote: Do you have GND connected between LM and Modbus devices?

Is the LM power supply GND to the MODBUS devices power supply GND?
Reply
#4
LM has GND connection next to RS485 A/B. Some Modbus devices have 0V connection. If yours don't you can use DC power supply input negative pole / GND.
Reply
#5
(25.03.2025, 14:40)admin Wrote: LM has GND connection next to RS485 A/B. Some Modbus devices have 0V connection. If yours don't you can use DC power supply input negative pole / GND.
The Modbus slaves are energy meters powered by 230 volts, I have no GND reference, I only have the negative of the serial line.
Reply
#6
Provide documentation for your meters.
Reply
#7
(25.03.2025, 14:47)admin Wrote: Provide documentation for your meters.

Attached Files
.pdf   DMED111MID.pdf (Size: 396.42 KB / Downloads: 12)
Reply
#8
Your device doesn't have a GND connection. You can try adding a termination resistors on both line ends. Also check that LM power supply AC connection is correct (L/N are not swapped).

What line topology is used?
Reply
#9
(25.03.2025, 14:52)admin Wrote: Your device doesn't have a GND connection. You can try adding a termination resistors on both line ends. Also check that LM power supply AC connection is correct (L/N are not swapped).

What line topology is used?

We have already tried with the final resistor since I read that the LM already has an internal one, daisy chain topology, 30 slaves, 38400 baudrate
Reply
#10
You can try using lower baud rate if possible. And check LM power supply connection as suggested earlier.
Reply
#11
(25.03.2025, 14:58)admin Wrote: You can try using lower baud rate if possible. And check LM power supply connection as suggested earlier.

The LM power supply is in DC , we will check with the lower baud rate. Thank you
Reply
#12
Check that AC input of LM power supply is wired correctly. Swapped L/N can cause communication issues.
Reply
#13
(25.03.2025, 15:21)admin Wrote: Check that AC input of LM power supply is wired correctly. Swapped L/N can cause communication issues.

Hi, I tried with the lower baud rate but nothing to do, also rechecked the power supply wiring, L/N correctly wired throughout the system, while we try to do other tests I wanted to ask you something, I noticed that sometimes it is as if the serial goes into fault, the only thing that solves it is to restart the LM, isn't there some function that restarts the serial? thanks.
Reply
#14
Do you have a single script for the whole communication or multiple scripts? Only one script can access the serial port. This is why using mapper/profiles is the preferred method.
Reply
#15
(26.03.2025, 10:43)admin Wrote: Do you have a single script for the whole communication or multiple scripts? Only one script can access the serial port. This is why using mapper/profiles is the preferred method.
3 serial port 3 scripts , we tried the mapper/profile but since there isn't a way to add a delay beetween the poll from one device to the other we chose the scripts.
Reply
#16
https://kb.logicmachine.net/misc/modbus-...read_delay
------------------------------
Ctrl+F5
Reply
#17
(26.03.2025, 11:44)Daniel Wrote: https://kb.logicmachine.net/misc/modbus-...read_delay

Thank you , i solved this with the script so it's ok , i have another question , now I have a single script that manages the modbus but I need to write to the modbus bus via other scripts, is there a way to do this without colliding the bus?
Reply
#18
(26.03.2025, 10:43)admin Wrote: Do you have a single script for the whole communication or multiple scripts? Only one script can access the serial port. This is why using mapper/profiles is the preferred method.

I'll explain the situation better: I currently have the reading of modbus devices on a bus via scripts, and on event I need to be able to write on the bus, unfortunately if the two actions occur simultaneously I have problems, is there a way to read and write on the bus from different scripts without having collisions? best regards Omega Technology.
Reply
#19
Use profile for reading and proxy for writing but then you can just use profile.
This helps: https://forum.logicmachine.net/showthread.php?tid=5911
------------------------------
Ctrl+F5
Reply


Forum Jump: