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.

Wiser for KNX and modbus problem
#1
Hello,

we are experiencing a little problem with some modbus devices (3 energy meters, a heat pump and a HRV system), we are currently reading and writing on those devices but we have a large amount of errors (operation timed out), approximately 1 per device every minute.

We tried to ground the shield of the modbus cable and we install two terminating resistors, but nothing seems to work fine. The only way to manage those errors is to set a polling rate at least of 60 seconds, they do not disappear but the system seems to handle them.

We suppose that there are some interferences due to the heat pump because we noticed that when it's running the number of errors tend to increase.

Any suggestion?

Thank you for your help.
Reply
#2
I have seen same issue once and we changed primary (230V side) polarity on the 24V power supply for the W4K and that was the root cause of the errors...
Reply
#3
Thank you Erwin, we'll try this ASAP.

Another question:

we have another system (a BT-Modbus interface by Emec for pool monitoring and control) that can read and wite coils but if we try to read or write holding registers 90% of the time give a "invalid data" result.

The line includes two PM-3250 by Schneider Electric and a Datamanager 2.0 interface by Fronius, this device is the third slave on the chain (W4K as master -> PM-3250 n°1 -> PM-3250 n°2 -> BT-Modbus -> Datamanager 2.0).

Any help will be appreciated, thanks

Update:

Often both PM-3250 return an error "response not from requested slave"
Reply
#4
Update:

We tried by changing polarity (230V side), unfortunately nothing has changed.
Reply
#5
In most cases the issue is with wrong topology or poor grounding. As you mentioned heat pump seems to be the problem I would check there. You could try to get an USB to RS485 and try using it as the modbus interface. If possible heat pump could be isolated this way.
------------------------------
Ctrl+F5
Reply
#6
Also try disconnecting some of the devices and check if it starts working correctly this way. Do you have 120 ohm termination resistors installed? Is GND connected between all modbus devices?
Reply
#7
Right now we have only A and B terminal connected, the cable shield is grounded but some of the modbus devices don't have the GND connector so we choose not to connect the common wire and we installed the termination resistors (120 ohm 1/4W) on both sides. We already tried to disconnect every devices and nothing change.

We don't know what device could cause the problem, maybe even all of them.

Another question: the 0V connector on the W4K is the same things of a common connector? For example, can be used as a 0V reference for the devices that need it? It has to be grounded?
Reply
#8
Read this: https://store.chipkin.com/articles/rs485...wire-rs485
Reply
#9
(01.02.2021, 17:35)admin Wrote: Read this: https://store.chipkin.com/articles/rs485...wire-rs485

Thank you, we knew most of this but it is surely helpful!

Indeed we tried to connect all of the GND connector to the 0V of the W4K, the question is: after we linked all the common conductors do we have to ground the wire or is already grounded from the W4K?

And beside that, we have two devices without a common connector, so we can't connect literally everything.

Thank you for your help.
Reply
#10
You don't have to ground the cable. If your other devices have a DC power supply you can connect Modbus GND to power supply GND.
Reply
#11
All right, we check everything and now the situation is better, there are only two issues:

- Often PM-3250 return an error "response not from requested slave" or "invalid CRC"
- BT-modbus device suddenly stopped communicating after checking the settings, the guy who wired the system told us that he had to make a small branch on the bus for this device, maybe this could cause the issues?
Reply
#12
Yes this most likely is the problem. Try finding where then branch is connected and disconnect it and see the difference.
------------------------------
Ctrl+F5
Reply
#13
Alright, here is the situation:

On the line with W4K as master -> PM-3250 n°1 -> PM-3250 n°2 -> BT-Modbus -> Datamanager 2.0 we undo the branch, the situation is almost stable right now but PM-3250 keep doing CRC errors and response not from requested slave, that's strange.

Every device is on 9600 baud 8N1 and we checked for double addresses.

I even thought that maybe one of them could have 2 stop bits and not one but it's not a setting parameter, you can set it only as 8N1 and not as 8N2 plus I tried to set W4K to 8N2, 
and, that's really strange, they seems to stop making errors...

Any ideas?

Thank you very much for the help
Reply
#14
Are you sure that you don't have even or odd parity enabled on Modbus devices? Most devices have parity and stop bits configured separately but 2 stop bits can only be enabled if parity bit is disabled.

You can log what is being received by using a script. Disable RTU in Modbus mapper before running it. Change serial port settings as needed. https://forum.logicmachine.net/showthrea...2#pid16012
Reply
#15
I'll check ASAP but I'm sure that we are set in 9600 baud 8N (I read it via modbus), stop bits cannot be set in PM-3250 (or so it seems according to manual) but 1 stop bit is set as standard.

The question is: why I can read address either with 8N1 or 8N2 settings in the W4K?

I expect every device in 8N1 to stop working, but the only one that stops is the Fronius inverter.
Reply
#16
Code:
require('luamodbus')
mb = luamodbus.rtu()

mb:open('/dev/RS485-1', 9600, 'N', 8, 1, 'H')
mb:connect()

buffer = {}

mb:setdebug(function(msg)
  buffer[ #buffer + 1 ] = msg
end)

mb:setslave(8)

res = { mb:readregisters(3109, 2) }
log(res)

mb:close()

log(table.concat(buffer))

I disabled RTU in mapper and then tried it, it suppose to log something about frequency (tried with reading test) unfortunately it keeps logging that

* string: [08][03][0C][25][00][02][D6][09]
ERROR Bad file descriptor


i tried reading for value, specify swap, specify datatype, try different registers, change to 8N2...

What I'm doing wrong?
Reply
#17
Change /dev/RS485-1 to /dev/RS485
Reply
#18
Thanks!

I read address 6503

Code:
* string: [08][03][19][66][00][01][63][D0]
Waiting for a confirmation...
<08><03><02><00><02><E5><84>
Code:
* table:
[1]
  * number: 2

And 6502
Code:
* string: [08][03][19][65][00][01][93][D0]
Waiting for a confirmation...
<08><03><02><00><00><64><45>
Code:
* table:
[1]
  * number: 0

So it's confirmed no parity and 9600 baud.

The strange thing is that it gives me the same result either with 8N1 or 8N2...

Attached Files Thumbnail(s)
   
Reply
#19
Try reading values in a loop and see if anything appears in Logs:
Code:
require('luamodbus')
mb = luamodbus.rtu()

mb:open('/dev/RS485', 9600, 'N', 8, 1, 'H')
mb:connect()

buffer = {}

mb:setdebug(function(msg)
  buffer[ #buffer + 1 ] = msg
end)

mb:setslave(8)

for i = 1, 1000 do
  buffer = {}
  res = mb:readregisters(6500, 2)
  if not res then
    log(table.concat(buffer))
  end
end

mb:close()
Reply
#20
Code:
Test_modbus 18.02.2021 10:16:57
* string: [08][03][19][64][00][02][82][11]
Waiting for a confirmation...
<00>ERROR Operation timed out: select

Test_modbus 18.02.2021 10:17:13
* string: [08][03][19][64][00][02][82][11]
Waiting for a confirmation...
<82><05>ERROR Operation timed out: select

Test_modbus 18.02.2021 10:18:43
* string: [08][03][19][64][00][02][82][11]
Waiting for a confirmation...
<A8><C0>ERROR Operation timed out: select

Test_modbus 18.02.2021 10:19:10
* string: [08][03][19][64][00][02][82][11]
Waiting for a confirmation...
<82><05><08><03><04><00><08><00>
Request for slave 130 ignored (not 8)
The responding slave 130 isn't the requested slave 8

Test_modbus 18.02.2021 10:19:10
* string: [08][03][19][64][00][02][82][11]
Waiting for a confirmation...
<00><E2><F1><08><03>
ERROR CRC received 0x803 != CRC calculated 0xF8E4

Test_modbus 18.02.2021 10:19:11
* string: [08][03][19][64][00][02][82][11]
Waiting for a confirmation...
<04><00><08><00><00><E2>ERROR Operation timed out: select

it gives me something like this
Reply


Forum Jump: