999精品在线视频,手机成人午夜在线视频,久久不卡国产精品无码,中日无码在线观看,成人av手机在线观看,日韩精品亚洲一区中文字幕,亚洲av无码人妻,四虎国产在线观看 ?

Research and Design of Embedded Serial Device Server on the DNC System

2013-12-07 07:33:19QUBaojunGUOChao
機床與液壓 2013年1期
關鍵詞:嵌入式系統設計

QU Baojun,GUO Chao

School of Mechanical Engineering, Shandong University of Technology, Zibo 255049, China

ResearchandDesignofEmbeddedSerialDeviceServerontheDNCSystem

QU Baojun*,GUO Chao

SchoolofMechanicalEngineering,ShandongUniversityofTechnology,Zibo255049,China

ThispaperdiscussedthesoftwareandhardwaredesignmethodsofEmbeddedSerialDeviceServerontheDNCSystem,andpresentedasortofruletotransmissionlineforNCprogramadaptedtoDNCsysteminthefaceofasetofquestionsaboutNCmachiningadoptedwithgeneralserialdeviceserver.IthasbeenresearchedindetailsaboutthearchitectureandkerneloftheEmbeddedSerialDeviceServerandputforwardthedetailmethodofachievingmultitaskkernel.

serialdeviceserver,DNCsystem,μC/OS-II,ethernet

With the development of computer technology, modern communication technology and advanced manufacturing technology, the DNC (distributed numerical control ) has become a typical form of workshop information integration, which uses a computer or network to achieve the integrated control on multiple CNC machine tools, including NC program transfer, machine condition monitoring, tool management, and production scheduling[1-3].

Serial device server is a protocol converter for RS232/RS485 and TCP/IP, which provides transparent data transfer between RS232/RS485 and the network. This paper mainly researched and developed the embedded serial device server dedicated to the DNC system.

1.The transmission mechanism of the serial server

DNC system can accomplish the transmission of manufacturing data and monitoring of machine condition, while the computer is the storage system of the manufacturing data and status information. Under the actual production conditions, the computer generally does not need real-time control on the CNC machine tool, just needs to monitor the running state of the machine tool. Only in the condition that the NC program is being transmitted while the workpiece is being machined, the DNC system is particularly strict with the real-time control. Thus, it requires the serial port server which connects to the CNC machine tools to maintain a certain amount of data buffering constantly. In the long workpiece process, whether the data can be received timely by machine or not relates to the amount of data buffering. If the data can not be received continuously, it will result in data underrun; If the amount of data buffering is too small, the data received will be lost, resulting in data overload. Therefore, only when the receiving speed and the sending speed of the serial server match, the data buffering can be maintained at a reasonable level. The mechanism of the data transmission is to establish reasonable rules for sending and receiving data, so as to control the amount of data buffering.

Therefore, as shown in Fig.1, the process that the NC program is sent to the CNC machine by DNC server can be divided into two stages.

First is that the NC program is sent from the DNC server to the serial device server, and then we must consider how to match the data transmission speed. The solution is to provide a data buffer queue in the serial server to decide whether to send the requested information by determining the size of the data queue. In accordance with the requirements of the NC machining, the maximum data buffering can be set to 10 KB. However, the agreed value of the data buffering is set to 5 KB. When the queue size is less than 5 KB, it will request the network to continue to send data.

Fig.1 The transmission procedure of the NC program sending line

Second is that the NC program is sent from the serial device server to the CNC machine, and then we must guarantee that the CNC machine can correctly receive data. The solution is to adopt handshake protocol for serial transmission between the serial device server and CNC machine.

When using the remote control to achieve that the CNC machines send the NC program containing command information to the DNC server, TCP is a reliable stream end-to-end protocol, and the network bandwidth is up to 10/100 Mbps, so the timeliness and definiteness of the NC program can be satisfied, and therefore the NC program can be transmitted directly. There is no need for data buffering. And M30 can be adopted as the end instruction of the program, indicating the end of a CNC file transmission.

2.The hardware structure of the serial device server

The essence of the serial device server is a converter of TCP/IP and RS232[4], its internal structure is shown in Fig.2. It accesses to the workshop LAN upward, adopting RJ-45 connector form, whose communication medium is a non-shielded twisted pair. It connects to the CNC machine having the RS232 serial port downward and serial device server can be installed as a part of the CNC machine on the CNC machine.

The serial server CPU adopts processor LPC2210, which is based on 16/32 bit ARM7TDMI RISC core. Then it uses LPC2210 and the network physical layer chip RTL8201BL as the core to complete the peripheral hardware circuit design work, which is used as a basis to select the hardware development platform.

LPC2210 itself doesn’t own FLASH, the system selects the 4Mbit FLASH (SST39VF160) to save the TCP/IP protocol stack and other programs, and selects the 16Mbit SRAM (IS61LV2561611L) as the memory to meet the requirements of the μC/OS-II embedded operating system and the memory block copy operation of the communication controller.

Fig.2 The hardware structure of the serial server

3.The software structure of the serial server

3.1.Multitaskingkerneldesignforserialservers

The serial server kernel is the key to realize DNC communication system based on Ethernet. It mainly have two functions: First, the serial server receives the NC programs sent by DNC servers from the network, meanwhile, it sends them to the CNC machine through the serial port; Second, the serial server receives the NC programs or the commands sent by the CNC machine from the serial port, meanwhile, it sends them to the DNC server over the network.

μC/OS-II is a priority-based preemptive multitasking real-time operating system. According to the requirements of the data transfer mechanism of the DNC system, this paper uses the μC/OS-II multitasking kernel to achieve the functions of the serial port server by assigning them to five tasks[5].

Among them, task 1 is used to receive data from the network; Task 2 is used to receive data from the CNC machine; Task 3 is used to send data to the network; Task 4 is used to send data to the CNC machine, and when the data transfer is completed, it will send a confirmation message to the task 5. Finally, task 5 judges whether confirmation message is received or not; If received, it requests the network to continue to send data. When the NC program is being transmitted when the workpiece is being machined, the requirements for real-time are strict. Therefore, as to the task priority, task 4 is set as the highest level, followed by task 1.

Shared variables and non-reentrant functions exist in each task, so semaphores in the μC/OS-II needs to be used to control the right of use of the shared resources, to mark the occurrence of a time, and to make the behaviors of the two tasks synchronous. Through the use of semaphores to promise multi-tasks to run, only the task having applied to the semaphore can run. When the serial server is multitasking running, semaphores used by it are as follows:

OS_EVENT *SerialRecvFlag;

/*Semaphore marking serial data is readable.*/

OS_EVENT *NetSendFlag;

/*Semaphore marking network can send data.*/

OS_EVENT *ShareVarbFlag;

/*Semaphore marking shared variables can be used.*/

OS_EVENT *ReqireSendFlag;

/*Semaphore marking request for sending data is available.*/

There are three steps in implementing the semaphores:

1.OSSemCreate(); /*Initialization*/

2.OSSemPend(); /*Waiting for signal*/

3.OSSemPost(); /*Sending signal*/

3.2.Thedesignofnetworkcommunicationprogramforserialserver

As the server-side of TCP/IP, serial server achieves the network connection with the DNC server. Through DNC server polling the serial port server, the NC programs or commands are transmitted between the client and the serial port server up and down. The data buffering adopts data queue to balance the problems of transmission speed matching between the serial server and the CNC machine. The correlation functions are as follows:

#define UART1_SEND_QUEUE_LENGTH 1024*10

/*The maximum data buffering is 10K*/

uint8 UART1SendBuf[(UART1_SEND_QUEUE_LENGTH + sizeof(int)-1)/ sizeof(int)];

QueueCreate((void*)UART1SendBuf,sizeof(UART1SendBuf), NULL, NULL)/*Creating a queue*/

QueueWrite((void *)UART1SendBuf, tempdata[i]);

/*Sending data into the queue*/

QueueRead(&temp,UART1SendBuf);

/*Acquiring data in the queue*/

The network communication program mainly completes the two tasks of receiving and outputting network data. The flow chart of the task of receiving network data is shown in Fig.3, the serial server receives data from the network, then processes data separately depending on the type of data.

3.3.Serialportcommunicationprogramdesignforserialserver

The serial communication of serial port server achieves the communication between the serial port server and the CNC machine, which completes the two tasks of receiving and outputting data of the serial port. Although there are many types of CNC machines, most of them support communication protocols of XON/XOFF and RTS/CTS, and serial device server supports these two communication protocols as well. The choices of the parameters related to communication, such as baud rate, parity, data bit and stop bit, are initialized in the network communication program.

Fig.3 The data flow diagram of the receiving network

4.Conclusions

This article developed a single serial port server based on the embedded system, which connects with the CNC machine FANUC0i downward, the DNC system upward. Through a series of tests, the result shown the rationality and applicability of the dedicated serial port server in the DNC system, especially in the demanding real-time process that the NC program is being transmitted as the workpiece is being machined, the machine downtime caused by data underload or overload doesn’t occur. However, in a long process, because the transmission speed does not match, the universal serial device server previously used often leads to the machine abnormity, and sometimes results in the automatic reset of the serial device server. So this article proves that the dedicated serial device server has a good real-time, stability and robustness.

[1] ZHANG Xumei,LIU Fei. Research of the workshop operation mode based on the integrated DNC technology[J]. Chinese Mechanical Engineering,1999,10(3):97-101.

[2] XIONG Bin. Theoretical discussion of the agile DNC system[J].Computer Integrated Manufacturing System,1999,5(6):1-6,25.

