LinuxCNC and Beckhoff AX5000 servo drives

More
6 months 1 week ago #345906 by endian
Difference between 00 and 01 is bug at master/slave layer... If you will map everything at 00 it will works just few IDNs and main number of then will produce mess .. i do not know why it is that but its the fact ..

Second bug what many year ago was reported by @bkt or other skillfull user was that not supporting stuff mapping pdo is present and and mailbox is not changing... But it was fake data because main volume this ax5 have mapping pdos ON if an EEPROM does not tell you else....its just forgoten message from early days

I think its correct you can add other slave to your TC3 project.. give them naming with string length less than 16 chars and it will works well

Post command + output of you situation then here I can check it..

Thankfully we have that translator and its save anybody non nerdy in lcec one half life.. because I lost it too
 
The following user(s) said Thank You: Surmetall

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

More
6 months 5 days ago - 6 months 5 days ago #345991 by Surmetall
Hi endian,

I spent quite a few hours on this again today and tried to narrow it down properly instead of guessing.
On the full 13-slave bus, all other slaves go OP but the AX5125 at slave 7 still drops to PREOP + ERROR. The relevant lines are

:ethercat slaves:
7 0:7 PREOP E AX5125-0000-0216 EtherCAT Drive (SoE, 1 Ch.)

dmesg:
EtherCAT WARNING 0-7: Slave does not support changing the PDO mapping!
Currently mapped PDO entries: 0x0086:00/16 0x002F:00/32. Entries to map: 0x0086:01/16 0x002F:01/32 0x0024:01/32 0x0050:01/16 0x81E4:01/32 0x81E5:01/32

EtherCAT WARNING 0-7: Slave does not support changing the PDO mapping!
Currently mapped PDO entries: 0x0087:00/16 0x0033:00/32 0x00BD:00/32. Entries to map: 0x0087:01/16 0x0033:01/32 0x00BD:01/32 0x0054:01/16 0x0028:01/32 0x81CC:01/16 0x81CD:01/16
EtherCAT ERROR 0-7: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
EtherCAT ERROR 0-7: AL status message 0x0045: "MBX_SOE".

I also made an AX-only test again. Earlier the AX could reach OP by itself, but I still could not get the motor to actually rotate from LinuxCNC. I tried both a direct velocity-command approach and then a stepgen/position-command approach. The command chain seems to work up to the AX command pin, but the motor still does not move.

From the AX-only spin test:
halcmd getp lcec.0.Antrieb-1-AX5-0.slave-oper
FALSE
halcmd getp lcec.0.Antrieb-1-AX5-0.slave-state-op
FALSE
halcmd getp lcec.0.Antrieb-1-AX5-0.Drive-status-wo-6
40960
halcmd getp spindle.0.speed-cmd-rps
8.333333
halcmd getp stepgen.0.velocity-cmd
8.333333
halcmd getp stepgen.0.position-fb
157.122
halcmd getp sercos.0.pos-cmd
157.1553
halcmd getp lcec.0.Antrieb-1-AX5-0.Position-comman-1
164824253

ethercat slaves:
0 0:0 SAFEOP E AX5125-0000-0216 EtherCAT Drive (SoE, 1 Ch.)
dmesg:
EtherCAT ERROR 0-0: Failed to set OP state, slave refused state change (SAFEOP + ERROR).
EtherCAT ERROR 0-0: AL status message 0x001A: "Synchronization error".

I also tested removing IDNs 32972, 32969, 32971 and 32970 once from initCmds, but that changed nothing, so I restored the original file again.
So at this point I have two clear observations:
on the full bus the AX still fails with MBX_SOE,
and on the AX-only LinuxCNC spindle test I can generate command values but still cannot get the drive to rotate.

What would you check next? I am little bit out of ideas. Thanks for your time! 

greetings 

Tom
Last edit: 6 months 5 days ago by Surmetall.

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

More
6 months 4 days ago - 6 months 4 days ago #346015 by endian
put all AX5xxx first and any other devices behind it ... if translator created the config it is pure master swap to linuxcnc master which is probably OK... but I am just a man and its just a software ...

check sizes of ethercat IDN in the SM and maybe subindexes ...

check if all you have 0x01 ... if they are not change them

share .xml config its tricky to tell you more if there is just small part of the dmesg outcome...

EtherCAT ERROR 0-7: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
EtherCAT ERROR 0-7: AL status message 0x0045: "MBX_SOE".

move(means cut off where it is and put it at the bottom of the file) in init commands from anywhere to the bottom like below -

Code:
<InitCmd> <Transition>IP</Transition> <Comment><![CDATA[Report diagnostics information]]></Comment> <Timeout>0</Timeout> <OpCode>3</OpCode> <DriveNo>0</DriveNo> <IDN>33072</IDN> <Elements>64</Elements> <Attribute>0</Attribute> <Data>0100</Data> </InitCmd> </InitCmds> </SoE> </EtherCATMailbox>
EtherCAT ERROR 0-0: Failed to set OP state, slave refused state change (SAFEOP + ERROR).
EtherCAT ERROR 0-0: AL status message 0x001A: "Synchronization error".

which ethercat driver you are using for control the AX ? generic or native 
Last edit: 6 months 4 days ago by endian. Reason: startup edit
The following user(s) said Thank You: Surmetall

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

More
6 months 3 days ago #346033 by Surmetall
Hi endian,

thanks a lot.
I am using the generic driver.
Yes, the AX5125 is currently at slave 7. I will move it to the first position on the bus as soon as I am back in the shop.

The current active AX PDO entries in ethercat-conf.xml use subIdx="00", not 0x01:
0x0086:00
0x002F:00
0x0087:00
0x0033:00
0x00BD:00

Current active AX config:
generic
configPdos="false"
reduced PDO mapping
dcConf assignActivate="730" sync0Cycle="250000" sync1Cycle="0"
I also exported the AX5125 selected item from TwinCAT and now have the full SoE InitCmd export.

My next steps are:
move the AX5125 to the first position on the bus
change the active PDO subindexes from 00 to 01
move IDN 33072 to the end of the InitCmd list

I am very grateful for your help and also for your converter tool.
At the moment I am also using AI to help me work through this problem. I am not blindly copying what it suggests. I mainly use it to learn how this integration works.
My long-term goal is to add a second AX double motor drive as well, but first I want to get this AX5125 running and understand what I did wrong so I can avoid the same mistakes in the future.
What also makes me curious is that your export/converter result worked much better than my own attempt.
Do you have any idea what I may have done wrong when exporting or preparing the file?

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

Time to create page: 0.063 seconds
Powered by Kunena Forum