Beckhoff Error Codes

Each time a beckhoff device sends a request to BeckhoffCom, the reply will contain an uint32_t status.

The meaning of the status is:

  • 0x0000000: no error
  • 0x00000001 - 0xCCBFFFFF: error reported by the PLC
  • 0xCCC00001 - 0xCCCFFFFF: error reported by BeckhoffCom

Errors reported by the PLC

Each PLC sodt-device has its own set of error codes. All of them are decoded in the BeckhoffDevice base class. Here I will only mention the ones available in the soft-device base class

  • 0xC001: _err_UnknownAttrComm - key does not match instruction list (check also for name of the command in iL)
  • 0xC002: _err_PairExpired - Pair rejected after timeout (most likely the addressed softdevice is buggy or dead)
  • 0xC003: _err_StuckBusy - Device was busy for too long: This must be faulty. See also _maxBusyTime
  • 0xC004: _err_sendPairFailed - send pair tried to send stuff but the buffer was full -> check _buffer for missing stuff
  • 0xC005: _err_sendBufferOverflow - tcpSend failed to fit its content to the output buffer. In this case a lot of data to be send was flushed instead
  • 0xC006: _err_SerialInit
  • 0x0000C07: _err_SerialFail
  • 0xC008: _err_TermState
  • 0xC009: _err_TermLink
  • 0xC00A: _err_TerminalType - could not identify terminal type (Not enlisted in supported terminal -> ST_Terminals, F_TermType)
  • 0xC100: _err_TerminalNotFound - connected terminals ecAdr (hwPort) not found in _arrSlaveState
  • 0xC00C: _err_ConnSDnotfound - connected softdevice not found in device list
  • 0xC00D: _err_ConnSDmultiplefound - connected softdevice found multiple in devicelist (faulty device list: this should NEVER happen -> greatest caution required)
  • 0xB0000: _err_NoHWData - No sufficient data for this HW (EtherCat port or channel number not valid)
  • 0xC00E: _err_HWNotOperational - Terminal in bad state
  • 0xC00F: _err_WrongCh - This Channel does not have this Property/Command (e.g. controller channel has different properties from channels)
  • 0xC010: _err_ReadOnly - Read only properties may not be written
  • 0x0000C011: _err_WriteOnly
  • 0xC012: _err_InvalidValue - This value cannot be used for the property
  • 0xC013: __err_InvalidState - Command can not be executed in current state
  • 0xC014: _err_NotAvailable - Terminal does not support this property (e.g. Voltage input terminal can not select resistive temperature sensor type)
  • 0xC015: _err_WrongTerminal - To be used in Device supporting different terminal types. Send as NAK if terminal type does not support the requested feature.
  • 0xC017: _err_InitCoEWrite - CoE write error at initialization
  • 0xC018: _err_InvalidCommandName - Invalid Command Name (A or C prefix)
  • 0xC019: _err_InvalidKeyName - Invalid keyName
  • 0xC01A: _err_CommandWrite - Commands are void and can not be written
  • 0xC01B: _err_InterlockBitsOld - Interlock safe normal override bits inconsistent (obsolete)
  • 0xC01C: _err_AdsRead
  • 0xC01D: _err_AdsWrite
  • 0xC01E: _err_InvalidSize
  • 0xC020: _err_ReadCoE - Reading or writing terminal register over CoE failed
  • 0xC021: _err_WriteCoE - Reading or writing terminal register over CoE failed
  • 0xCFFF: _err_obsolete - This command is no longer supported
  • 0x10001: _err_InterlockDevNotFound - Interlock device not found. DO NOT USE!
  • 0x10002: _err_CommandLocked - Command can not be executed due to interlock
  • 0xF00BA: _err_EtherCATFailure - Slave count doesn’t match configured slave count this means the ethercat communication will fail due to bad checkssum. You could write but the PLC would never receive any values from HW.

Errors reported by BeckhoffCom

These are the error codes currently implemented in BeckhoffCom

  • 0xCCC00001: No Communication;
  • 0xCCC00002: Timeout;
  • 0xCCC00003: Missing Value;
  • 0xCCC00004: Not Readable;
  • 0xCCC00005: Not Writable;
  • 0xCCC00006: Access Denied;
  • 0xCCC00009: Trigger Number Invalid;