An-278 EtherCAT Error Codes

download An-278 EtherCAT Error Codes

of 7

Transcript of An-278 EtherCAT Error Codes

  • 7/27/2019 An-278 EtherCAT Error Codes

    1/7

    Name: GD Cat SW BASIC Page 1 of 7

    1.ScopeThis document considers the different errors and warnings which ma occur when the !C"#" is usedwith the P$7# and %therCAT ser&odri&es or I'() (n* the *ow+*e&e* command *ine and BASIC ,rogramaccess to error management is discussed) Therefore some ,rior -now*edge of Trio BASIC. the !C"#"command *ine and Can(,en+o&er+%therCAT is assumed of the reader)

    In the future. the information here ma /e used / Trio !otion Techno*og as the /asis for a high*e&e* user interface in !otion Perfect & 0)

    2.Error types%rrors and warnings can come from a &ariet of sources) ow the are hand*ed wi** de,end on thesource and the channe* o&er which the error arri&es)

    !C"#" configuration errors)

    %therCAT s*a&e contro**er errors)

    %therCAT State !achine)

    Co% Contro* Word and Status Word from Dri&e)

    Dri&e %rror re,orted o&er SD( channe*)

    3.MC464 configuration errorsThere are 2 t,es of error which ma a,,ear in the !C"#" dis,*a)

    1) 3ss) 4ss5 is the modu*e s*ot num/er) This means that the P$7# has a connection ,ro/*em tothe !C"#") (r it ma show this error when the %therCAT ca/*e is /ro-en whi*e the %therCATis in norma* o,eration)

    2) Css) 4ss5 is the modu*e s*ot num/er) This means that the sstem encountered a configurationerror when tring to initia*ise the a6es) or e6am,*e. if the %therCAT wants to set u, an a6isthat is a*read a**ocated to another modu*e)

    Doc No.: AN-278

    Version: 1.0

    Date: 25 April 2012

    Subject: EtherA! Error co"es # han"lin$ o%

  • 7/27/2019 An-278 EtherCAT Error Codes

    2/7

    Name: GD Cat SW BASIC Page 2 of 7

    4.EtherCAT Slave Controller errorsThe %therCAT S*a&e Contro**er 8%SC9 of each remote dri&e can /e interrogated through the command*ine or from a Trio BASIC ,rogram in the !C"#") 3se the %T%CAT command to fetch &a*ues fromthe %SC of a remote node)

    ETHERCAT($31, slot, slave address, ESC offset, ESC length, vr_index)

    or e6am,*e. to get the %SC state from the dri&e at node address 2 and ,rint it to the termina*;

    ETHERCAT($31, 0, 2, $130, 2, -1)

    8

    >>

  • 7/27/2019 An-278 EtherCAT Error Codes

    3/7

    Name: GD Cat SW BASIC Page 0 of 7

    '(''1C ,nvali" Sync Manager Types / S 0S S + E 0 + E

    '(''1# ,nvali" /utput Configuration / S 0S S + E 0 + E

    '(''1E ,nvali" ,nput Configuration / S 0S 0 + E

    '(''19 ,nvali" :atch"og Configuration / S 0S 0 + E

    '(''2' Slave nee"s col" start Any Current state + E

    '(''21 Slave nee"s ,),T 0 S / Current state + E

    '(''22 Slave nee"s 0&E/0 S / S + E / + E

    '(''23 Slave nee"s SA9E/0 / / + E

    '(''24 ,nvali" input !apping 0S 0 + E

    '(''2 ,nvali" output !apping 0S 0 + E

    '(''26 ,nconsistent settings 0S 0 + E

    '(''25 9ree;&un not supporte" 0S 0 + E

    '(''2 Synchroni8ation not supporte" 0S 0 + E

    '(''27 9ree;&un nee"s 3 buffer !o"e 0S 0 + E

    '(''2A acgroun" atch"og S / 0 + E

    '(''2 )o vali" inputs an" outputs / S/ S + E

    '(''2C 9atal Sync error / S + E

    '(''2# )o Sync error S/ S + E

    '(''3' ,nvali" #C S> Error / S S + E

    '(''33 ,nvali" #C ,/ Error / S S + E

    '(''34 ,nvali" #C Ti!eout Error / S S + E

    '(''3 #C invali" Sync Cycle Ti!e 0S 0 + E

    '(''36 #C Sync' Cycle Ti!e 0S 0 + E

    '(''35 #C Sync1 Cycle Ti!e 0S 0 + E

    '(''41 M?@A/E 0 S / Current state + E

    '(''42 M?@E/E 0 S / Current state + E

    '(''43 M?@C/E 0 S / Current state + E

    '(''44 M?@9/E 0 S / Current state + E

    '(''4 M?@S/E 0 S / Current state + E

    '(''49 M?@/E 0 S / Current state + E

    '(''' EE0&/M no access Any Any + E

    '(''1 EE0&/M error Any Any + E

  • 7/27/2019 An-278 EtherCAT Error Codes

    4/7

    Name: GD Cat SW BASIC Page " of 7

    '(''6' Slave restarte" locally Any ,

    /ther co"es

    B'(''' &eserve"

    '(''';'(9999 en"or specific

    Table 2 ESC Error co"es

    .EtherCAT state !achineThe %therCAT connection has > different states)

    1) Base State ? no acti&it. e&erthing uninitia*ised)

    2) Initia* State ? Bus communication is /eing esta/*ished and c*oc- ar/itration ta-ing ,*ace)

    0) Pre+(,erationa* + Bus is acti&e and ,arameterisation can occur &ia SD()

    ") Safe+(,erationa* ? !aster a** s*a&es communicate cc*ica**) PD(s are /eing e6changed)

    S*a&es cannot ena/*e)

    >) (,erationa* ? u** cc*ic o,eration) S*a&e de&ices can /e ena/*ed)

    The %therCAT state of the master 8!C"#"9 can /e read with %T%CAT command function #)

    ETHERCAT($06, 0, -1) ' print the EtherCAT state to the terminal

    3

    >>

    ETHERCAT($06, 0, 600) ' Put EtherCAT state from slot 0 into VR(600)

  • 7/27/2019 An-278 EtherCAT Error Codes

    5/7

    Name: GD Cat SW BASIC Page > of 7

    6.1.DRIVE_CONTROLWORD bit functions15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

    Reserved r oms h fr oms hos eo qs ev so

    r @ reser&edoms @ o,eration mode s,ecifich @ ha*tfr @ fau*t resethos @ homing o,eration starteo @ ena/*e o,erations @ uic- sto,e& @ ena/*e &o*tageso @ switch on

    Note: Exact functions depend upon the slave drive. See also the CiA DS402 specification.

    6.2.DRIVE_STATUS bit functions15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

    ms ha lla tr rm ms w sod qs ve f oe so rtso

    ms @ manufacturer+s,ecificha @ homing attainedoms @ o,eration mode s,ecifici*a @ interna* *imit acti&etr @ target reachedrm @ remote

    w @ warningsod @switch on disa/*eds @ uic- sto,&e @ &o*tage ena/*edf @ fau*toe @ o,eration ena/*edso @ switched onrtso @ read to switch on

    Note: Exact functions depend upon the slave drive. See also the CiA DS402 specification.

    5.#rive Error reporte" over S#/ channelThe commands C(%AD and C(%ADAIS can /e used to o/tain the &a*ues from Co% o/ects in thedri&e) There ma /e &arious o/ects. inc*uding manufacturer s,ecific o/ects. which are there togi&e information a/out the error status of the dri&e)

    The standard DS"=2 o/ect for error status is =6#=0 su/ inde6 ==) This is a 1# /it unsigned &a*uewhich ma /e read in a BASIC ,rogram or from the !otion Perfect command *ine termina*)

    %6am,*es:

    1) Get the &a*ue of =6#=0 in a ,rogram and ,rint it in e6adecima*)

    CO_READ_AXIS(2, $603F, $00, 6, 428)

    PRINT #5,HEX(VR(428))

    2) Print the &a*ue of =6#=0 to the !otion Perfect command *ine)

    CO_READ_AXIS(4, $603F, $00, 6, -1)

  • 7/27/2019 An-278 EtherCAT Error Codes

    6/7

    Name: GD Cat SW BASIC Page # of 7

    12592

    >>

    The actua* error codes su,,orted / a dri&e wi** de,end on the dri&e manufacturer) The ta/*e /e*owshows some of the t,ica* error codes which ma /e returned / a dri&e) See the dri&eEs hand/oo-for a fu** *ist)

    %rror Code8e69

    !eaning

    ==== No %rror

    1=== Generic %rror

    2=== Current

    22== Interna* current

    200= %arth *ea-age

    011= !ains o&er&o*tage

    021= DC Bus o&er&o*tage

    022= DC Bus under&o*tage

    "21= igh motor tem,erature

    "01= igh dri&e tem,erature

    F=== %6terna* error

    .E(a!ple progra!This e6am,*e reads some of the errors and re,orts them to the !otion Perfect termina* at channe*>)

    ' Check and report the errors over EtherCAT

    ec_axis=0

    ec_node=0

    ec_slot=0

    PRINT#5,""' print a blank line

    ' 1. Check slot configuration errors

    IF(SYSTEM_ERRORAND$010000) 0THEN

    PRINT#5,"Unit Lost"

    ELSEIF(SYSTEM_ERRORAND$020000) 0THEN

    PRINT#5,"Unit Terminator Lost"ELSEIF(SYSTEM_ERRORAND$040000) 0THEN

    PRINT#5,"Unit Station Lost"

    ELSEIF(SYSTEM_ERRORAND$080000) 0THEN

    PRINT#5,"Invalid Unit error"

    ELSEIF(SYSTEM_ERRORAND$100000) 0THEN

    PRINT#5,"Unit Station Error"

    ELSE

    PRINT#5,"no unit errors"

    ENDIF

    ' 2. Check Slave Controller Error

    IFETHERCAT($31, ec_slot, ec_node, $130, 2, 25)=TRUETHEN

    IFVR(25)=1THENPRINT#5,"ESC Initial State"

  • 7/27/2019 An-278 EtherCAT Error Codes

    7/7

    Name: GD Cat SW BASIC Page 7 of 7

    ELSEIFVR(25)=2THEN

    PRINT#5,"ESC Pre-Operational State"

    ELSEIFVR(25)=4THEN

    PRINT#5,"ESC Safe-Operational State"

    ELSEIFVR(25)=8THEN

    PRINT#5,"ESC Operational State"

    ENDIF

    ELSE

    PRINT#5,"ESC read failed"

    ENDIF

    ' Check ESC Error value

    IFETHERCAT($31, ec_slot, ec_node, $134, 2, 25)=TRUETHEN

    PRINT#5,"ESC Error code: ";HEX(VR(25))

    ELSE

    PRINT#5,"ESC read failed"

    ENDIF

    ' 3. Check master state

    IFETHERCAT($06, ec_slot, 25)=TRUETHEN

    PRINT#5,"MC464 EtherCAT state = ";VR(25)[0]

    ELSE

    PRINT"Failed to read Master State"

    ENDIF

    ' 4. Check control and status words

    PRINT#5,"Control Word = ";HEX(DRIVE_CONTROLWORDAXIS(ec_axis))

    PRINT#5,"Status Word = ";HEX(DRIVE_STATUSAXIS(ec_axis))

    ' 5. Check slave drive error word

    CO_READ_AXIS(ec_axis, $603F, $00, 6, 25)

    PRINT#5,"Drive Error Word = ";HEX(VR(25))

    Note: Some detai*s of the o,eration of this ,rogram reuires the use of firmware