Ethercat protocol not responding

More
02 Mar 2023 12:23 #265715 by akg1904
Hi,

I did some research and I found 2 things which might be the causing the problem:

1. Enable notLRW: yes
    
I have gone through some post in forum and I came to a conclusion that because of the above problem, Drive required different domains for read/ write PIDs.
  Unfortunately I could not find examples or docs to activate multiple domains on the master to fix my problems and I don't know how to proceed further if it is "the Problem"

is there a way I can set "Enable notLRW" to no?

I will attach a links to get a clear idea of above problem:
www.forum.linuxcnc.org/24-hal-components...pins-rw-doesn-t-work

2. My Kernel is  "uname -a"

Linux linuxcnc 4.19.0-22-rt-amd64 #1 SMP PREEMPT RT Debian 4.19.260-1 (2022-09-29) x86_64 GNU/Linux

is still 4.19.0 but I don't think it should give any problem.

if anyone has any advice/suggestion, please help me out

Regards
Abhishek

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

More
04 Mar 2023 12:41 #265845 by db1981
Hello,

i have checked a little bit deeper about your problem...

Unfortunaly at the moment it is not possible to adapt notLRW drives. To get this handled it is neccesarry to do complete redesign of lcec.main and lcec_conf. But i can't see a time window for this in the next few months.

Explanation:

all slaves i had contact with, did not need this feature. notLRW tells, that the PDO data is transmitted in own telegramms for Read and Write (LRR and LWR). This should normaly be handled by the master, but the etherlab master does not do this by itself.
This can be solved by creating different pdo adress domains for read and write at ec conf state. Actual lcec_mains creates only one fixed domain, to blow this up a huge change in code is neccesary that sadly has to be backwards compatible...
with testing, building test-environment, collecting test-equipment, this will get an full week job.
The following user(s) said Thank You: CORBETT

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

More
20 Mar 2023 12:29 #267140 by akg1904
Hi db1981,

Thanks for your reply,

As much as I could understand, currently linuxCNC Ethercat master supports only one domain(which basically does both read and write) but for my drives(or similar drives) we require separate domain for both read and write.
Is this what you want to tell?

if yes, we need to make changes in lcec.main and lcec_conf  to incorporate two domain for both Rx and Tx respectively.

As I want to start the operation with Ethercat, if you could guide me regarding how to change and what to incorporate,  I am happy to help in making changes for the same.

To start kindly provide me with some material where I can get some insight on how to make changes.

Thanks in advance

regards
Abhishek
 

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

More
22 May 2023 13:23 #271929 by akg1904
Hi db1981,

As per your suggestion, I started going through lcec_conf.c and lcec_main.c, I discovered a great many things and according to that I made some changes to lcec_main.c,
Here are my current changes.

1) I have added one more domain structure entry in lcec_master.

The original was:

// create domain
    if (!(master->r_domain = ecrt_master_create_domain(master->master))) {
   rtapi_print_msg (RTAPI_MSG_ERR, LCEC_MSG_PFX "master %s domain creation failed\n", master->name);
   goto fail2;
}



I have modified it to:

// create domain
    if (!(master->r_domain = ecrt_master_create_domain(master->master))) {
      rtapi_print_msg (RTAPI_MSG_ERR, LCEC_MSG_PFX "master %s domain creation failed\n", master->name);
      goto fail2;
    }
    if (!(master->w_domain = ecrt_master_create_domain(master->master))) {
      rtapi_print_msg (RTAPI_MSG_ERR, LCEC_MSG_PFX "master %s domain creation failed\n", master->name);
      goto fail2;
    }



My next step are
1. I will be updating the read and write specific call backs in lcec_main.c 
2. Add the domain specific structures, I guess that it will be inside lcec.h.

Awaiting your response,
I hope I am moving in the right direction.

Regards,
Abhishek

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

More
19 Jul 2023 10:19 #275809 by fdarling
I am trying to use a Yaskawa SGD7S-2R8AA0A002 EtherCAT servo drive with LinuxCNC (Yaskawa SGM7J-04AFC6S servo motor). The drive can jog just fine from SigmaWin+ over USB. However, when trying to use it with LinuxCNC I am running into similar problems as in this thread -- it stays in PREOP state.

To be clear, I know that I generally have LinuxCNC working with EtherCAT correctly because I tested a Chinese JMC JASD7502-20B-EC servo drive with success. I used the same configuration, modifying only the EtherCAT configuration XML file that is passed to the lcec_conf HAL component.

It sounds like the Yaskawa EtherCAT drive requires that read/write PDOs are done in different packets (domains)? And that this requires some rewriting of the LinuxCNC EtherCAT driver? If so, is there any progress with this?

I attached the XML configuration file where I commented out all pdoEntry elements (in case they were causing problems), and I attached the dmesg output with "ethercat debug 1" set. The dmesg log ends with the following:
[ 1952.331425] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 1952.332421] EtherCAT ERROR 0-0: AL status message 0x001D: "Invalid output configuration".
[ 1952.334423] EtherCAT 0-0: Acknowledged state PREOP.

If you have found a solution, I would love to hear about it!
Attachments:

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

More
20 Jul 2023 06:25 #275862 by fdarling
Page 3 of Yaskawa's RV-Y4P05Q Beginning EtherCAT Master Development with Yaskawa Drive.pdf



Which confirms that the drive only supports Logical Read (LRD) and Logical Write (LWR) modes separately, but not the combined Logical Read Write (LRW) mode. LinuxCNC's EtherCAT driver will have to be modified...
The following user(s) said Thank You: CORBETT

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

More
25 Jul 2023 00:37 #276188 by CORBETT
@fdarling
This is most disheartening to see as I have several of the SGDV models, just haven't had time to check them out.  Thanks for putting this on the forum as it will save me time down the road of trying to figure out the problem. 

Let us hope that Dominik can re-work the driver and get these working...  
 

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

More
26 Jul 2023 17:03 #276316 by fdarling
I just opened an issue on Sascha Ittner's linuxcnc-ethercat GitHub repository:

supporting separate LRD/LWR commands instead of an LRW command · Issue #121 · sittner/linuxcnc-ethercat

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

More
11 Aug 2023 08:26 #277614 by RDA
Hello,
If it is of any help, I can donate a yaskawa sigma 7 drive, sigma 5 motor and the encoder/motor cables.
The following user(s) said Thank You: tommylight

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

More
11 Aug 2023 08:37 #277617 by fdarling

Hello,
If it is of any help, I can donate a yaskawa sigma 7 drive, sigma 5 motor and the encoder/motor cables.
 

Does a Sigma 5 motor work with a Sigma 7 drive?

If we can find a developer willing to tackle the problem, it would certainly be great to send the equipment to them for testing!

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

Time to create page: 0.098 seconds
Powered by Kunena Forum