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加入嵌入式視覺聯盟
主站蜘蛛池模板: 91毛片网| 国产精品页| 欧美福利在线观看| 97国产精品视频自在拍| 日韩中文精品亚洲第三区| 国模视频一区二区| 国产主播喷水| 午夜一区二区三区| 天天综合网色| 亚洲国内精品自在自线官| 国产成人精品2021欧美日韩| 91视频区| 国产毛片高清一级国语| 国产91小视频| 最新午夜男女福利片视频| 超碰免费91| 亚洲—日韩aV在线| 亚洲一区第一页| 亚洲人视频在线观看| 亚洲欧美成人在线视频| 中国特黄美女一级视频| 精品一区二区无码av| 国产丰满大乳无码免费播放| 成人久久精品一区二区三区 | 亚洲第一成年人网站| 国产精品久久自在自线观看| 中国丰满人妻无码束缚啪啪| 亚洲 欧美 偷自乱 图片 | 四虎永久在线| 波多野结衣一区二区三区四区视频| 国产好痛疼轻点好爽的视频| 久久福利片| 亚洲第一黄色网址| 99久久精品免费看国产免费软件 | 美女免费黄网站| 91精品啪在线观看国产| 欧洲亚洲一区| 久久久久久久久久国产精品| 亚洲 欧美 日韩综合一区| 久久精品国产亚洲麻豆| 国产原创演绎剧情有字幕的| 欧美日本视频在线观看| 亚洲人成在线精品| 欧美a级在线| 丝袜美女被出水视频一区| 国产草草影院18成年视频| 久久精品无码中文字幕| 日韩天堂网| 天天综合网色| 亚洲无码在线午夜电影| 久久亚洲国产最新网站| 久青草网站| 性视频久久| 精品人妻AV区| 欧美一级一级做性视频| 亚洲日韩图片专区第1页| 色噜噜综合网| 在线国产91| 欧美专区日韩专区| 国产精品自在线天天看片| 欧美一级夜夜爽| 欧美中文字幕在线视频| 国产乱子伦手机在线| 亚洲成a人片7777| 97久久人人超碰国产精品| 色综合a怡红院怡红院首页| 欧美亚洲国产视频| 欧美亚洲欧美| 国产一国产一有一级毛片视频| 综合色在线| 国产精品专区第1页| 九九九精品成人免费视频7| 日本高清免费不卡视频| 99re视频在线| 日本道综合一本久久久88| 日本人妻丰满熟妇区| 黄网站欧美内射| 精品久久777| 女人av社区男人的天堂| 国产在线小视频| 波多野结衣的av一区二区三区| 97国产精品视频自在拍|