Problem with SoE servos AMK and DC

More
17 Oct 2021 01:55 - 17 Oct 2021 02:02 #223358 by rollfree
I have AMK servos with an integrated EtherCAT controller. They work with SoE protocol.
Older AMK iDT5 servos need Distributed Clocks for their operation. They don't work at all without DC. Newer AMK ihX servos run with or without DC.

The problem is that when the DC si turned on, servos occasionally crash (roughly every 20-30 seconds) and stop. They start again within 2 seconds. If DC is off (which is only possible on the ihX servo), this does not happen.

I also tried to set the PLL mode, where the master should synchronize with the DC (refClockSyncCycles = "-1"), but it's even worse. Then it falls every about 5 seconds.

I assume that the problem is that the servo does not get a PDO in time due to jitter and so it drops out.
So I set the servo-thread cycle in LinuxCNC to 0.98ms instead of 1ms. The setting of the NC-cycle and Sercos-cycle in the servo remained 1ms.
And at that moment the servo does not fall and runs without problems.
But I don't know what it will do with reading the feedback from the encoder, which probably takes place according to the settings of the Sercos-cycle still with a period of 1ms.

I tried it on different servos (iDT5, ihX) and on different platforms (PC, RPi4). The same problem is everywhere.
LCNC 2.8.2 and 2.9pre, EtherCAT master is patched version github.com/ribalda/ethercat.

Does anyone have a tip, please, what might be the problem?
Thanks in advance.
 
Last edit: 17 Oct 2021 02:02 by rollfree.

Please Log in or Create an account to join the conversation.

More
17 Oct 2021 10:32 #223364 by db1981
Hi,

on which typ of NIC you are running your system? Have you tryied an propitary nic driver or generic?

what are telling the ethercat debug messages in dmesg?

tried this? : github.com/sittner/ec-debianize/tree/mas...aster/debian/patches

Please Log in or Create an account to join the conversation.

More
17 Oct 2021 14:56 #223385 by rollfree
Thank you for answer.
On the PC I tried the generic and native driver (ec_8139too). Only generic on RPi, the native driver does not exist there yet. Sometime in the future I plan to write it.

In the log, it's like "Unspecified error":
[ 254.684372] EtherCAT 0: Slave states on main device: OP.
[ 258.757891] EtherCAT 0: Domain 0: Working counter changed to 1/3.
[ 258.768431] EtherCAT 0: Slave states on main device: SAFEOP + ERROR.
[ 258.784437] EtherCAT ERROR 0-main-0: AL status message 0x0001: "Unspecified error".
[ 258.800419] EtherCAT 0: Slave states on main device: SAFEOP.
[ 258.800425] EtherCAT 0-main-0: Acknowledged state SAFEOP.
[ 258.832417] EtherCAT 0: Slave states on main device: INIT.
[ 258.884409] EtherCAT 0: Slave states on main device: PREOP.
[ 259.760904] EtherCAT 0: Domain 0: Working counter changed to 0/3.
[ 263.948489] EtherCAT WARNING 0-main-0: Slave did not sync after 5004 ms.
[ 264.247960] EtherCAT 0: Domain 0: Working counter changed to 3/3.
[ 264.268509] EtherCAT 0: Slave states on main device: SAFEOP.
[ 265.156489] EtherCAT 0: Slave states on main device: OP.


Interestingly, when the servo is the only one on the bus (and thus it works as a clock-master for DC), the situation is worse than when there is another device in front of it, which then acts as a clock-master. Then it falls too, but not so often. Let's say every 40-50 seconds. It's absolutely crazy.

The configuration is absolutely minimal, the tests are run as a simple HAL-script.

Uses DC, crashes:
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000">
<slave idx="0" type="generic" vid="000001eb" pid="0000000a" name="ihx" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="-25000"/>
<syncManager idx="2" dir="out">
<pdo idx="0018">
<pdoEntry idx="0086" subIdx="0" bitLen="16" halPin="control_word" halType="u32"/>
<pdoEntry idx="002f" subIdx="0" bitLen="32" halPin="position_command" halType="s32"/>
<pdoEntry idx="0024" subIdx="0" bitLen="32" halPin="velocity_command" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="0010">
<pdoEntry idx="0087" subIdx="0" bitLen="16" halPin="status_word" halType="u32"/>
<pdoEntry idx="0033" subIdx="0" bitLen="32" halPin="position_feedback" halType="s32"/>
<pdoEntry idx="0028" subIdx="0" bitLen="32" halPin="velocity_feedback" halType="s32"/>
</pdo>
</syncManager>
</slave>
</master>
</masters>

