This article described How to configure multiple PDOs through driver programmer for Anybus CompcatCom 40 EtherCAT. Firstly, the principle was introduced, followed by the method.
AB6607-C, Anybus CompactCom for EtherCAT M40
AB6639-C, Anybus CompactCom for EtherCAT M40 with Transparent Ethernet
AB6645-C, Anybus CompactCom for EtherCAT M40 with M12 connectors
AB6677-C, Anybus CompactCom for EtherCAT B40
AB6707-C, Anybus CompactCom for EtherCAT M40 without housing
AB6739-C, Anybus CompactCom for EtherCAT M40 with Transparent Ethernet without housing
AB6745-C, Anybus CompactCom for EtherCAT M40 with M12 connectors without housing
AB6779-C, Anybus CompactCom for EtherCAT B40 with Transparent Ethernet
This article simply introduces how to configurate Ethernet parameters. More information about ethernet parameters can refer to user manual.
《Anybus CompactCom 40 - Software Design Guide》
《Anybus CompactCom 40 - Host Application Implementation Guide》
《Anybus CompactCom 40 - EtherCAT Network Guide》
This article based to enable host application \example_app\appl_adimap_asm.c ADI define example.
More information can refer to 《Anybus CompactCom 40 - EtherCAT Network Guide》 section 4 of unit 3,At the same time,Remap function and Assembly Mapping Object (EBh) should be enabled.
ABCC_CFG_REMAP_SUPPORT_ENABLED
to TRUE in \abcc_adapt\abcc_drv_cfg.h
/*------------------------------------------------------------------------------
** Remap support configuration
**
** Check the descriptions in "./abcc_drv/inc/abcc_cfg.h" for more information
** about the purpose of each separate 'define'.
**------------------------------------------------------------------------------
*/
#ifndef ABCC_CFG_REMAP_SUPPORT_ENABLED
#define ABCC_CFG_REMAP_SUPPORT_ENABLED ( TRUE )
#endif
Set ASM_OBJ_ENABLE
、ASM_IA_NAME_ENABLE
to TRUE in \abcc_adapt\abcc_obj_cfg.h
#ifndef ASM_OBJ_ENABLE
#define ASM_OBJ_ENABLE TRUE
#endif
#if ASM_OBJ_ENABLE
/*
** Attribute 13: Name (Array of CHAR - {0x00-0xFF))
*/
#ifndef ASM_IA_NAME_ENABLE
#define ASM_IA_NAME_ENABLE TRUE
#endif
#ifndef APPL_ACTIVE_ADI_SETUP
#ifdef USE_BOARD_SPECIFIC_ADI_SETUP
#define APPL_ACTIVE_ADI_SETUP APPL_ADI_SETUP_SIMPLE_16
#else
#define APPL_ACTIVE_ADI_SETUP APPL_ADI_SETUP_ASM
#endif
#endif
const AD_MapType APPL_asAsmObjWriteMap1[] = //TPDO 0x1A00 Input Data
{
{ 1, PD_WRITE, AD_MAP_ALL_ELEM, 0 },
{ 3, PD_WRITE, AD_MAP_ALL_ELEM, 0 },
{ AD_MAP_END_ENTRY }
};
const AD_MapType APPL_asAsmObjWriteMap2[] = //TPDO 0x1A01
{
{ 1, PD_WRITE, AD_MAP_ALL_ELEM, 0 },
{ AD_MAP_END_ENTRY }
};
const AD_MapType APPL_asAsmObjWriteMap3[] = //TPDO 0x1A02
{
{ 3, PD_WRITE, AD_MAP_ALL_ELEM, 0 },
{ AD_MAP_END_ENTRY }
};
/*------------------------------------------------------------------------------
** Example read maps.
**------------------------------------------------------------------------------
*/
const AD_MapType APPL_asAsmObjReadMap1[] = //RPDO 0x1600 Output data
{
{ 2, PD_READ, AD_MAP_ALL_ELEM, 0 },
{ 4, PD_READ, AD_MAP_ALL_ELEM, 0 },
{ AD_MAP_END_ENTRY }
};
const AD_MapType APPL_asAsmObjReadMap2[] = //RPDO 0x1601
{
{ 2, PD_READ, AD_MAP_ALL_ELEM, 0 },
{ AD_MAP_END_ENTRY }
};
const AD_MapType APPL_asAsmObjReadMap3[] = //RPDO 0x1601
{
{ 2, PD_READ, AD_MAP_ALL_ELEM, 0 },
{ AD_MAP_END_ENTRY }
};
const ASM_InstanceType APPL_sAsmReadMapInst3 =
{
ABP_ASM_IA_DESC_READ | ABP_ASM_IA_DESC_STATIC | ABP_ASM_IA_DESC_PD_MAPPABLE,
APPL_asAsmObjReadMap3,
"Read mappable assembly 3"
};
const ASM_InstanceType* APPL_aasAsmInstances[] =
{
&APPL_sAsmWriteMapInst1, /* Instance 1 */
&APPL_sAsmWriteMapInst2, /* Instance 2 */
&APPL_sAsmWriteMapInst3, /* Instance 3 */
&APPL_sAsmWriteNonMapInst, /* Instance 4 */
&APPL_sAsmReadMapInst1, /* Instance 5 */
&APPL_sAsmReadMapInst2, /* Instance 6 */
&APPL_sAsmReadMapInst3, /* Instance 7 */
&APPL_sAsmReadNonMapInst /* Instance 8 */
};
Add ESI file to EtherCAT Main device configration tools to replace old version ESI file
The example code are for reference only,not as the final functional implementation standard.More information can refer to user maunal.
The user manual download link: