Font Size: a A A

Research And Implementation Of Modbus Read/write File Function

Posted on:2016-08-09Degree:MasterType:Thesis
Country:ChinaCandidate:H ZhangFull Text:PDF
GTID:2308330470483860Subject:Control Engineering
Abstract/Summary:PDF Full Text Request
The Modbus protocol wa s inve nted by Modicon company in the industrial network protocol in 1979,as a national industrial network standard active in in i ndustial automation and building infrastr ucture.Modbus protoc ol has been implemented in operating system to meet the communic ation requirements of ARM 、 FPGA a nd other embedde d platfor m.The Modbus protocol is a mas ter-slave protocol.The master node sends commands to the slave node and handles res ponses.There are many open source Modbus slave pr otocol t o meet basic funct ions.FreeModbus as a protocol is already supported by most Modbus function code except some others like mb_func_read_filerecord and mb_func_write_filerecor d.This thesis is based on the r esearch of Modbus protocol,and studies the basic frame and main function of port layer,pr otocol l ayer,applicati on layer in FreeModbus protocol.We analyzed the main function categor ies and ma in par ameters of the protocol stack in detail.We focused on the analysis of the Freemodbus application layer hook function.According to the hook function structure and the Modbus protocol code state diagram extended mb_func_rea d_filerecord(20) and mb_func_writ e_filerecord(21).The extended function code we re compiled in the software and tested through the pc se rial port soft war e.In this pa per, the test re sults meet the M odbus prot ocol standard, extended function code can be easily ported to other software platform to meet t he communication requirements.The use of FreeModbus hook function expansion function code i s also convenient for subsequent users to expand the other curre nt version of the Fre emodbus code which is not supported.
Keywords/Search Tags:Modbus Protocol, Freemodbus Protocol, Hook Function
PDF Full Text Request
Related items