Different value of sync0Shift has no effect.

Not using DC, running OK.
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000">
<slave idx="0" type="generic" vid="000001eb" pid="0000000a" name="ihx" configPdos="true">
<syncManager idx="2" dir="out">
<pdo idx="0018">
<pdoEntry idx="0086" subIdx="0" bitLen="16" halPin="control_word" halType="u32"/>
<pdoEntry idx="002f" subIdx="0" bitLen="32" halPin="position_command" halType="s32"/>
<pdoEntry idx="0024" subIdx="0" bitLen="32" halPin="velocity_command" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="0010">
<pdoEntry idx="0087" subIdx="0" bitLen="16" halPin="status_word" halType="u32"/>
<pdoEntry idx="0033" subIdx="0" bitLen="32" halPin="position_feedback" halType="s32"/>
<pdoEntry idx="0028" subIdx="0" bitLen="32" halPin="velocity_feedback" halType="s32"/>
</pdo>
</syncManager>
</slave>
</master>
</masters>


Servo-thread standard 1ms, crashes with DC, without DC it runs well:
loadrt threads name1=master period1=1000000
loadusr -W lcec_conf /ec/ihx.xml
loadrt lcec
addf lcec.read-all master
addf lcec.write-all master
start
setp lcec.0.ihx.control_word 0xe000
setp lcec.0.ihx.velocity_command 5000000


Servo-thread 0.98ms, runs well with DC and without DC:
loadrt threads name1=master period1=980000
loadusr -W lcec_conf /ec/ihx.xml
loadrt lcec
addf lcec.read-all master
addf lcec.write-all master
start
setp lcec.0.ihx.control_word 0xe000
setp lcec.0.ihx.velocity_command 5000000


I haven't tried those referenced patches from Sittner. I'll try. Thank you.

I'll try to study and run another master (SOEM) if it works OK there.

Thanks once again.

Please Log in or Create an account to join the conversation.

More
17 Oct 2021 15:45 #223392 by rollfree
I do not use the ec-debianize package at all. I don't know what I need it for. I only use the EC master (package ethercat-master) and then the LinuxCNC link to EtherCAT (linuxcnc-ethercat-master).

I found no reason to include another ec-debianize package.
Is it bad?

Please Log in or Create an account to join the conversation.

More
17 Oct 2021 15:46 #223394 by db1981
can you check if following sync mode works with your drive?

<dcConf assignActivate="730" sync0Cycle="250000" sync0Shift="0" sync1Cycle="750000" sync1Shift="0"/>

I had to config this for another SoE Drive, got issues too when only using Sync 0 .

Please Log in or Create an account to join the conversation.

More
17 Oct 2021 16:04 #223396 by rollfree
I tried.
If there is anything other than *1 or 1000000 in "sync0Cycle", the motor will not start at all.
If "assignActivate" is anything other than 3xx, the engine will not start at all.
Adding "sync1Cycle" has no effect.

That must be cursed. :-(

Please Log in or Create an account to join the conversation.

More
17 Oct 2021 16:12 #223398 by db1981
do you have an manufactures xml description for this drive?

Please Log in or Create an account to join the conversation.

More
17 Oct 2021 16:20 #223399 by rollfree
Yes I have.
But I didn't find anything inspiring in it.

Is in the attachment.

File Attachment:

File Name: AMK_ECsoe_...6633.zip
File Size:9 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
17 Oct 2021 16:33 #223402 by db1981
Do you set S-0-0001 and S-0-0002 at startup time to 0x03E8 (1000us Synctime) ?

Please Log in or Create an account to join the conversation.

More
17 Oct 2021 16:47 #223403 by rollfree
Yes, both have a value of 1000, that is 1ms.

Please Log in or Create an account to join the conversation.

Time to create page: 0.163 seconds
Powered by Kunena Forum