OpenEtherCATsociety / SOEM

Simple Open Source EtherCAT Master
Other
1.24k stars 653 forks source link

use ec_sync0 error 0x002d #749

Closed Edphoenixmax closed 8 months ago

Edphoenixmax commented 8 months ago

I met a error 0x002d--no SYNC0 or SYNC1 received when I use ecx_dcsync0 function, and it caused the slave cannot change state from safeop to op. I use wireshark to catch frames pcap and I find the value in the register 0x09a0 is correct at first time,and then it send FPWR to write 0xffffff to this register, and I have no idea what happens. I am sorry I cannot upload the pcap to u, Do you know what is the problem is or can you teach me some ways to figure it out or get some specific information? Thank you a lot!

ArthurKetels commented 8 months ago

Sorry, not enough information to give a sensible answer. Did you first enable DC with ecx_configdc()? For the rest you could search in the issues posts, more than enough examples on how to do this.

Edphoenixmax commented 8 months ago

thanks Another question, when I use codesys to config this sync0time, then I use slaveinfo -sdo and I find in 0x1c32 0x02 is cycletime that you set. But if I just use configdc and ecx_sync0 , the cycletime will not be set, and I donnot know why, So ,can the ecx_sync0 function set repetitive sync signal to slaves?

Edphoenixmax commented 8 months ago

the sync cycletime is 0x1c32 and 0x1c33 0x0a , I shoule correct this Thanks a lot !