摘 要: 工業現場往往需要將生產線所處的狀態或出現的故障信息顯示在大屏幕上,以提示相關人員。為實現該目的,設計了一套生產線信息顯示系統。該系統采用西門子S7300 PLC作為生產線主控制器,生產線信息數據存儲在內存單元中,CP341模塊使用3964R協議,將數據串行發送至單片機,單片機對數據進行處理之后,再把需要顯示的文字信息內碼串行發送至顯示屏。該系統已在工程實際中得到應用,效果良好,具有很高的實用價值。關鍵詞:3964R協議; 單片機; PLC; 信息顯示
中圖分類號:TN911-33文獻標識碼:A
文章編號:1004-373X(2010)18-0025-03
Design of Production Line Information Display System Based on 3964R Protocol
LEI Liang, BAO He-chuan, YANG Ming
(Mechanical and Electrical College, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China)
Abstract: For drawing the attention of the related personel, the information about the status or the malfunction of the production line usually needs to be displayed on the big screen. For this purpose, a system to display the information of the production line was designed, in which a SIEMENS S7-300 PLC is employed as the main controller of the production line, the information data of the production line is stored in its RAM, CP341 module is adopted to send the data serially to the MCU according to 3964R protocol, and after processing the data, the MCU serially sends the internal code of the characters, which need to be displayed, to the big screen. This system has been used in a factory and got a good result. This design has a high practical value.
Keywords: 3964R protocol; MCU; PLC; information display
收稿日期:2010-04-27
可編程邏輯控制器(PLC)以其強大的功能、高可靠性和易用性廣泛應用于工業控制領域,在各行業都發揮了重要作用[1-2]。某廠采用西門子S7300系列PLC作為生產線的主控制器,用于控制整個生產過程。PLC內部的60個字節存儲單元存儲了相關的生產線狀態信息,每個位對應一條信息。現要求開發一套大屏幕顯示系統,定時(0.51 s)讀取上述60個字節數據,當某位置1時,則在大屏幕上顯示對應信息。
1 方案分析
根據項目要求,顯示屏可采用市場現有的LED顯示屏和相應的控制卡。但現有的控制卡無法直接與PLC進行通信并處理來自PLC的數據,因此需要開發一種通信控制板卡用于獲得并處理PLC中的數據,以存儲所有信息,并按顯示屏的數據格式給顯示屏控制卡發送需要顯示的信息。其中的關鍵是如何從PLC的存儲單元中獲得數據。下面給出了兩種方案。
1.1 PFOFIBUS方案
有些S7300PLC的CPU模塊上帶有DP接口[3],因此可開發出DP從節點直接與PLC進行通信,而且DP通信擁有較快的數據傳輸速度、較長的通信距離和可靠性[4]。……