李伟 0707050213 毕业论文(8)

2019-05-26 23:58

哈尔滨理工大学学士学位论文

II. SYSTEM ARCHITECTURE DESIGN

There are 50 sorting positions in our system. As a distribution unit, each position corresponds to a cigarette brand. The RF tag is attached to a tray, which has a unique ID to descript some information of cigarette in details. When the tray moves to a sorting position, RF antenna reads RF tags and collects information to display on LCD. The worker then supplies the cigarettes under the guidance of LCD.

The system is composed of the upper machine and lower machine. In upper machine system, MCGS configuration software configures the CANBUS devices, RFID readers and PLC etc. MCGS is a kind of general software for industrial process control and real-time monitoring service, characterized by improved functions, easy to operate and good visualization[5]. RFID readers retrieve the information from the RF tag by antenna array near the conveyer. RFID middleware/driver completes the data processing and sends data to MCGS monitoring platform. ZLG_PCI9810 intelligent CAN card with standard PCI interface, implementing CAN2.0B protocol, establishes the connections with MCGS configuration software by ZOPC_Server (Based on CAN-BUS general OPC Server)[6]. ZOPC_Server is a kind of OPC server that supports all kinds of ZLG CAN cards. Any client (e.g. KingView, MCGS, Intouch, etc ) that supports OPC protocol can connect ZOPC_Server. It is a bridge that implements the data transmission between CAN card and configuration software.

Lower machine system is constituted of CAN intelligent nodes and LCD touch screens. CAN intelligent nodes receive the tag data from CAN bus and display it on LCD. The workers check against and send commands by touching LCD screen. System architecture is shown in Fig.1.

- 32 -

哈尔滨理工大学学士学位论文

Figure 1 System architecture

III DESIGN OF SOFTWARE

A. Communication protocol

The CAN specification consists of two parts, CAN 2.0Aand CAN2.0B. Stand-alone CAN controller SJA1000 supports both protocols. CAN2.0B provides more powerful error handling capabilities, enhanced acceptance filter and flexible handling of data package. CAN2.0B includes two different frames: standard frame and extendedframe[7]. The former is defined by 11 identifier bits and the latter is defined by 29 identifier bits. Extended frame is 2 bytes more than standard frame, so it will advantage the flexibility of protocol, reliability as well as expansion.

As data needs to be sent from the corresponding antenna to the corresponding work position, the allocation of 29 identifier bits is most important. Identifier can only identify the network equipment and it’s location in the CAN bus.

On the requirements of our communication, we design the protocol below, and each node in the CAN bus transmits information according to the protocol. The protocol is defined as “ID + commands + data”. ID is the identifier of the network nodes, defined as ID18-ID0 (19 bits). ID28 is for direction (DIR), ID27-ID24 identifies RFID readers, ID23-ID22 identifies antenna, ID21-ID19 identifies data type.ID28-ID19 doesn’t participate in the acceptance filter. Data

- 33 -

哈尔滨理工大学学士学位论文

indicates the specific content of communications. The frame format of protocol is shown in Table 1.

TABLE I. THE FRAME FORMAT OF COMMUNICATION PROTOCOLS

ID28 DIR DLC3 ID27-ID24 RFIDReader DLC2 DLC1 Datalength Data5 Data4 DLC0 Data3 Data2 Data1 Antenna DataType Address 0(dataframe) Data0 ID23-ID22 ID21-ID19 ID18-ID0 RTR Data7 Data6 Dataframe(8Bytes) ◎ DIR: DIR decides a half of message priority during bus access, and the remaining priority is defined by nodes address. The lower address has higher priority. When DIR is “1”, address field is target node address (from master to slaver); when DIR is “0”, address field is source node address (from slaver to master).

◎RFID Reader/ Antenna: Each Sense1824 reader equips 4 antennas. There are about 13 readers in our system. So 4 bits is used to identify RFID readers and 2 bits is used to identify antennas.

◎Data Type: The format of data type is shown in Table 2 .

TABLE 2. FUNCTIONAL DEFINITION OF DATA TYPE

Bit 2 0 0 0 1 1 Bit 1 0 1 1 0 1 Bit 0 1 0 1 0 1 Description Name of cigarette Number of cigarette distributing destination Request retransmission when an error occurred (slaver node) Finished signature ◎Address: ID18-ID0 participates in the acceptance filter, which identifies 50 working positions.

- 34 -

哈尔滨理工大学学士学位论文

◎DLC: Data length (1-8). ◎Data: the contents of packages.

B. Development of RFID reader’s driver

MCGS implements the device driver by Active DLL, integrating with the standard OLE interface. Because the device driver and MCGS are running in the same process, the device module achieves the good running and higher reliability, and avoids sluggish data flow and transmission by DDE (Dynamic Data Exchange). Meanwhile, OLE is an expandable standard for achieving interoperability, regardless of what programming language is. Therefore, so long as it compliances with the standard of MCGS interface, VB, VC, Delphi, etc. can implement MCGS device driver.

MCGS divides the actual equipment into 3 parts: independent equipment, father equipment and son equipment. Independent equipment works independently and accomplishes specific data I/O functions; father equipment itself doesn’t handle data I/O, but manages other equipment, such as serial equipment, IDCN-893 communication card, etc; son equipment has the function of handling data I/O, but works depending on corresponding father equipment . RFID reader, Sense-1824, as a son equipment, communicates with MCGS configuration software through the serial communication father equipment.

Our main work focuses on the operating the serial port when developing the RFID reader driver. MCGS encapsules the complex serial port setup, initialization and operation of reading/writing into the serial communication father equipment, therefore, we can evoke standard serial functions provided by father equipment to develop the son equipment driver.

The flow chat that RFID reader collects more tags data is given in Fig. 2. The API functions are described as follows: ScsAntennaReceive:Select a receiving antenna. ScsAntennaTransmit:Select a sending antenna.

- 35 -

哈尔滨理工大学学士学位论文

SaharaListStart:Start the reading tag process. SaharaListReport:Get tag’s data from readers. SaharaListEnd :End the read tag process and turn microwave power off.

Figure 2 RFID reader flow chat

C. The interface of upper machine software

Upper machine software has been implemented by MCGS 5.5, Visual Basic 6.0 and SQL Server2000. The interface of upper machine software is shown in fig. 3. It consists of equipment driver module, data access module, data analysis and processing module, front monitor module and database module. MCGS configuration software manages hardware, schedule processing and also controls the data stream. Depending on the abundant resources of MCGS, some complex functions, such as statistics, reports and phonic warning, etc. can be easily achieved.

- 36 -


李伟 0707050213 毕业论文(8).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:大学生创业计划书 e时代网络公司

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: