主機發送同步幀主要有索引爲0x1005、0x1006、0x1007的字典設置。下面詳細介紹一下:
對象0x1005:
對象0x1006:
對象0x1007:
主機字典配置:
/* index 0x1005 : SYNC COB ID. */
UNS32 master_objdict_obj1005 = 0x40000080; /* 0 */
subindex master_objdict_Index1005[] =
{
{ RW, uint32, sizeof (UNS32), (void*)&master_objdict_obj1005, NULL }
};
/* index 0x1006 : Communication / Cycle Period. */
UNS32 master_objdict_obj1006 = 0xF4240; /* 1000000 */
subindex master_objdict_Index1006[] =
{
{ RW, uint32, sizeof (UNS32), (void*)&master_objdict_obj1006, NULL }
};
/* index 0x1007 : Synchronous Window Length. */
UNS32 master_objdict_obj1007 = 0x7A120; /* 500000 */
subindex master_objdict_Index1007[] =
{
{ RW, uint32, sizeof (UNS32), (void*)&master_objdict_obj1007, NULL }
};
上電後主機就會根據配置的數據字典發送同步幀的.
參考工程