当前位置:网站首页>EtherCAT igh 'Fatal Sync Error'——0x002C,0x001A
EtherCAT igh 'Fatal Sync Error'——0x002C,0x001A
2022-06-21 16:18:00 【拉松】
问题还没解决,后续会跟进。打算记录一下调试过程,以防后面忘记。当然也希望有朋友能指点我一下,哈哈。
使用igh进行开发,遇到了一个报错,这种报错无规律可言,测试的时候,有时会出现,有时不出现。
这个问题,我问了一个网友,他的回答如下:
EtherCAT从站有个本地时钟(是个定时器,1ms一次中断,这个中断函数会去喂狗,就是累加一个数),sync会去清零这个累加数(清除喂狗的次数)。当喂狗的次数(就是那个累加数)大于等于约定的次数时,就会报这个错误。
所以查三个地方,一个是定时的周期是否正确,二是喂狗的次数上限是否正确,三是否在规定时间内接收到sync中断。
你可以用开发板接你的主站,能正常通讯,那就不是sync的问题,查两外两个。
这个报错的信息是从站上传的,你可以在从站代码里面全局搜索002c,就能找到这个错误的宏定义,和报错的地方
ctrl + F, 全局搜索002c

继续全局查找这个bDcRunning
然后debug这两个变量
上面在动的那个计数,大于等于下面那个就报错了,有时候等于也没报错,这是因为报错的机制在主函数循环里面,还没执行到,又被清零了,所以有时候不报错,这是bug。
ASK:如果说sync中断慢了,也会报这种错误是吧?
ANSWER:是的,因为狗已经喂饱了,就是那个计数已经超过设置的计数值了,
喂狗就是不断的让那个计数值加1,sync中断会清零那个计数值,
那个计数值大于一定数,就会sync报错,就是你遇到的那个错误。
好吧,其实忙活了半天只是知道为什么会报错,并没能找到报错的真正原因!!!
个人认为并不是从站的问题,我用TwinCAT连接从站做测试,尚未发现这个问题,只有在用igh主站的时候会报错!!!
这个问题应该叫做“EtherCAT网络抖动问题”,我在知网搜到了一篇论文《一种EtherCAT软主站的抖动抑制方法》,论文中讲述了一些造成抖动的原因,有兴趣的可以下载参考。
过段时间打算研究一下从站程序的流程,以及IRQ、sync0、sync1三个中断。
边栏推荐
- 深入理解图注意力机制
- 3DE 三維模型視圖看不到怎麼調整
- The source code of the online live broadcast system enables you to request the list interface and touch the bottom page to load
- Stack cognition - Introduction to heap
- 【ORACLE】Oracle里有“time”数据类型吗?--关于对Oracle数据类型的一点研究
- Ease of fire test for silicone rubber glass fiber pipe en45545
- 第五章 操作位和位串
- Vscade tool
- List set to comma concatenated string
- wcdma与LTE的区别
猜你喜欢
![[real topic of the Blue Bridge Cup provincial tournament 35] scratch water reflection children's programming scratch programming explanation of the real topic of the Blue Bridge Cup provincial tournam](/img/02/3a05b21a49036e3fba95fd41c4a048.png)
[real topic of the Blue Bridge Cup provincial tournament 35] scratch water reflection children's programming scratch programming explanation of the real topic of the Blue Bridge Cup provincial tournam

加密大崩盘,Web3游戏到底还有没有未来?5篇论文深度探讨

《MATLAB 神经网络43个案例分析》:第26章 LVQ神经网络的分类——乳腺肿瘤诊断

加速雲原生應用落地,焱融 YRCloudFile 與天翼雲完成兼容性認證

不是一流大学毕业,却通过自学软件测试,进了阿里年薪初始22K

Viewing technological changes through Huawei Corps (IV): interactive media (Music)

焱融科技 YRCloudFile 与安腾普完成兼容认证,共创存储新蓝图

Simulation of vector

One trick: let logs help you make decisions through Yanrong SaaS data service platform +elk

Deeply understand the attention mechanism of map
随机推荐
数字藏品系统开发,NFT艺术品交易平台搭建
Fragment与Activity 传值
Vit is crazy, 10+ visual transformer model details
How to adjust 3DE 3D model view if you can't see it
Software test architecture learning and construction (14) - overview of software test and development model of test foundation
Nacos registry ----- built and used from 0
shamir
Convert longitude and latitude to distance
加密大崩盘,Web3游戏到底还有没有未来?5篇论文深度探讨
BM23 二叉树的前序遍历
润迈德医疗通过上市聆讯:预计亏损将增加,霍云飞兄弟持股约33%
Stack cognition -- basic use of reverse IDA tools
Jetpack compose status promotion (II)
Bm19 looking for peak
堆栈认知——栈溢出实例(ret2text)
Deeply understand the attention mechanism of map
3de 3D model View ne voit pas comment ajuster
加速雲原生應用落地,焱融 YRCloudFile 與天翼雲完成兼容性認證
Analysis of 43 cases of MATLAB neural network: Chapter 26 classification of LVQ Neural Network - breast tumor diagnosis
Differences between fragmentstatepageradapter and fragmentpageradapter