I trying to read a whole entry from the object directory using CANopen-Over-EtherCAT (CoE). The Slave is a FAULHABER MC5005S-ET Motion Controller. For a first test, I have used a simple entry with four UINT8 parameters (addr: 0x2300 / 4 subindices) as you can see in the codeboxes below. But every time I run the reading process, an error is output by the ETC_CO_SdoRead_Access function-block. The output parameter "eError" contains "ETC_CO_FIRST_ERROR". Unfortunately I can't find any further descriptions for that error message. I have also tried to use different lengths and datatypes for the byteArr array as well as other entries from the object directory.
Reading single parameters using index and subindex works fine. Could it be possible that the motion controller doesn't support that operation? Does anybody know how ETC_CO_SdoRead_Access is implemented? Is it a special CoE feature or does this function just invoke ETC_CO_sdoRead successively?
PROGRAMComTestVAR  (*MotionController*)  (*In*)  statusword          :UINT;  velocity_actual_value    :DINT;  (*Out*)  controlword          :UINT;  target_velocity        :DINT;    (*EtherCATCommunication(CoE)/SDO-Traffic*)  ethercat_ready    :BOOL;  ethercat_error    :BOOL;  ethercat_request_restart:BOOL;  //Multi-Read  ReadAccess      :ETC_CO_SdoRead_Access;(*FunctionblocktoReadathecompleteSDOentryintoabytearray.*)  multiRead      :SDO_RW;END_VAR
(* CoE *)//CallEtherCAT-Master//CheckifarestarthasbeenrequestedIFethercat_request_restartTHEN  Ethercat_Master.xRestart:=TRUE;    //RisingEdgetriggerstherestart  ethercat_request_restart:=FALSE;ELSE  Ethercat_Master.xRestart:=FALSE;    //ResettomakeitpossibletorestartthebusagainEND_IF//InvokeEtherCAT-Master-ProgramEthercat_Master();//Checkifready/CheckforerrorsIFEthercat_Master.xConfigFinishedTHEN  ethercat_ready        :=TRUE;  Ethercat_Master.xRestart  :=FALSE;ELSE  ethercat_ready:=FALSE;END_IFIFEthercat_Master.xErrorTHEN  ethercat_error:=TRUE;  ethercat_ready:=FALSE;ELSE  ethercat_error:=FALSE;END_IF//SDO-CommunicationIFethercat_readyTHEN    //Multi-Read  IFmultiRead.activeTHEN    //ResetError-Flag    multiRead.error  :=FALSE;        //ReadSDO-Parameter    ReadAccess(xExecute:=TRUE,uiDevice:=1001,usiCom:=1,wIndex:=16#2300,bySubindex:=16#00,          udiTimeOut:=500,pBuffer:=ADR(byteArr),szSize:=SIZEOF(byteArr),xCompleteAccess:=TRUE,eError=>etcError);        IFReadAccess.xDoneTHEN      ReadAccess(xExecute:=FALSE);      multiRead.active  :=FALSE;    ELSIFReadAccess.xErrorTHEN      ReadAccess(xExecute:=FALSE);      multiRead.error    :=TRUE;      multiRead.active  :=FALSE;    END_IF  END_IFEND_IF
CODESYS Version: V3.5 SP13 + (64-bit)
I appreciate your responses
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Omar, thank you for your quick response. I have checked the error code in 'udiSdoAbort'. The value is 0x06010000 which means, according to the communication manual from Faulhaber, that the access to the specified object is not supported. For me it looks like the device just doesn't support the complete access feature.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everybody,
I trying to read a whole entry from the object directory using CANopen-Over-EtherCAT (CoE). The Slave is a FAULHABER MC5005S-ET Motion Controller. For a first test, I have used a simple entry with four UINT8 parameters (addr: 0x2300 / 4 subindices) as you can see in the codeboxes below. But every time I run the reading process, an error is output by the ETC_CO_SdoRead_Access function-block. The output parameter "eError" contains "ETC_CO_FIRST_ERROR". Unfortunately I can't find any further descriptions for that error message. I have also tried to use different lengths and datatypes for the byteArr array as well as other entries from the object directory.
Reading single parameters using index and subindex works fine. Could it be possible that the motion controller doesn't support that operation? Does anybody know how ETC_CO_SdoRead_Access is implemented? Is it a special CoE feature or does this function just invoke ETC_CO_sdoRead successively?
CODESYS Version: V3.5 SP13 + (64-bit)
I appreciate your responses
Hi Pysin,
According to the Codesys help in case of ETC_CO_FIRST_ERROR, the error cause is stored in the blocks output 'udiSdoAbort', did you check that?
Gr, Omar
Hi Omar, thank you for your quick response. I have checked the error code in 'udiSdoAbort'. The value is 0x06010000 which means, according to the communication manual from Faulhaber, that the access to the specified object is not supported. For me it looks like the device just doesn't support the complete access feature.