Ethercat AX5206 stuck in SAFEOP

More
07 Apr 2021 09:44 #205240 by Stormholt
It seems i was reading very selectively and did not understand the full context.
I have my device go into OP state, however it timeout waiting for SDO download responses.

I believe i have found the file to be /master/sdo_request.c

Thank you for your answer, and sorry for any inconvenience

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

More
27 Mar 2024 10:38 - 27 Mar 2024 10:43 #296881 by Mark_A_W

Hello @chimeno,

I tested DC-MODE configuration and AX5203 configuration.
DC-MODE works Ok.

AX5203 configuration went to SAFEOP but not OP.

I increased +#define EC_AL_STATE_CHANGE_TIMEOUT 15 to
+#define EC_AL_STATE_CHANGE_TIMEOUT 25
and recompiled the ethercat driver.

After recompile, AX5203 transit to OP mode without motors.
I made AX5203 config with motors and it also works Ok now.
 


Hi All

This is my first post here.   I am attempting to transfer from a Step and Direction CNC setup on Windows to Ethercat on LinuxCNC.  Please be gentle with me, it's like drinking from a firehose.  Linux (all the Sudos and Nanos), LinuxCNC...and Ethercat all in one giant leap.

I have a Beckhoff setup with an EK1100, some input and output modules (all working fine in LinuxCNC), and two servo drives, an AX5203 dual servo drive, and an AX5103 single servo drive.

(The AX5103 has a Twinsafe Safety over Ethercat card fitted which is totally evil, but I'll worry about replacing that if I can get the AX5203 working in LinuxCNC.  The AX5203 has the friendly safety card which you apply 24v to and it goes into OP..easy.)

I have the AX5203 working in Twincat, motors spinning, and have configured it for Velocity mode (I think...) and exported an XML file (that was hard to find the instructions for, but thankfully I found some on this forum).   I'm calling that XML through my very simple ethercat-conf.xml file:

<masters>
  <master idx="0" appTimePeriod="1000000" refClockSyncCycles="5">
    <slave idx="0" type="EK1100"/>
    <slave idx="1" type="EL1809"/>
    <slave idx="2" type="EL1809"/>
    <slave idx="3" type="EL2809"/>
    <slave idx="4" type="EL2809"/>
    <slave idx="6" type="AX5203">
      <initCmds filename="Mark - Drive AX5203 - 3 export.xml"/>
      <dcConf assignActivate="730" sync0Cycle="250000" sync0Shift="50000" sync1Cycle="750000" sync1Shift="250000"/>
    </slave>
  </master>
</masters>

I think I have to do something with PDO's or SDO's, but I think the problem in front of me right now is I need to fix the TIMEOUT error in Dmesg.

I think that means recompiling the Ethercat DRIVER as quoted above with the timeout edited...but I have no idea how to do that.   Any help on this step much appreciated!


I've spent hours trying to figure out this step on my own.  I've asked in this thread, rather than creating my own, as it's pretty much the same problem I think, with a very similar drive.   Hopefully the right people will get notified this way.

Dmesg output:

[ 1412.780372] EtherCAT WARNING 0: 4 datagrams UNMATCHED!
[ 1414.788390] EtherCAT WARNING 0: 2 datagrams UNMATCHED!
[ 1415.019174] EtherCAT 0: Master thread exited.
[ 1415.019223] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 1415.019830] EtherCAT 0: Releasing master...
[ 1415.019832] EtherCAT 0: Released.
[ 1415.019988] EtherCAT ERROR 0-0: Failed to receive AL state datagram: Datagram initialized.
[ 1415.088622] EtherCAT ERROR 0-6: AL status message 0x0045: "MBX_SOE".
[ 1415.088681] EtherCAT 0-6: Acknowledged state PREOP.
[ 1415.096445] EtherCAT 0: Slave states on main device: PREOP.
[ 1415.316376] EtherCAT WARNING: Datagram 00000000c0b96254 (master-fsm) was SKIPPED 1 time.
[ 1422.025111] EtherCAT: Requesting master 0...
[ 1422.025115] EtherCAT: Successfully requested master 0.
[ 1422.224724] EtherCAT 0: Domain0: Logical address 0x00000000, 36 byte, expected working counter 9.
[ 1422.224727] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 36 byte, type LRW.
[ 1422.224739] EtherCAT 0: Master thread exited.
[ 1422.224741] EtherCAT 0: Starting EtherCAT-OP thread.
[ 1422.224783] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[ 1422.870553] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 1422.870556] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0086:00/16 0x002F:00/32. Entries to map: 0x0086:01/16 0x0018:01/32
[ 1422.870563] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 1422.870563] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0086:00/16 0x002F:00/32. Entries to map: 0x0086:02/16 0x0018:02/32 
[ 1422.870577] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 1422.870578] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0087:00/16 0x0033:00/32 0x00BD:00/32. Entries to map: 0x0087:01/16 0x0033:01/32 0x0054:01/16
[ 1422.870589] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 1422.870590] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0087:00/16 0x0033:00/32 0x00BD:00/32. Entries to map: 0x0087:02/16 0x0033:02/32 0x0054:02/16
[ 1423.224366] EtherCAT WARNING 0: 4 datagrams UNMATCHED!
[ 1425.224374] EtherCAT WARNING 0: 6 datagrams UNMATCHED!
[ 1426.224542] EtherCAT WARNING 0: 2 datagrams UNMATCHED!
[ 1427.877541] EtherCAT ERROR 0-6: Timeout while setting state SAFEOP.
[ 1427.884373] EtherCAT 0: Slave states on main device: PREOP, OP.
[ 1428.228375] EtherCAT WARNING 0: 2 datagrams UNMATCHED!
[ 1430.232373] EtherCAT WARNING 0: 2 datagrams UNMATCHED!
[ 1430.248380] EtherCAT 0: Slave states on main device: PREOP, OP + ERROR.

The drive is actually chucking an F4A5 error, which is "Error F4A5 "SoE Communication Parameter Error", but I think I will have to get the timeout sorted before I get into the next errors.

infosys.beckhoff.com/english.php?content.../2277329675.html&id=
 

 
Attachments:
Last edit: 27 Mar 2024 10:43 by Mark_A_W. Reason: Adding image

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

More
27 Mar 2024 12:11 #296891 by db1981
Hello,

i will try to give some informations, but i am not on actuale state about the linuxcnc ethercat fork and the behaviour of actual debians.
My head is still on lcnc 2.8 , debian 10 and the original lcec we have created long time ago. Sadly time is to less and personaly i am full time on beckhoff / siemens projects, at the moment there is no customer in sight to do something with linuxcnc....

-to get your Twinsafe System working will be a bigger task, if you have not plenty of time, try to get rid of it.

-for the native AX driver you have to use the same pdo configuration the driver is based on, the difference to standart velocontrol is that you have to add the torque feedback
Pdo config from driver :
Output
lcec_syncs_add_pdo_entry(&hal_data->syncs, 0x0086, 0x01, 16); // control-word
lcec_syncs_add_pdo_entry(&hal_data->syncs, 0x0018, 0x01, 32); // velo-command
Input:
lcec_syncs_add_pdo_entry(&hal_data->syncs, 0x0087, 0x01, 16); // status word
lcec_syncs_add_pdo_entry(&hal_data->syncs, 0x0033, 0x01, 32); // position feedback
lcec_syncs_add_pdo_entry(&hal_data->syncs, 0x0054, 0x01, 16); // torque feedback

- [ 1422.870553] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 1422.870556] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0086:00/16 0x002F:00/32. Entries to map: 0x0086:01/16 0x0018:01/32

you can ignore these warnings.
These are related to that etherlab reads the SII information only on startup and then never does an update (maybe this got fixed in the meantime)
after uploading your initcmds, the drives pdo config will differ from the sii readout. But the pdos will all be configure correctly.


-=1em"Error F4A5 "SoE Communication Parameter Error"
Check that you have configured your Twincat Setup and initcms to the same task time your lcec is using (1ms) , The nc-cycle time is one of the first parameters in the initcmds. 
try to set refclocksynccycles to "-1", this will sync etherlab pll and offsets to your hardware  (i have explainde this many times in the past, search the forum for "refclocksynccycles"  )


regards

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

More
28 Mar 2024 11:53 #296989 by Mark_A_W
Thanks db1981

I am looking into the timings.  I exported a new XML from twincat with the NC Task 1 SAF set at 1 Cycle tick (1ms).  I think that is what you meant me to do to set Twincat to 1ms.  I also added Torque (I hope).

NC Cycle time change from 0700 or something like that to:

    <InitCmd>
                <Transition>PS</Transition>
                <Comment><![CDATA[Tncyc - NC cycle time]]></Comment>
                <Timeout>0</Timeout>
                <OpCode>3</OpCode>
                <DriveNo>0</DriveNo>
                <IDN>1</IDN>
                <Elements>64</Elements>
                <Attribute>0</Attribute>
                <Data>e803</Data>

I have changed refclocksynccycles to "-1" in my ethercat-conf.xml file.

I still have the F4A5 error on the drive.  


