摘要喷码机行业,对于大部分人而言十分陌生,尤其是国内的喷码机行业,也处于起步的年轻阶段。但我们的日常生活,每时每刻都在接触使用这种设备的商品。喷码机的主要作用,是给用户打印日期,规格等在产品表面的标识。比如,各种饮料,食品的生产日期,鸡蛋上的标识等。随着计算机技术的日益成熟,喷码机行业也和计算机实现接轨,连接主要依靠串口通讯。
本文的主要内容是,介绍了如何在windows系统下,设计喷码机上位机程序。在设置了合适的波特率,串口,奇偶校验等数据,使用特有的通讯协议之后,计算机就可以与喷码机相连接,这时候计算机就变成了对下位机发出操控命令的上位机。而在计算机上开发喷码机上位机界面的软件,则使用Qt Creator,数据库需要用到SQlite3,编译环境使用mingw32。使用QT设计上位机,界面简洁漂亮,可以跨平台,并且代码是基于c语言进行改动。 81441
毕业论文关键词: QT;信号与槽;串口通讯;SQlite;
Program design of inkjet printer
Abstract The industry of inkjet,is very strange for most people, especially in China, also at the beginning of the young stage。 But our daily life, all the time in contact with the use of such equipment products。 The printer is mainly used by the user to print the product surface date, specifications and other logo, such as the date of production on the beverage bottle, egg printed on the logo and so on。 With the growing maturity of computer technology, inkjet,industry and computer to achieve convergence, the connection relies mainly on serial communication。 This article mainly introduced in the windows under the inkjet printer host computer program design。 In the set the appropriate baud rate, serial port, parity and other data, after using the unique communication protocol, the computer can be connected with the printer。 At this time the computer will become the host computer, issued a control command on the lower computer。 And in the computer to develop inkjet host computer interface software, use Qt Creator, the database needs to use SQlite3, compile environment using mingw32。 Use QT to design the host computer, the interface is simple and beautiful, can cross platform, and the code is based on the c language to make changes。
Keywords: QT; Signals and slots ; serial port; SQlite
目录
1 绪论 1
1。1 选题背景与意义 1
1。3 论文主要工作和安排 3
2 串口通讯与数据库 4
2。1 串口编程概述 4
2。2 基于QT的串口编程 5
2。3 SQlite的特点和结构 6
2。3。1 SQlite的特点 6
2。3。2 SQlite的结构 6
2。4 SQlite在QT中的应用 7
3 QT中的信号与槽 9
3。1 QT中的信号