new hardware trouble

More
2 years 9 months ago #291757 by endian
new hardware trouble was created by endian
hello, folks

have anybody ideas about what should be wrong with this configuration? It started right after fresh lcnc start, but when you want to restart it for first time, it do not go to OP and no datas are provided... Sometimes it going to OP with stable data trasfer but it is very very rare.

I can read actual configuration from slave via
Code:
user@debian:~$ ethercat pdos SM0: PhysAddr 0x1000, DefaultSize  256, ControlRegister 0x26, Enable 1 SM1: PhysAddr 0x1100, DefaultSize  256, ControlRegister 0x22, Enable 1 SM2: PhysAddr 0x1200, DefaultSize    0, ControlRegister 0x64, Enable 1   RxPDO 0x1602 "Receive PDO Mapping 3"     PDO entry 0x6040:00, 16 bit, ""     PDO entry 0x607a:00, 32 bit, "" SM3: PhysAddr 0x1380, DefaultSize    0, ControlRegister 0x20, Enable 1   TxPDO 0x1a02 "Transmit PDO Mapping 3"     PDO entry 0x6041:00, 16 bit, ""     PDO entry 0x6064:00, 32 bit, "" SM4: PhysAddr 0x1500, DefaultSize    0, ControlRegister 0x24, Enable 1 SM5: PhysAddr 0x1900, DefaultSize    0, ControlRegister 0x20, Enable 1

ethercat-conf.xml file looks like
Code:
<masters>     <master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000">            <slave idx="0" type="generic" vid="0xF9" pid="0x1030F02" name="xxx" configPdos="true">                                          <!--  Set Cycle Time  -->                 <sdoConfig idx="60C2" subIdx="01">                 <sdoDataRaw data="01"/>                 </sdoConfig>                 <!--  Set Cycle exp  -->                 <sdoConfig idx="60C2" subIdx="02">                 <sdoDataRaw data="FD"/>                 </sdoConfig>                                  <!--  Set OpMode to Cyclic Synchronous Position  -->                 <sdoConfig idx="6060" subIdx="00">                 <sdoDataRaw data="08"/>                 </sdoConfig>                 <syncManager idx="0" dir="out"> </syncManager>                 <syncManager idx="1" dir="in"> </syncManager>                 <syncManager idx="2" dir="out">                     <pdo idx="1602">                         <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="TxControlWord" halType="u32" />                         <pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="TxPositionCommand" halType="s32"/>                                     </pdo>                 </syncManager>                 <syncManager idx="3" dir="in">                     <pdo idx="1A02">                         <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="RxStatusWord" halType="u32"/>                         <pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="RxPositionFeedback" halType="s32"/>                     </pdo>                 </syncManager>                 <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>                                     </slave>               </master> </masters>

dmesg from ethercat shows
Code:
user@debian:~$ sudo dmesg | egrep EtherCAT [11270.649388] EtherCAT 0: Starting EoE thread. [11270.649429] EtherCAT 0: Starting EtherCAT-IDLE thread. [11270.649491] EtherCAT 0: Releasing master... [11270.649492] EtherCAT 0: Released. [11270.678747] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR). [11270.679007] EtherCAT ERROR 0-0: AL status message 0x001E: "Invalid input configuration". [11270.680381] EtherCAT 0-0: Acknowledged state PREOP. [11287.456479] EtherCAT: Requesting master 0... [11287.456483] EtherCAT: Successfully requested master 0. [11287.456633] EtherCAT 0: Domain0: Logical address 0x00000000, 12 byte, expected working counter 3. [11287.456635] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 12 byte, type LRW. [11287.456648] EtherCAT 0: Master thread exited. [11287.456650] EtherCAT 0: Stopping EoE thread. [11287.456660] EtherCAT 0: EoE thread exited. [11287.456661] EtherCAT 0: Starting EoE thread. [11287.456712] EtherCAT 0: Starting EtherCAT-OP thread.


have anybody experiences with similar behavior please? I looks like rabbit hole right now...

