-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BK1120 BusCoupler with K-Bus terminals #69
Comments
I am not sure if that is the problem. According to the spec, if SDO Upload happens with "Complete Access" mode, and sub index 0 is requested, it will be padded to 16 bits. Can you see from within Wireshark if the the "Complete Access"-bit is set? From your log I cannot check it. EtherCAT.NET/native/SOEM_wrapper/soem_wrapper.c Lines 1013 to 1027 in 51f59a8
Does it work with pure SOEM code? What helped me often is to compare the TwinCAT Wireshark log to the SOEM/EtherCAT.NET Wireshark log. It is helpful then to reduce the number of connected slaves to a minimum because TwinCAT executes multiple commands per frame which makes searching the Wireshark log more difficult. |
Ok, said bit is set. What is the consequence for the format of the 'dataset' variable. Does it depend on the byte order HighByte/LowByte (Endian)? EtherCAT Mailbox Protocol:CoE SDO Req : 'Initiate Download' (1) Idx=0x427f Sub=0 |
The dataset variable should not be changed. The padding is an implementation detail. But the set "complete access" bit is a hint that the data is transmitted correctly. What I would do now is to compare TwinCAT and SOEM/EtherCAT.NET Wireshark logs. |
I had no TwinCAT setup on my machine on hand. But I tested the unit with the "Simple_Test"-code which worked fine. When than compared with the WireShark-log below I found that there are some added bytes in the CoE-section. The field 'length' does not appear in the 'Simple_Test' log. The consequence is, that after the subIndex byte (00) a sequence of 4 bytes follows were only 2 bytes are expected. Since I have no idea how to control this value it remains random and therefor a undefined address is used. The data in the said field is the order of the connected terminals. EtherCAT Mailbox Protocol:CoE SDO Req : 'Initiate Download' (1) Idx=0x427f Sub=0 0000 ff ff ff ff ff ff 03 01 01 01 01 01 88 a4 94 10 ................ |
may be I misunderstood the protocol. It seems do be right. However, I don't see that the load data are more than 4 Byte which according to the specs should result in an additional field of the protocol. Actually they are only 2 Bytes long: 0x0005. |
Hello,
I' am experimenting with the SOEM code since a while. I still have no success in get the thing running. It always throws an exception saying: 'SdoWrite failed <0x0000>: The working counter is 0 '
The exception is thrown when trying ' master.Configure(rootSlave); '
It seems, that the type of dataset does not match. The WireShark log shows a value of 500 but should be 5.
Is there any workaround for this problem?
`
`
WireShark response.
`No. Time Source Destination Protocol Length Info
157042 0.000258 03:01:01:01:01:01 Broadcast ECAT 164 'FPWR': Len: 136, Adp 0x1001, Ado 0x1c00, Wc 1 Mbx(CoE SDO Req : 'Initiate Download' (1) Idx=0x427f Sub=0)
Frame 157042: 164 bytes on wire (1312 bits), 164 bytes captured (1312 bits)
Ethernet II, Src: 03:01:01:01:01:01 (03:01:01:01:01:01), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
EtherCAT frame header
EtherCAT datagram(s): 'FPWR': Len: 136, Adp 0x1001, Ado 0x1c00, Wc 1
EtherCAT datagram: Cmd: 'FPWR' (5), Len: 136, Adp 0x1001, Ado 0x1c00, Cnt 1
Header
EtherCAT Mailbox Protocol:CoE SDO Req : 'Initiate Download' (1) Idx=0x427f Sub=0
Header
CoE
Number: 0
Type: SDO Req (2)
SDO Req : 'Initiate Download' (1) Idx=0x427f Sub=0
Index: 0x427f
SubIndex: 0x00
Length: 0x00000002
Data: 0500
Data: 000000000000000000000000000000000000000000000000000000000000000000000000…
Data: 000000000000000000000000000000000000000000000000000000000000000000000000…
Working Cnt: 1
Working Cnt: 1
WireShark.txt
`
The text was updated successfully, but these errors were encountered: