Abstract
This subject is mainly resounded the programming of suppositional postage pricing scale interface. It elaborates on the background and present situation of virtual device, and makes a brief introduction and compare on the platform of VC and DELPHI. On this basis, it focused on modules include serial communication and the production and loading of controls and digital diode. I perform Serial-communication Module with MSComm control; I make controls and digital diode in the help of Firework, and complete loading and integration of interface under the MFC frame of VC platform.
This programming is on the basis of MFC frame under VC platform, the interface displays 64 controls and digital diode. 18 digital diodes among them separately display the weight, unit price and amount. The status of instrument is indicated by triangular signs. And the data switching between PC machines and weighting module is completed by serial communication.
Keywords: Virtual device; Postage; Pricing Scale; VC
目 錄
摘 要 I
Abstract II
第 1 章 緒 論 1
1.1 虛擬儀器的演變與發(fā)展 1
1.2 虛擬儀器的構(gòu)成 1
1.2.1 硬件部分 2
1.2.2 軟件部分 2
1.2.3 顯示部分 2
第 2 章 編程語言選擇 3
2.1 平臺比較 3
2.1.1 語言 3
2.1.2 編譯和連接 3
2.1.3 穩(wěn)定性與完善程度 4
2.1.4 可移植性 4
2.1.5 調(diào)試 4
2.2 平臺選擇 5
第 3 章 虛擬郵資計價秤界面設(shè)計 6
3.1 界面圖片的制作 6
3.1.1 橡皮擦工具 7
3.1.2 橡皮圖章工具 7
3.1.3 刷子工具 7
3.1.4 選取筐工具與油漆桶工具 8
3.1.5 文本編輯 9
3.1.6 組合路徑 9
3.2 控件的制作 9
3.2.1 白控件的制作 9
3.2.2 紅控件的制作 10
3.2.3 綠控件的制作 10
3.3 數(shù)碼管的制作 11
第 4 章 編程實(shí)現(xiàn) 12
4.1 PC機(jī)與稱重模塊的串行通訊協(xié)議 12
4.2 串口流程與MSComm控件 14
4.3 串口程序?qū)崿F(xiàn) 16
4.3.1 初始化程序 16
4.3.2 向單片機(jī)發(fā)送命令 16
4.3.3 接受單片機(jī)發(fā)送的數(shù)據(jù) 16
4.4 界面顯示實(shí)現(xiàn) 17
第 5 章 總 結(jié) 21
致 謝 22
參考文獻(xiàn) 23
附 件 24