thanks, Regards

Please Log in to join the conversation.

More
2 years 9 months ago #291768 by scottlaird
Replied by scottlaird on topic new hardware trouble
So this is a Nidec/Control Techniques Digitax HD M753 servo drive?

I suspect your problem is that you're trying to set PDOs using 'sdoConfig' and that's eventually making things unhappy. Setting SDOs incorrectly in the XML *probably* won't result in an immediate error, which makes debugging annoying. Try `ethercat download` on the command line and see if that works without an error?

ethercat download -p 0 0x60c2 0x01 --type uint8 01
ethercat download -p 0 0x60c2 0x02 --type uint8 0xfd

Please Log in to join the conversation.

More
2 years 9 months ago #291769 by scottlaird
Replied by scottlaird on topic new hardware trouble
I just checked in a tiny fix that should get better error messages when setting SDOs from XML; it should end up being linuxcnc-ethercat v1.13.1. It'll probably be available as a .deb in ~5 minutes.

A bit of overly technical background: there are a few ways to set SDOs in code using the Ethercat library that we're using. The main one is ecrt_slave_config_sdo(), which is what we mostly use when setting SDOs from XML. Unfortunately, it's actually an asynchronous call. It mostly only returns errors if there is a memory allocation problem. If the device is unhappy with the SDO, then we won't know until later. To get responses immediately, we want to use ecrt_master_sdo_download(), but it has *other* problems; anything that it sets will be lost if the slave is rebooted, while ecrt_slave_config_sdo() remembers its settings and re-downloads them if the slave restarts.

So, the fix is to use both every time we set a SDO. I'd fixed most of the settings earlier in the week, but the XML case wasn't handled right yet.

Please Log in to join the conversation.

More
2 years 9 months ago #291770 by endian
Replied by endian on topic new hardware trouble
yes, it is... I took whole startup stuff from twincat 3, DC config etc... but there

ethercat debug 1, told me
Code:
[24550.894711] EtherCAT DEBUG 0-8: Sync after 4988 ms:   27108643 ns [24550.895160] EtherCAT DEBUG 0-8: Sync after 4992 ms:   27107117 ns [24550.896709] EtherCAT DEBUG 0-8: Sync after 4992 ms:   27105590 ns [24550.897709] EtherCAT DEBUG 0-8: Sync after 4992 ms:   27104064 ns [24550.898710] EtherCAT DEBUG 0-8: Sync after 4992 ms:   27102537 ns [24550.899711] EtherCAT DEBUG 0-8: Sync after 4996 ms:   27101011 ns [24550.900712] EtherCAT DEBUG 0-8: Sync after 4996 ms:   27099485 ns [24550.901709] EtherCAT DEBUG 0-8: Sync after 4996 ms:   27097958 ns [24550.902710] EtherCAT DEBUG 0-8: Sync after 4996 ms:   27096431 ns [24550.903166] EtherCAT WARNING 0-8: Slave did not sync after 5000 ms. [24550.903167] EtherCAT DEBUG 0-8:    ref_time=759708122819917000 [24550.903168] EtherCAT DEBUG 0-8:    app_time=759708128330576319 [24550.903169] EtherCAT DEBUG 0-8:  start_time=759708128430576319 [24550.903170] EtherCAT DEBUG 0-8:       cycle=4294717296 [24550.903171] EtherCAT DEBUG 0-8:  shift_time=-250000 [24550.903172] EtherCAT DEBUG 0-8:   remainder=1315942023 [24550.903173] EtherCAT DEBUG 0-8:        start=759708131409101592 [24550.903174] EtherCAT DEBUG 0-8: Setting DC cyclic operation start time to 759708131409101592. [24550.904712] EtherCAT DEBUG 0-8: Setting DC AssignActivate to 0x2400. [24550.907711] EtherCAT ERROR 0-8: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR). [24550.908712] EtherCAT ERROR 0-8: AL status message 0x001D: "Invalid output configuration". [24550.910710] EtherCAT 0-8: Acknowledged state PREOP. [24550.915155] EtherCAT 0: Slave states on main device: PREOP, OP.

