ECS Custom Object 0x1008, 0x1009, 0x100A

1 Example project

Use the ECS CustomOD Example from our Knowledge Base

KB → Software → LFW Host Examples → EtherCAT Slave

For netX90:

2 ECS Sources

The ECS Sources in the ECS CustomOD Example are in the folder:

netXStudio_ECSV5_CustomOD_V3.0.0.1\netX 90 - EtherCAT Slave - CustomOD V3.0.0.1\Components\cifXApplicationDemoECS\Sources


3 ECS Sourccode changes

go to AppECS_DemoObjectDictionary.h and add to the array g_tObjects the new objects 0x1008, 0x1009, 0x100A

static const uint8_t ManufacturerDeviceName[8] = {"Hilscher"};
static const uint8_t HardwareVersion[1] = {"1"};
static const uint8_t SoftwareVersion[3] = {"5.2"};

OBJECT_DESCRIPTION_T g_tObjects[] =
{
  {
    .usIndex = 0x1008,
    .bMaxNumOfSubObjs = 0,
    .bObjectCode = ODV3_OBJCODE_VAR,
    .usAccessFlags = 0,
    .bIndicationFlags = 0,
    .usDatatype = ECAT_OD_DTYPE_VISIBLE_STRING,
    .usAccessRights = ECAT_OD_READ_ALL,
    .pszName = "Manufacturer Device Name",
    .ptSi00 = 0,
    .ulMaxFieldUnits = 8,
    .pvInitialValue = ManufacturerDeviceName,
    .ulInitialValueLength = 8,
  },
  {
    .usIndex = 0x1009,
    .bMaxNumOfSubObjs = 0,
    .bObjectCode = ODV3_OBJCODE_VAR,
    .usAccessFlags = 0,
    .bIndicationFlags = 0,
    .usDatatype = ECAT_OD_DTYPE_VISIBLE_STRING,
    .usAccessRights = ECAT_OD_READ_ALL,
    .pszName = "Manufacturer Hardware Version",
    .ptSi00 = 0,
    .ulMaxFieldUnits = 1,
    .pvInitialValue = HardwareVersion,
    .ulInitialValueLength = 1,
  },
  {
    .usIndex = 0x100A,
    .bMaxNumOfSubObjs = 0,
    .bObjectCode = ODV3_OBJCODE_VAR,
    .usAccessFlags = 0,
    .bIndicationFlags = 0,
    .usDatatype = ECAT_OD_DTYPE_VISIBLE_STRING,
    .usAccessRights = ECAT_OD_READ_ALL,
    .pszName = "Manufacturer Software Version",
    .ptSi00 = 0,
    .ulMaxFieldUnits = 3,
    .pvInitialValue = SoftwareVersion,
    .ulInitialValueLength = 3,
  },
  {
...

4 CoE objectlist