ETC_CO_SdoWrite4 is always Busy

gdalbo
2018-11-08
2019-01-29
  • gdalbo

    gdalbo - 2018-11-08

    Hi at all!

    I'm doing some tests in order to use SANYO EtherCAT Drivers in our applications.

    I developed some code in a new Codesys project and it works fine.

    If I put this code togheter with the machine's whole code, ETC_CO_SdoWrite4 return that it is busy.
    Rightly, when "udiTimeOut" is expired , it set "xError" and the error is "ETC_CO_TIMEOUT".

    I can't understand why.
    In this project some ETC devices are disabled because they'arent connected, but I don't think that this could generate this error.

    Some one can gently help me?

    Best Regards,
    Gianmarco

     
  • gdalbo

    gdalbo - 2018-11-09

    Hi Edwin, thank you!

    I checked this example the first time that I developed the code.
    I'm using "ETC_CO_Write4" in the same way, the only difference is that all the inputs/outputs of the function are sent to/recived by a FB in a library.

    If I use the same "method" in a empty project, it works, but in the machine's whole code it's always "busy". Even if I set a 10" timeout.
    It seems strange because I only copy PRGs from a project to the other.

    Best Regards,
    Gianmarco

     
  • alwoso

    alwoso - 2018-11-09

    Hi Gianmarco!

    Did you check your program, if the instance of this ETC_CO_SdoWrite4 that you are calling is called cyclical and is not interrupted? In other words, once you set the xExecute, is the function block called in each cycle of the program until it is xDone? In the past I had some trouble, when I cancelled the processing of the function block during it was active.

    Another problem can be caused by multiple data transfers to the same slave at the same time. Some slaves cannot handle more than one mailbox message, so that you have to wait before starting a new ETC_CO - function (not only write, even read maybe critical). So make sure you have only one acyclic call active to one slave at a time.

    I hope that helps you
    Good luck

    Alfred

     
  • gdalbo

    gdalbo - 2018-11-14

    Hi Alfred, thanks for the answer

    Yes, the instance is called cyclical and ther's no multiple data tranfer...

    The same piece of code in a empty project works very well, but here in the "whole code" there's this problem. I did only a "copy-paste"

    Maybe in the second case there's too much code to process... is it possible? This is the only variable, I think..

    Best Regards,
    Gianmarco

     
  • alwoso

    alwoso - 2018-11-14

    Hi Gianmarco!

    Zitat:
    Maybe in the second case there's too much code to process...

    No, I don't think it's too much code. You can try the following:
    In your "big" program eliminate the call of the SDO_Write (just comment it).
    Insert a new program in your code, where you do only one call to one slave - like you had in your testprogram.

    Is it working now?

    Best regards
    Alfred

     
  • Sander

    Sander - 2019-01-29

    Hi,

    I had the same problem, I also had some disabled devices in my project tree and executuion always failed with ETC_CO_TIMEOUT.
    My problem was that I coded a fixed device address (for parameter uiDevice). I used the value which was shown in the EtheCAT address field in the device properties.
    But by disabling some devices, the real EtherCAT device address is different to the shown value in the property pages!

    Now I use instead of a fixed coded device address the property value "PhysSlaveAddr" of the corresponding device.

    In my case this solved the problem.

    Best Regards,
    murphy

     

Log in to post a comment.