SOEM icon indicating copy to clipboard operation
SOEM copied to clipboard

Bug with first slave with many PDOs and DC enabled.

Open lucap85 opened this issue 7 years ago • 4 comments

If the first slave has DC enabled and enouh PDOs to need more than [EC_MAXLRWDATA - EC_FIRSTDCDATAGRAM] bytes in the process image, the first segment's size will be zero instead of EC_FIRSTDCDATAGRAM and this cause the wrongly reading for the wkc at receiving time.

lucap85 avatar Jan 11 '19 16:01 lucap85

I'd like to get some additional information to verify the fix Could you add a slaveinfo dump with that 1 slave Can capture a wireshark from simple_test with that 1 slave

nakarlsson avatar Jan 16 '19 08:01 nakarlsson

Hi,

here they are:

slaveinfo_and_simpletest_results.zip

lucap85 avatar Feb 06 '19 10:02 lucap85

Unfortunately the wireshark dump does not show how the fix should work. Slave 1 has an input size smaller than [EC_MAXLRWDATA - EC_FIRSTDCDATAGRAM] (1486 - 20). So everything works normal.

Also I think the fix is incorrect. When having a first slave with a very large PDO size then the correct solution would be to remove the LRW datagram when the segment size = 0 (or replace it with a NOP datagram).

ArthurKetels avatar Feb 15 '19 14:02 ArthurKetels

This fix needs some re-work , please update and repost a proper fix as Arthur suggested

nakarlsson avatar Apr 08 '19 14:04 nakarlsson