[3] Wainwright C R,Harrison D K,Leonard R.CAD/CAM and DNC links as a strategy formanufacture: implications for CAPM[J].Computing & Control Engineering Journal,1992(3):82-87.

[4] YAN Weiguo,WANG Minjie,WANG Minrui. Research of the Ethernet communication technology based on Ethernet and TCP/IP[J]. Journal of Da Lian University of Technology,2003,43(1):77-81.

[5] Jean J. Labrosse. μC/OS-II-Open source real-time embedded operating system[M].Bei Jing:China electric power press,2001.

DNC系統嵌入式串口服務器的研究與開發

曲寶軍*,郭 超

山東理工大學 機械工程學院,山東 淄博 255049

針對當前使用的通用串口服務器在數控加工中出現的一些問題,提出了適用于DNC系統的數據傳輸機制,并論述了一種專用于DNC系統的嵌入式串口服務器的軟、硬件設計方法。研究了串口服務器的體系結構以及內核設計,提出了多任務內核的具體實現方法。

串口服務器;DNC系統;μC/OS-II;以太網

TP23

2013-01-09

*QU Baojun. E-mail:qbj22@sina.com

10.3969/j.issn.1001-3881.2013.06.007

猜你喜歡
嵌入式系統設計
Smartflower POP 一體式光伏系統
工業設計(2022年8期)2022-09-09 07:43:20
WJ-700無人機系統
ZC系列無人機遙感系統
北京測繪(2020年12期)2020-12-29 01:33:58
瞞天過海——仿生設計萌到家
藝術啟蒙(2018年7期)2018-08-23 09:14:18
搭建基于Qt的嵌入式開發平臺
連通與提升系統的最后一塊拼圖 Audiolab 傲立 M-DAC mini
設計秀
海峽姐妹(2017年7期)2017-07-31 19:08:17
有種設計叫而專
Coco薇(2017年5期)2017-06-05 08:53:16
嵌入式軟PLC在電鍍生產流程控制系統中的應用
電鍍與環保(2016年3期)2017-01-20 08:15:32
Altera加入嵌入式視覺聯盟
主站蜘蛛池模板: 人妻精品久久无码区| 99中文字幕亚洲一区二区| 九色视频线上播放| 国产麻豆aⅴ精品无码| 国产精品久久久精品三级| 毛片免费观看视频| 国产日韩欧美精品区性色| 国产男女免费视频| 日本三级黄在线观看| 久久成人免费| av性天堂网| 在线精品亚洲一区二区古装| 国产精品免费p区| 国产精品自在线拍国产电影| AV老司机AV天堂| 亚洲最大情网站在线观看| 欧美综合中文字幕久久| 日韩精品免费一线在线观看| 尤物在线观看乱码| 无码中文AⅤ在线观看| 欧美伊人色综合久久天天| 欧美亚洲激情| 色丁丁毛片在线观看| 亚洲精品在线观看91| 女人av社区男人的天堂| 操美女免费网站| 国产区在线观看视频| 99久久精品美女高潮喷水| 亚洲成人高清在线观看| 国产在线高清一级毛片| www中文字幕在线观看| 亚洲欧美日韩另类在线一| 国内a级毛片| 一区二区三区成人| 国产综合精品日本亚洲777| 91免费精品国偷自产在线在线| 国产亚洲精品va在线| 天堂成人av| 欧美日韩一区二区在线免费观看 | 91麻豆精品国产高清在线| 一级成人a做片免费| 亚洲美女操| 婷婷午夜影院| 综合人妻久久一区二区精品 | 国产专区综合另类日韩一区| 国模在线视频一区二区三区| 久久精品波多野结衣| 国产美女叼嘿视频免费看| 四虎精品国产AV二区| 国产又大又粗又猛又爽的视频| 永久免费av网站可以直接看的 | 亚洲欧洲自拍拍偷午夜色无码| 亚洲色偷偷偷鲁综合| 国产精品亚欧美一区二区三区| 2020久久国产综合精品swag| 国产精品人成在线播放| 手机在线国产精品| 男女男免费视频网站国产| 最新亚洲av女人的天堂| 免费国产高清视频| 天天摸夜夜操| 亚洲AV色香蕉一区二区| 动漫精品啪啪一区二区三区| 四虎国产永久在线观看| 国产一区二区三区精品久久呦| 99国产精品国产| 久久99精品久久久久纯品| 国产综合日韩另类一区二区| av大片在线无码免费| 午夜福利视频一区| 五月婷婷精品| 欧美成一级| 国产成人精品在线1区| 久操中文在线| 国产性爱网站| 久久久久久尹人网香蕉| 日韩123欧美字幕| 中文字幕丝袜一区二区| 国产三区二区| 污网站在线观看视频| 人妻91无码色偷偷色噜噜噜| 热这里只有精品国产热门精品|