canOpen学习九之canOpen应用实现主机自动发送同步帧
程序员文章站
2022-07-14 09:05:26
...
主机发送同步帧主要有索引为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 }
};
上电后主机就会根据配置的数据字典发送同步帧的.
参考工程
上一篇: USB工业摄像头模块选择