and sometimes
Code:
[24908.802200] EtherCAT DEBUG 0-8: Sync after 4980 ms:   23692358 ns [24908.803199] EtherCAT DEBUG 0-8: Sync after 4984 ms:   23691543 ns [24908.804200] EtherCAT DEBUG 0-8: Sync after 4984 ms:   23690725 ns [24908.805199] EtherCAT DEBUG 0-8: Sync after 4984 ms:   23689911 ns [24908.806200] EtherCAT DEBUG 0-8: Sync after 4984 ms:   23689098 ns [24908.807203] EtherCAT DEBUG 0-8: Sync after 4988 ms:   23688284 ns [24908.808202] EtherCAT DEBUG 0-8: Sync after 4988 ms:   23687469 ns [24908.809204] EtherCAT DEBUG 0-8: Sync after 4988 ms:   23686654 ns [24908.810203] EtherCAT DEBUG 0-8: Sync after 4988 ms:   23685839 ns [24908.811164] EtherCAT DEBUG 0-8: Sync after 4992 ms:   23685026 ns [24908.812202] EtherCAT DEBUG 0-8: Sync after 4992 ms:   23684211 ns [24908.813201] EtherCAT DEBUG 0-8: Sync after 4992 ms:   23683396 ns [24908.814199] EtherCAT DEBUG 0-8: Sync after 4992 ms:   23682581 ns [24908.815203] EtherCAT DEBUG 0-8: Sync after 4996 ms:   23681766 ns [24908.816201] EtherCAT DEBUG 0-8: Sync after 4996 ms:   23680952 ns [24908.817200] EtherCAT DEBUG 0-8: Sync after 4996 ms:   23680137 ns [24908.818199] EtherCAT DEBUG 0-8: Sync after 4996 ms:   23679322 ns [24908.819203] EtherCAT WARNING 0-8: Slave did not sync after 5000 ms. [24908.819205] EtherCAT DEBUG 0-8:    ref_time=759708479657286000 [24908.819206] EtherCAT DEBUG 0-8:    app_time=759708486246062580 [24908.819207] EtherCAT DEBUG 0-8:  start_time=759708486346062580 [24908.819208] EtherCAT DEBUG 0-8:       cycle=4294717296 [24908.819209] EtherCAT DEBUG 0-8:  shift_time=-250000 [24908.819210] EtherCAT DEBUG 0-8:   remainder=2394059284 [24908.819210] EtherCAT DEBUG 0-8:        start=759708488246470592 [24908.819211] EtherCAT DEBUG 0-8: Setting DC cyclic operation start time to 759708488246470592. [24908.820201] EtherCAT DEBUG 0-8: Setting DC AssignActivate to 0x2400. [24908.823166] EtherCAT ERROR 0-8: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR). [24908.824200] EtherCAT ERROR 0-8: AL status message 0x0024: "Invalid Input Mapping". [24908.826201] EtherCAT 0-8: Acknowledged state PREOP. [24908.835164] EtherCAT 0: Slave states on main device: PREOP, OP.

It is pure randomly

ragards

Please Log in to join the conversation.

More
2 years 9 months ago #291794 by endian
Replied by endian on topic new hardware trouble
it is look like there was other problem... driver has EoE from default and it is linked to same hardware adapter with two different network adapters names... I found that name with
Code:
sudo ifconfig

and there was someting like
Code:
eoe0s8

then take that name and edit the network interfaces with
Code:
sudo nano /etc/network/interfaces

and add to last empty row this stuff
Code:
iface eoe0s8 inet manual

then I restart the netwoprk manager or restart the PC ...

Everything started to work without problem...

