EtherCAT SDO Data Read/Write

ap040
2020-11-04
2021-02-03
  • ap040

    ap040 - 2020-11-04

    Hello,
    I want to read/write the acyclic SDO form the EtherCat Slave. So, I am using the below FB to read it. However, it has giving me the error while read it. So, can you help me?.

    IF SDO_REQ THEN
    Read4(xExecute := TRUE, usiCom := 1, uiDevice := 1001, wIndex := 16#01, bySubindex := 16#01, udiTimeOut:= 500);
    IF Read4.xDone THEN
    abyRead := Read4.abyData;
    Read4(xExecute := FALSE);
    ELSIF Read4.xError THEN
    iState := 32767;
    END_IF
    END_IF

     
  • eschwellinger

    eschwellinger - 2020-11-04

    which error does occure and what is windex 16#01 in your slave?

     
  • ap040

    ap040 - 2020-11-05

    Hello @eschweelinger, I looked and research about it and got the example of it. Now, it has worked and I am able to write/read my object using the ETCCOsdoWrite and ETCCOsdoReadAccess function blocks.

     
  • dsanow92

    dsanow92 - 2021-02-03

    Where did you find those function blocks, ETCCOsdoWrite, ETCCOsdoReadAccess?

     
  • sgronchi

    sgronchi - 2021-02-03

    IoDrvEtherCAT library.

     

Log in to post a comment.