ESC SII usage memo(Load Fail)

 

ESC SII usage memo(Load Fail)

                                               Memo by 20230922 by Advan

ESC SII memory map layout



https://download.beckhoff.com/download/document/io/ethercat-development-products/ethercat_esc_datasheet_sec1_technology_2i3.pdf

 

The “EtherCAT Slave Controller Configuration Area”  address 0x0~0x7(word offset) is content important ESC configuration conformation(mandatory) setting. 

Further , this memory area content a checksum to make sure the data correctness.



 https://www.ethercat.org/memberarea/download/ETG2010_S_R_v1i0i0_EtherCATSIISpecification.pdf

 

If SII memory 0x0~0x6  data not match with 0x7  correct checksum value , Slave will not function correctly.          


 

If that were the case , You can see the ESC DL State 0x110 bit 0 reflect as 0 




Normally you should never see the flag as False , In this case you might face on a hardware malfunction situation, However you can still attempt to rewrite the ESC EEPROM memory via TwinCAT (Note. development environment must have the device description file)



You can simply press “Download(UI will load ESI SII Info as initial value) in slave.advanced setting or manually select by “Download from List”  to rewrite SII Information.

 


 

Appendix

·       *  How to generate correct checksum value

F        Find online tool CRC-8 manually input initial value

http://www.sunshine2k.de/coding/javascript/crc/crc_js.html



Note to put 0xFF into initial value before calculate.


add PLC sample code


PROGRAM MAIN
VAR
bInit : BOOL := TRUE;
DataArray : ARRAY[0..63] OF BYTE;
nCRC : BYTE;
nCheckLen : BYTE := 14;
END_VAR
IF bInit THEN (* eg. EK1100 SII data *)
DataArray[0] := 16#00;
DataArray[1] := 16#0D;
DataArray[2] := 16#00;
DataArray[3] := 16#00;
DataArray[4] := 16#00;
DataArray[5] := 16#00;
DataArray[6] := 16#00;
DataArray[7] := 16#00;
DataArray[8] := 16#00;
DataArray[9] := 16#00;
DataArray[10] := 16#00;
DataArray[11] := 16#00;
DataArray[12] := 16#00;
DataArray[13] := 16#00;
bInit := FALSE;
END_IF

nCRC :=  GetCRC8(ADR(DataArray), nCheckLen , 16#FF ,16#07);     (*  should get 0x46 *)



FUNCTION GetCRC8 : BYTE

VAR_INPUT
pData : POINTER TO ARRAY[0..255] OF BYTE;
nCalLen : BYTE; (* Note.  max calcute len  255 *)
nInitValue : BYTE := 16#FF;          (* Note.  parameter must given by outside *)
nPoly : BYTE := 16#07;
END_VAR
VAR
nCRC : BYTE;
i, j : INT;
END_VAR


nCRC := nInitValue; (* Give init value *)
FOR i := 0 TO nCalLen-1 BY 1  DO (* check each byte *)
nCRC := nCRC XOR pData^[i];
FOR j := 1 TO 8 DO (* check each bit *)
IF (nCRC AND 16#80) <> 0 THEN (* check msb state *)
nCRC := SHL(nCRC , 1) XOR nPoly;
ELSE
nCRC := SHL(nCRC , 1);
END_IF;
END_FOR;
END_FOR;
GetCRC8 := nCRC; (* copyout data *)

留言

這個網誌中的熱門文章

[補充資料] EtherCAT Slave 定址 & Protocol 解析

Access TwinCAT EtherCAT CoE / SoE Object via ADS

Get SDO Information via Ads