but when I create shell file like this
Code:
#!/bin/bash # Setup free PDO mapping # with 'ethercat' command from IgH EtherCAT Master # Date: 2024-01-28, Author: foxington POS=-p8 #sdos ethercat download $POS 0x6060 0x00 --type uint8 0x08 ethercat download $POS 0x60c2 0x02 --type uint8 0xFD ethercat download $POS 0x60c2 0x01 --type uint8 0x01 # clear TxPdo ethercat $POS --type uint8 download 0x1c12 0 0 # clear RxPDO counter ethercat $POS --type uint8 download 0x1600 0 0 # clear RxPDO0 ethercat $POS --type uint8 download 0x1601 0 0 # clear RxPDO1 ethercat $POS --type uint8 download 0x1602 0 0 # clear RxPDO2 ethercat $POS --type uint8 download 0x1604 0 0 # clear RxPDO3 ethercat $POS --type uint8 download 0x1605 0 0 # clear RxPDO3 # define RxPdo ethercat $POS --type uint32 download 0x1602 1 0x60400010 # control word ethercat $POS --type uint32 download 0x1602 2 0x607a0020 # 1st interp target pos ethercat $POS --type uint8    download 0x1602 0 2 # number of var in this PDO ethercat $POS --type uint16 download 0x1c12 1 0x1602 # list RxPdo ethercat $POS --type uint8  download 0x1c12 0 1 # number of RxPdo # clear TxPdo ethercat $POS --type uint8 download 0x1c13 0 0 # clear TxPDO counter ethercat $POS --type uint8 download 0x1a00 0 0  # clear TxPDO0 ethercat $POS --type uint8 download 0x1a01 0 0  # clear TxPDO1 ethercat $POS --type uint8 download 0x1a02 0 0  # clear TxPDO2 ethercat $POS --type uint8 download 0x1a04 0 0  # clear TxPDO3 ethercat $POS --type uint8 download 0x1a05 0 0  # clear TxPDO3 # define TxPdo ethercat $POS --type uint32 download 0x1a02 1 0x60410010 # status word ethercat $POS --type uint32 download 0x1a02 2 0x60640020 # analog input ethercat $POS --type uint8     download 0x1a02 0 2 # number of var in this PDO ethercat $POS --type uint16 download 0x1c13 1 0x1a02 # list TxPdo ethercat $POS --type uint8  download 0x1c13 0 1 # number of TxPdo ethercat rescan

I can put it just before lcnc startup, no errors should happend I think

regards

Please Log in to join the conversation.

More
2 years 1 month ago #310712 by kworm
Replied by kworm on topic new hardware trouble
Hi,

I think I'm having a similar issue with Bosch/Rexroth IndraDrive Cs and get the same SAFEOP failure even without configpdos. These drives have EoE as well so I'm going to try your fix or even to setup the actual EoE so I can access the drives with the drive utility. Did you ever find a root cause for this?

Please Log in to join the conversation.

More
2 years 1 month ago #311038 by endian
Replied by endian on topic new hardware trouble
Hi,

I found a sophisticated solution..ethercat master igh(which one we already using) has eoe enabled from default.. it should be set during installation itself .. --enable generic --disable 8190too etc... when u add a --disable eoe... It will newer use them.. read ethercat master igh manual for more details

Let me know

Regards

Please Log in to join the conversation.

More
2 years 1 month ago #311053 by onceloved
Replied by onceloved on topic new hardware trouble
There is also a simpler way to turn off eoe by modifying the parameters in the firmware

Please Log in to join the conversation.

More
2 years 1 month ago #311058 by kworm
Replied by kworm on topic new hardware trouble
Yes, I saw that it could be disabled. Unfortunately I need to use it at least during commissioning because the drives I have can only communicate with the drive commissioning utility with EoE...otherwise CoE has to be disabled and it's like the chicken before the egg problem.

Please Log in to join the conversation.

More
2 years 1 month ago #311088 by endian
Replied by endian on topic new hardware trouble
For quick check just try something to solve the problem easy.. for long term solution are possibilities here too

I like long term solutions but for troubleshooting u know...

Please Log in to join the conversation.

Time to create page: 0.374 seconds
Powered by Kunena Forum