基于ARM9嵌入式微处理器
的远程仓库管理系统
摘 要
仓库管理是物流当中的一个重要环节,也在企业的整个管理流程中起着非常重要的作用,如果不能保证及时准确的进货、库存控制和发货,将会给企业带来巨大损失,这不仅表现为企业各项管理费用的增加,而且会导致客户服务质量难以得到保证,最终影响企业的市场竞争力.传统的人工仓库作业模式和数据采集方式早已不能满足仓库管理的快速、准确要求,因此,在20世纪70年代,通用计算机开始应用到仓库管理上,它带来了仓库管理的一次革命,但随之也带来了新的问题:建设成本巨高,后期维护量大,硬件系统不可靠。随着嵌入式技术的发展,人们似乎又找到了更加适合用于仓库管理的系统。嵌入式系统以体积小,功耗低,运算能力强等优点著称,它一般被设计成某一场合专用的系统。本文设计的远程仓库管理系统,客户机是以运行Windows CE操作系统的手持式设备,服务器采用运行Windows Server 2003的PC机。客户机的硬件平台以ARM9(S3C2410)微处理器作为核心,通过以太网与服务器建立连接组成一个远程仓库管理系统。该系统可以实现到货检验、入库、出库、调拨、移库、库存盘点等各个作业环节。
关键词:远程仓库管理系统,嵌入式系统,ARM9微处理器,Windows CE.net
i
ABSTRACT
Warehouse management system take an important part in labour exchange , but also the entire business process management plays an important role, if it can not guarantee timely and accurate purchasing, inventory control and shipping, will be a great loss to businesses, not only the performance of the management costs for enterprises increases, and customer service quality will lead to difficult to be assured that the ultimate impact of the market competitiveness of enterprises. Traditional artificial storage and data acquisition mode of operation has long warehouse management can not meet the rapid and accurate request, therefore, in the 20th century, 70's, began to apply general-purpose computers, warehouse management, warehouse management which has brought a revolution, but with the it has also brought new problems: the construction of huge high-cost, post-maintenance, and unreliable hardware. With the development of embedded technology, there seems to have found a more suitable system for warehouse management. Embedded systems are small, low power consumption, computing power, said the strong advantages, it is generally designed as a forum dedicated system. In this paper, the design of a remote warehouse management system, client operating system is running Windows CE handheld devices, servers running Windows Server 2003 using the PC. Client hardware platform as a core ARM9 microprocessors, servers via Ethernet to connect a remote warehouse management system. The system enables delivery inspection, storage, a library, allocate, transfer database, inventory and other operational aspects of inventory.
Key words:Remote Warehouse Management System,Embedded System,ARM9 Device,Windows CE.net
ii
目 录
第1章 绪论 .................................................................................................................. 1
1.1
1.2 1.3 2.1 2.2
仓库管理系统的概述 .............................................................................................. 1 仓库管理系统研究背景与意义 .............................................................................. 1 国内外同类软件的研究现状与发展趋势 ............................................................... 2
第2章 需求分析 .......................................................................................................... 3
设计目标 .................................................................................................................. 3 需求描述 ................................................................................ 错误!未定义书签。 2.2.1 功能需求 ........................................................................ 错误!未定义书签。 2.2.2 数据需求 ........................................................................ 错误!未定义书签。 2.3 可行性分析 ............................................................................ 错误!未定义书签。
2.3.1 远程数据库系统原理可行性分析 ................................................................... 5 2.3.2 硬件平台的选择 ............................................................ 错误!未定义书签。
第3章 系统分析 ........................................................................错误!未定义书签。
3.1 3.2
整体硬件连接图 .................................................................... 错误!未定义书签。 服务器软件环境分析 .............................................................................................. 6 3.2.1 SQL Server Mobile 服务器代理 ..................................................................... 6 3.2.2 IIS 6.0 的应用 ................................................................ 错误!未定义书签。 3.2.3 Microsoft? SQL Server? 2000简介 .............................................................. 7 3.3 客户端软件环境分析 .............................................................................................. 8
3.3.1 SQL Server Mobile 客户端代理 ..................................................................... 8 3.3.2 ADO.NET的应用 ............................................................................................ 8 3.3.3 客户端环境的操作系统定制......................................... 错误!未定义书签。
第4章 服务器的实现 ................................................................................................ 11
4.1
配置IIS 服务对SQL Server Mobile 3.0 的支持 ................................................ 11 4.1.1 配置服务器网络 ............................................................................................ 11 4.1.2 创建共享文件夹 ............................................................................................ 12 4.1.3 配置SQL Server Mobile Web 同步向导 ...................................................... 12 4.2 重新注册SQL Server ............................................................................................. 14
第5章 客户端硬件设计 ............................................................................................ 16
5.1 5.2 5.3
MagicARM2410教学实验开发平台概述 ............................................................ 16 核心控制电路 ........................................................................................................ 17 存储器电路 ............................................................................................................ 19 5.3.1 NOR Flash存储器 ......................................................................................... 19 5.3.2 SDRAM存储器 ............................................................................................. 20 5.3.3 NAND Flash存储器 ...................................................................................... 21 5.4 时钟电路 ................................................................................................................ 22 5.5 复位电路 ................................................................................................................ 22
1
5.6 5.7 5.8 5.9 6.1 6.2 6.3 6.4
电源电路 ................................................................................................................ 23 以太网接口电路 .................................................................................................... 23 JTAG调试接口电路 .............................................................................................. 25 电源模块 ................................................................................................................ 26
第6章 客户端软件设计 ............................................................................................ 27
客户端软件功能模块 ............................................................................................ 27
程序流程图 ............................................................................................................ 28 客户机界面 ............................................................................................................ 46 串口通信模块 ........................................................................ 错误!未定义书签。 6.4.1 接口电路设计 ................................................................................................ 29 6.4.2 串口API函数使用 ........................................................................................ 30 6.4.3 VB.net调用DLL文件 .................................................................................. 34 6.4.4 打印机驱动模块 ............................................................................................ 35 6.5 本地数据库的访问 ................................................................................................ 36
6.5.1 创建和组装本地数据库................................................................................. 36 6.5.2 与目标数据库建立连接................................................................................. 37 6.5.3 对记录集的添加、删除、查找和修改 ......................................................... 38 6.6 远程数据库的访问 ................................................................................................ 42
6.6.1 数据库的同步合并 ........................................................................................ 44 6.6.2 向服务器申请或提交数据............................................................................. 45
参考文献 ...................................................................................................................... 49
附录A 打印机指令封装模块代码 ............................................................................ 50
2