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 虚拟仪器的演变与发展 1
1.2 虚拟仪器的构成 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 稳定性与完善程度 4
2.1.4 可移植性 4
2.1.5 调试 4
2.2 平台选择 5
第 3 章 虚拟邮资计价秤界面设计 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 数码管的制作 11
第 4 章 编程实现 12
4.1 PC机与称重模块的串行通讯协议 12
4.2 串口流程与MSComm控件 14
4.3 串口程序实现 16
4.3.1 初始化程序 16
4.3.2 向单片机发送命令 16
4.3.3 接受单片机发送的数据 16
4.4 界面显示实现 17
第 5 章 总 结 21
致 谢 22
参考文献 23
附 件 24