摘要
为解决32位MCU(Microcontroller Unit)与直流调速器的通讯问题,提出一种基于Modbus总线协议的通讯方法以及实现过程。其中32位MCU选用STM32F103芯片并作为通讯主机,直流调速器选用ETD DC790P并作为通讯从机。该方法可以实现一主机多从机的通讯结构,实现一个32位MCU主机与多个直流调速器从机通讯。主机通过协议发送指令给从机,从机接到指令做出动作并通过协议回应主机。实验证明,基于Modbus协议的通讯方法能精准实现主机与多个从机的通讯以及32位MCU对电机转速转矩等控制,并且Modbus实现方法具有稳定性高、抗干扰能力强、可移植性高等优点。
In order to solve the communication problem between the 32-bit MCU(Microcontroller Unit)and the DC(Direct Current)governor,a communication method and implementation process based on the Modbus bus protocol is proposed.The 32-bit MCU selects the STM32F103 chip as the communication host,and the DC governor uses the ETD DC790P as the communication slave.The method can realize the communication structure of a host multislave,and realizes communication between a 32-bit MCU host and a plurality of DC governor slaves.The host sends a command to the slave through the protocol,and the slave receives the command to make an action and responds to the host through the protocol.Repeated experiments have proved that the communication method based on Modbus protocol can accurately realize the communication between the host and multiple slaves,and can accurately realize the control of the motor speed and torque of the 32-bit MCU.And the Modbus implementation method has the advantages of high stability,strong anti-interference ability and high portability.
作者
胡科幻
石景龙
苗政
徐信
王向超
齐文斌
张军
HU Kehuan;SHI Jinglong;MIAO Zheng;XU Xin;WANG Xiangchao;QI Wenbin;ZHANG Jun(College of Electronic Science and Engineering,Jilin University,Changchun 130012,China;Department of Engineering,Baicheng Fujia Technology Company Limited,Baicheng 137000,China;Information Center,Jilin Technical College of Electronic Information,Jilin 132001,China)
出处
《吉林大学学报(信息科学版)》
CAS
2020年第2期148-153,共6页
Journal of Jilin University(Information Science Edition)
基金
吉林省科技发展计划重点科技研发基金资助项目(20180201065GX)。