In the special industry of coal production, miners have to work in the ultradeep mines on a daily basis, where there is little oxygen and yet full of toxic gases. As a result, it is likely to cause a lot of hidden dangers. For example, hypoxia or inhalation of toxic gases can not only make personnel fainted, but also cause explosion becasue of combustible gases. In order to deal with such a problem, the airblowers of colliery, the ventilation equipment, play an important role. The running air blowers put fresh air into mines on the one hand and expels toxic flammable and explosive gases on the other. Therefore, it can effectively guarantee the safety production activities for the mining personnel.Whether the air blowers of Colliery is in a sound operation or not is crucial to the security of safety production of the coal mine enterprise. Nowadays the common practice of maintaining air blowers is follow-up service in China. In other words, the operating status of air blower instruments will be checked out regularly. If there being a problem, servicemen will be informed to repair them. This method can directly find out the conditions, however, some insufficiency still exists. Firstly, the inspectors should be highly qualified; secondly, it needs frequent checking-out, which increases the workload significantly. Third, it’s not easy to find faults in the initial stage. Once found out, they might have led to severe consequences. Therefore, plenty of time and money would be invested to repair the faults.This thesis introduces a new method to monitor the air blowers of colliery. It makes use of embedded system and internet technology for real-time and online monitoring the operational status of air blowers of colliery. The personnel do not need to visit the unpleasant working sites for data sampling, instead in the control center, they just sit in front of the computer to dynamically monitor the running status.The entire online monitoring system can be divided into two parts; one being the upper computer, which can clearly show the running status of instruments through the monitoring software running on computer based on windows system; the other being the lower computer, which is a transmission gateway and collection terminal based on embedded-architecture in order to sample data from the air blower instruments timing and meanwhile, upload to server side for analysis. Transmission gateway is used by data transmission and collection terminal for data collection. This thesis has mainly focused on the design and implementation of gateway layer of lower computer in online monitoring system. It is developed with μC/OS-Ⅱ and running on embedded chips. On the one hand, it can get real-time data fom ai blowers of colliery through RS485 industry bus; on the other, it can implement data exchange with upper computer in the control center through Ethernet.This gateway system is composed of the underlying framework and the high-level application:1. The underlying framework contains μC/OS-Ⅱ(an embedded operation system), light embedded TCP/IP network protocol stack, and FatFs(a small file system).ect. All these components provide powerful technical methods for multi-task processing and high-speed transmission through Ethernet. In addition, taken into consideration the version maintenance in the practical application, this system has designed and implemented a BootLoader, an easily useable update program.2. The high-level application can complete the following 6 tasks:1) Watchdog task: to monitor if the other tasks are still alive or not. If yes then restart the task. If the watchdog task is broken, the entire gateway system will reset automatically.2) Sample task: to get running status data of air blowers from sampler.3) Auto-upload task: to auto-upload data to the server at a fixed time. If the network is abnormal, the data will be saved into SD card.4) Data-restoring task: to upload data from SD card to the server when the network comes to the normal state.5) Passive-reply task: to reply the query index from the server6) Alarm data uploading task: to upload alarm data to the server... |