[ 8067.536670] EtherCAT WARNING 0: 4 datagrams UNMATCHED!
[ 8070.905177] EtherCAT 0: Master thread exited.
[ 8070.905229] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 8070.905635] EtherCAT 0: Releasing master...
[ 8070.905637] EtherCAT 0: Released.
[ 8070.906378] EtherCAT ERROR 0-6: Failed to receive AL state datagram: Datagram initialized.
[ 8070.988725] EtherCAT ERROR 0-6: AL status message 0x0045: "MBX_SOE".
[ 8070.988792] EtherCAT 0-6: Acknowledged state PREOP.
[ 8070.996649] EtherCAT 0: Slave states on main device: PREOP.
[ 8071.628644] EtherCAT WARNING: Datagram 0000000003822887 (master-fsm) was SKIPPED 1 time.
[ 8126.113896] EtherCAT: Requesting master 0...
[ 8126.113901] EtherCAT: Successfully requested master 0.
[ 8126.331820] EtherCAT 0: Domain0: Logical address 0x00000000, 36 byte, expected working counter 9.
[ 8126.331824] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 36 byte, type LRW.
[ 8126.331863] EtherCAT 0: Master thread exited.
[ 8126.331864] EtherCAT 0: Starting EtherCAT-OP thread.
[ 8126.335591] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[ 8126.948622] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 8126.948640] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0086:00/16 0x002F:00/32. Entries to map: 0x0086:01/16 0x0018:01/32
[ 8126.948652] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 8126.948653] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0086:00/16 0x002F:00/32. Entries to map: 0x0086:02/16 0x0018:02/32
[ 8126.948662] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 8126.948662] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0087:00/16 0x0033:00/32 0x00BD:00/32. Entries to map: 0x0087:01/16 0x0033:01/32 0x0054:01/16
[ 8126.948670] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 8126.948670] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0087:00/16 0x0033:00/32 0x00BD:00/32. Entries to map: 0x0087:02/16 0x0033:02/32 0x0054:02/16
[ 8128.332768] EtherCAT WARNING 0: 6 datagrams UNMATCHED!
[ 8131.957545] EtherCAT ERROR 0-6: Timeout while setting state SAFEOP.
[ 8131.968637] EtherCAT 0: Slave states on main device: PREOP, OP.
[ 8132.332633] EtherCAT WARNING 0: 2 datagrams UNMATCHED!
[ 8133.336648] EtherCAT WARNING 0: 2 datagrams UNMATCHED!
[ 8134.360646] EtherCAT 0: Slave states on main device: PREOP, OP + ERROR.
[ 8138.340634] EtherCAT WARNING 0: 8 datagrams UNMATCHED!
[ 8141.344653] EtherCAT WARNING 0: 2 datagrams UNMATCHED!
[ 8148.364633] EtherCAT WARNING 0: 2 datagrams UNMATCHED!
[ 8158.376634] EtherCAT WARNING 0: 2 datagrams UNMATCHED!
[ 8167.400651] EtherCAT WARNING 0: 8 datagrams UNMATCHED!
[ 8168.404634] EtherCAT WARNING 0: 4 datagrams UNMATCHED!
[ 8169.951041] EtherCAT 0: Master thread exited.
[ 8169.951095] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 8169.951129] EtherCAT ERROR 0-6: Failed to receive AL state datagram: Datagram initialized.
[ 8169.951141] EtherCAT 0: Releasing master...
[ 8169.951143] EtherCAT 0: Released.
[ 8170.016713] EtherCAT ERROR 0-6: AL status message 0x0045: "MBX_SOE".
[ 8170.016796] EtherCAT 0-6: Acknowledged state PREOP.
[ 8170.024667] EtherCAT 0: Slave states on main device: PREOP.
[ 8170.220665] EtherCAT WARNING: Datagram 0000000003822887 (master-fsm) was SKIPPED 1 time.
[ 8178.716193] EtherCAT: Requesting master 0...
[ 8178.716198] EtherCAT: Successfully requested master 0.
[ 8178.917010] EtherCAT 0: Domain0: Logical address 0x00000000, 36 byte, expected working counter 9.
[ 8178.917015] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 36 byte, type LRW.
[ 8178.917027] EtherCAT 0: Master thread exited.
[ 8178.917029] EtherCAT 0: Starting EtherCAT-OP thread.
[ 8178.917070] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[ 8179.592718] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 8179.592721] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0086:00/16 0x002F:00/32. Entries to map: 0x0086:01/16 0x0018:01/32
[ 8179.592734] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 8179.592735] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0086:00/16 0x002F:00/32. Entries to map: 0x0086:02/16 0x0018:02/32
[ 8179.592748] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 8179.592749] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0087:00/16 0x0033:00/32 0x00BD:00/32. Entries to map: 0x0087:01/16 0x0033:01/32 0x0054:01/16
[ 8179.592755] EtherCAT WARNING 0-6: Slave does not support changing the PDO mapping!
[ 8179.592756] EtherCAT WARNING 0-6: Currently mapped PDO entries: 0x0087:00/16 0x0033:00/32 0x00BD:00/32. Entries to map: 0x0087:02/16 0x0033:02/32 0x0054:02/16
[ 8181.916685] EtherCAT WARNING 0: 4 datagrams UNMATCHED!


I'll read on the PDOs you suggest next.
 

File Attachment:

File Name: Mark-Drive...port.xml
File Size:30 KB
 

File Attachment:

File Name: Mark1-ethe...conf.xml
File Size:0 KB
Attachments:

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

More
28 Mar 2024 12:00 #296991 by db1981
try to use the AX as the first device in the ethercat chain.

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

Time to create page: 0.126 seconds
Powered by Kunena Forum