基于單片機的Profibus-DP與Modbus協議轉換設計實現
張軍1,2,3,葉海武1,褚云霞3
1 人民電器集團有限公司 博士后科研工作站,浙江 樂清 325604;
2 河北工業(yè)大學 電器研究所,天津 300130;3 石家莊學院 計算機系,河北 石家莊 050035
摘 要: 隨著采用Modbus RTU 協議的設備越來越多,為能跟上網絡自動化的發(fā)展,設計了一種Modbus 協議與Profibus-DP 協議轉換裝置,通過它實現Modbus 網絡與Profibus-DP 網絡互聯。介紹Profibus-DP 和Modbus 兩種現場總線的協議模型,分析了兩種現場總線協議的轉換方法,提出了轉換器的電路設計和單片機系統(tǒng)軟件設計,并通過實驗證明了轉換器數據轉換的正確性和實用性。
關鍵詞: 現場總線;Profibus-DP 協議;Modbus 協議;協議轉換;SPC3 芯片
中圖分類號:TN915.04 文獻標識碼:A 文章編號:1007-3175(2013)03-0016-05
Realization of Protocol Conversion Design Between Profibus-DP and Modbus Based on Singlechip
ZHANG Jun1, 2, 3, YE Hai-wu1, CHU Yun-xia3
(1 Workstation of Postdoctoral Scientific Research of People Appliances Group Co., Ltd, Yueqing 325604, China;
2 Electrical Apparatus Institute of Hebei University of Technology, Tianjin 300130, China;
3 Computer Department, Shijiazhuang University, Shijiazhuang 050035, China
Abstract: Following more and more equipment in adoption of Modbus RTU protocol, this paper designed a kind of conversion device of Modbus protocol and Profibus-DP protocol in order to follow the development of network automation. The Modbus network was connected to the Profibus-DP network through the device. Introduction was made to protocol modes of Profibus-DP and Modbus of two kinds of field buses and analysis was made to the transfer method of two kinds of field buses. This paper raised transfer circuit design and software design of singlechip machine system. Experiment proved the correctness and practicality of data transfer.
Key words: field bus; Profibus-DP protocol; Modbus protocol; protocol conversion; SPC3 chip
參考文獻
[1] 華镕. 從Modbus 到透明就緒:施耐德電氣工業(yè)網絡的協議、設計、安裝和應用[M]. 北京:機械工業(yè)出版社,2009.
[2] 侯維巖,費敏銳.PROFIBUS協議分析和系統(tǒng)應用[M].北京:清華大學出版社,2006.
[3] 章民融,秦艷華,徐亞鋒. 基于SPC3 的PROFIBUS DP 的研究與開發(fā)[J]. 計算機應用與軟件,2008,25(8):184-186.