• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2011, Vol. 33 ›› Issue (7): 167-171.

• 论文 • 上一篇    下一篇

集中控制型预付式保管箱系统的设计与实现

宋志强1,2,山磊3   

  1. (1.南京大学工程管理学院控制与系统工程系,江苏 南京 210093;
    2.苏州经贸职业技术学院信息系,江苏 苏州 215009;
    3.苏州孔雀电子有限公司,江苏 苏州 215001)
  • 收稿日期:2010-09-10 修回日期:2010-12-15 出版日期:2011-07-21 发布日期:2011-07-25
  • 作者简介:宋志强(1977),男,江苏张家港人,博士生,讲师,研究方向为计算机管理、控制综合系统和集散控制系统。山磊(1985),男,江苏徐州人,助理工程师,研究方向为计算机应用技术。

Design and Implementation of a Prepayment  Safe System Based on Centralized Control

SONG Zhiqiang1,2,SHAN Lei3   

  1. (1.Department of Control and  System Engineering,
    School of Management and Engineering,Nanjing University,Nanjing 210093;
    2.Department of Information,Suzhou Institute of Trade and Commerce,Suzhou 215009;
    3.Suzhou Peacock Electronics Co., Ltd, Suzhou 215001,China)
  • Received:2010-09-10 Revised:2010-12-15 Online:2011-07-21 Published:2011-07-25

摘要:

本文设计并实现了一种集中控制型预付式保管箱系统,系统由工控机、硬币机、纸币机、下位机、电源等组成。主机由工控机代替了传统的单片机和液晶屏构成的系统,实现了与下位机相关的通信协议,分析了与纸币机相关的通信协议以及软件开发中的编程要点,主机软件采用C++ Builder 6 开发,实现了快速开发。数据库采用InterBase 6.5,相比SQL Server、Oracle等大型数据库,降低了系统的成本。重点介绍了用户界面、通信、系统设置、信息记录、广告等模块。为保证系统找零的准确性,提出了基于本系统的找零算法。通过用户实际应用,验证了所设计的系统是稳定且可靠的,能满足用户需求。

关键词: 预付式保管箱, RS485, 通信协议, 软件设计, 找零问题

Abstract:

A prepayment safe system based on centralized control is designed and implemented. The system consists of industrial personal computer, coin acceptor, bill acceptor, slave computer, power, etc. The structure diagram is given, the industrial personal computer instead of the system of microchip and LCD is the host, a communication protocol relevant to slave computer is realized, and communication protocol relevant to bill acceptor, as well as the key points of programming in software development is analyzed. The host software is programmed and rapidly developed by using C++ Builder 6. The system uses InterBase 6.5 as its database and it has lower cost compared with largescale databases such as SQL Server and Oracle. The modules of user interface, communication, system set, information record, advertisement are introduced in detail. To assure the accuracy for the  changemaking, an algorithm of changemaking problem based on this system is put forward. Through actual application, the stability and reliability of the system are proved, and the user demands are also met.

Key words: prepayment safe;RS485;communication protocol;software design;changemaking problem