针对核工业现场传感器数量多、传输距离远、对实时性和稳定性要求高、集中化管理手段缺乏、无法接入网络等问题,本文设计并实现了串口转CAN总线集中化管理系统,将核辐射数据封装成帧再转以太网联网传输。系统以STM32F103处理器为核心,将不同辐射数据接收放入三级FIFO邮箱中,通过轮询方式读取FIFO中的数据并进行封装,将封装好的数据帧放入环形缓冲区,最后通过移植LwIP轻量级协议栈系统的网口传输到上位机。测试CAN总线上3个设备节点的工作情况,结果表明,系统稳定、无误码,符合设计要求。
Abstract
Aiming at the problems of a large number of field sensors in the nuclear industry,long transmission distance,high requirements for real-time and stability,lack of centralized management means and inability to access the network,this paper designs and implements a centralized management system from serial port to can bus,which encapsulates the nuclear radiation data into frames and then transfers them to Ethernet for network transmission.With STM32F103 processor as the core,the system receives different radiation data into the three-stage FIFO mailbox,reads the data in FIFO through polling and encapsulates,puts the encapsulated data frame into the ring buffer,and finally transmits to the upper computer through the network port of the system that transits LwIP lightweight protocol stack.After testing the operation of three device nodes on CAN bus,the results show that the system is stable without error code and meets the design requirements.
关键词
CAN总线 /
STM32F103 /
DM9000 /
LwIP
Key words
CAN bus /
STM32F103 /
DM9000 /
LwIP
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}
参考文献
[1] 胡燕,何剑锋,吴其反,等.现场X-γ剂量率仪测量软件设计[J].核电子学与探测技术,2017(3).
[2] 张关峰,李向阳,白宏伟.基于 CAN总线的工程机械数据采集系统[J].仪表技术与传感器,2011(3).
[3] 孙雯雯,胡晶晶.基于单片机的汽车室内环境调控系统[J].科技致富向导,2014(9):296.
[4] 孙逊.工业以太网多协议集成通信适配器研究[D].天津:天津理工大学,2015.
[5] 戚新建,章伟.基于STM32的快速嵌入式以太网接口[J].仪表技术与传感器,2017(7):45-49.
[6] 何敬上,何剑锋,袁兆林,等.多串口网络化异构辐射数据采集与实时传输系统设计[J].仪表技术与传感器,2020(5).
[7] 韩文秋,曾国强,等.无人机载 γ 谱仪数据传输设计[J].核电子学与探测技术,2019(7).
[8] 叶琴瑜,胡天友,何耀.基于CAN总线的光伏电站监控系统[J].仪表技术与传感器,2012(3).
基金
*江西省东华理工大学省级研究生创新基金(YC2021-S646)资助。