基于MC9S12XDP512的液压支架电液控制系统端头控制器的开发.pdf
万方数据 万方数据 摘 要 I 基于 MC9S12XDP512 的液压支架电液控制系统端头控制器的开发 摘 要 本课题是国家国际科技合作专项项目“无人值守工作面液压支架电液 控制系统的研制”(项目编号2013DFA70750)和山西省科技重大专项项 目“全自动国产无人综采工作面技术装备研发” (项目编号20111101024) 的重要组成部分。本课题以开发一套运行可靠、安全性高、自动化程度高、 操作方便的液压支架端头控制器集中控制系统为目标,设计了基于 MC9S12XDP512 单片机的端头控制器,与防爆计算机、支架控制器组成了 具有 3 层网络结构的液压支架控制系统,实现了综采工作面液压支架的自 动控制、支架状态实时监测、系统参数在线修改、程序在线升级、集中控 制系统热备份等功能。本文的主要研究内容如下 通过查阅国内外液压支架控制系统的相关文献,分析了国内外研究现 状,并多次对煤矿井下综采工作面进行实地考察,了解了当前我国煤矿的 生产实际以及工作现场对液压支架控制系统的实际需求,由此确定了由防 爆计算机、端头控制器和支架控制器组成具有 3 层网络结构的液压支架控 制系统,并明确了本文的研究对象端头控制器的功能要求和性能指标。 基于 RS485/Modbus 通讯总线设计了端头控制器的通讯系统, 并就液压 支架的动作控制提出了 3 种控制模式,分别为就地控制模式、远程控制模 式和集中控制模式;设计了系统参数设置方案,提高了液压支架电液控制 系统对煤矿复杂工况环境的适应能力;设计了基于 IAP 技术的程序在线升 级方案,并增加 XRAM 储存校验环节,提供了一种稳定、快速的系统程序 升级方案;设计了基于端头控制器的集中控制系统热备份方案,在主端头 控制器或是通讯电缆出现故障后可以进行相应的工作模式切换,保证了综 采工作面生产的连续性。 针对端头控制器的功能要求和煤矿井下的特殊环境,设计了基于 MC9S12XDP512 单片机的端头控制器硬件电路,包括最小系统电路、矩阵 键盘电路、LCD 显示电路、RS485 通讯电路、声光报警电路、XRAM 储存 电路。根据硬件电路原理图设计了 PCB 电路板并完成了样机制作,然后对 硬件电路进行了功能测试,并通过热老化试验排除了硬件电路焊接不良、 电子元器件参数不匹配、温漂等一些初期问题,提高了电路板的稳定性。 接着对整机进行了 EMC 电磁干扰试验, 测试结果表明端头控制器具有良好 的抗电磁干扰能力。 万方数据 太原理工大学硕士研究生学位论文 II 基于 CodeWarrior IDE 软件开发平台,设计了端头控制器的软件,根据 系统功能的特点确定了基于中断模式的软件总体结构,然后进行了总线时 钟、运行监视、中断资源等软件配置,并采用模块化的设计理念编写了端 头控制器的功能模块的程序,包括通讯系统程序、3 种控制模式下的集中控 制程序、系统参数在线修改程序、程序在线升级程序、端头控制器双机热 备份程序以及人机交互程序。 在实验室搭建了液压支架控制系统实验平台,将防爆计算机、端头控 制器和支架控制器等设备联调进行模拟试验,对端头控制器进行了综合的 调试和测评。经过测试,端头控制器运行稳定,能够达到各功能的设计要 求,满足液压支架控制系统的使用要求。 关键词液压支架,端头控制器,MC9S12XDP512,综采工作面,自动控 制 万方数据 ABSTRACT III Development of the Electro-Hydraulic Terminal Controller for Hydraulic Support Based on MC9S12XDP512 ABSTRACT The subject is not only an important part of national and international scientific and technological cooperation in special projects “Development on the Control System of Electronic-Hydraulic Used in Hydraulic Support Unattended Fully Mechanized Coal Face” NO.2013DFA70750, but also an important part of the science major project of shanxi province “Research on Technical Equipment of Fully-automatic Domestic Unattended Fully Mechanized Coal Face” NO.20111101024. The research topic is to develop a hydraulic support centralized control system that is safe, reliable, high automated and easy to operate base on terminal controller. The control system has three layer networks, which comprised of explosion protected computers, terminal controller and support controller. The terminal controller was designed based on MC9S12XDP512 microcontroller. The control system could realize automatic control of hydraulic support in the fully mechanized working face, monitor the state of support in real-time, change the system parameter on-line, update the system program on-line, backup the centralized control system. The main research contents of this paper are shown as follows At first, refer to domestic and foreign literature and field trip in fully mechanized coalface, three layer network structure of the control system were determined besed on the current study status and actual situation of coal industry in our country, which comprised of explosion protected computers, terminal controller and support controller. And the functional requirements and perance indicators were put forward. The communication system of terminal controller was designd based on RS485/Modbus bus. There are three modes to control the hydraulic support, which include the local control mode and remote control mode and centralized control mode. To improve the control system’s ability to adapt of the coal mine complex environment, system parameter modification scheme is designed. It is very complex and inconvenience to update the application software of hydraulic support control system In order to update the application software of hydraulic 万方数据 太原理工大学硕士研究生学位论文 IV support control system, a scheme of online upgrade based on IAP is designed, the XRAM store link and data validation link are combined to improve the reliability of online upgrade. The hot backup solution of centralized control system based on terminal controller is designed, which could switch the mode to ensure the continuity of production of fully mechanized working face in case of the main terminal controller failure or the communication cable fault. According to perance requirements of the terminal controller and special environmental at coal mine, the hardware circuit of terminal controller was designed based on MC9S12XDP512, including the minimum system circuit, matrix keyboard circuit, LCD display circuit, RS485 communication circuit, sound-light alarm circuit and XRAM memory circuit. According to the circuit schematic diagram, the PCB circuit board is designed. After completed the prototype, the hardware was tested. To improve the stability of the hardware, heat ageing test was used to eliminate some teething problems, such as bad welding, electronic components parameters not match, temperature drift. And then, the EMC test was done to the whole machine. The result shows that the terminal controller had a certain resistance to electromagnetic interference. The software design of the terminal controller was based on CodeWarrior ide software development plat. According to the characteristics of system function, software architecture is designed based on break mode. After configured the bus clock, operation monitoring and interrupt resources, developed the program with modular design concept, including communication system program, three kinds of control mode of centralized control program, the system parameter modification program, online upgrade program, hot backup program and human-computer interaction program. The experiment plat of hydraulic support control system was built in the laboratory. Explosion protected computer, terminal controller and support controller were taken to laboratory simulation debug and system joint debug. After tested, the result shows that the terminal controller had a good stability and could meet the design requirements of each function and was enough to be used in the hydraulic support control system. KEY WORDS Hydraulic support, terminal controller, MC9S12XDP512, fully mechanized mining face, automatic control 万方数据 目 录 V 目 录 第一章 绪论 ........................................................................................................................... 1 1.1 课题研究的背景和意义 ................................................................................................. 1 1.2 液压支架控制技术国内外研究现状 ............................................................................. 2 1.2.1 国外液压支架控制技术的发展现状 ..................................................................... 2 1.2.2 国内液压支架控制技术的发展现状 ..................................................................... 3 1.3 本文的研究目标和主要研究内容 ................................................................................. 4 第二章 端头控制器总体方案设计 ....................................................................................... 5 2.1 液压支架电液控制系统总体结构 ................................................................................. 5 2.2 端头控制器通讯系统设计 ............................................................................................. 6 2.3 端头控制器双机热备份系统设计 ................................................................................. 7 2.3.1 正常工作模式 ......................................................................................................... 8 2.3.2 备用端头控制器工作模式 ..................................................................................... 8 2.3.3 主、备端头控制器同时工作模式 ......................................................................... 9 2.4 支架动作控制模式设计 ............................................................................................... 10 2.4.1 就地控制模式 ....................................................................................................... 10 2.4.2 远程控制模式 ....................................................................................................... 10 2.4.3 集中控制模式 ....................................................................................................... 11 2.5 参数在线修改方案设计 ............................................................................................... 14 2.6 程序在线升级方案设计 ............................................................................................... 14 2.7 端头控制器的技术指标 ............................................................................................... 16 2.8 本章小结 ....................................................................................................................... 16 第三章 端头控制器硬件设计 ............................................................................................. 17 3.1 端头控制器硬件总体框图 ........................................................................................... 17 3.2 主控单片机选型 ........................................................................................................... 18 3.2.1 端头控制器所需资源分析 ................................................................................... 18 3.2.2 CPU 选型与硬件资源配置 ................................................................................... 19 3.3 单片机最小系统设计 ................................................................................................... 20 3.4 功能模块电路设计 ....................................................................................................... 23 3.4.1 矩阵式键盘电路 ................................................................................................... 23 3.4.2 LCD 显示电路 ....................................................................................................... 24 3.4.3 声光报警电路 ....................................................................................................... 25 3.4.4 RS485 通讯电路 .................................................................................................... 27 万方数据 太原理工大学硕士研究生学位论文 VI 3.4.5 XRAM 存储电路 ................................................................................................... 29 3.5 本章小结 ...................................................................................................................... 30 第四章 端头控制器软件设计 ............................................................................................. 33 4.1 软件开发平台介绍 ...................................................................................................... 33 4.2 端头控制器软件总体方案 .......................................................................................... 34 4.3 系统软件资源配置 ...................................................................................................... 35 4.4 通讯系统程序设计 ...................................................................................................... 36 4.5 支架动作控制程序设计 .............................................................................................. 41 4.5.1 参数巡检和判断程序 ........................................................................................... 41 4.5.2 控制模式切换程序 ............................................................................................... 44 4.5.3 三种模式下的支架控制程序 ............................................................................... 45 4.6 参数在线修改程序 ...................................................................................................... 51 4.7 程序在线升级程序 ...................................................................................................... 52 4.7.1 程序代码的传输 ................................................................................................... 53 4.7.2 程序代码的更新 ................................................................................................... 54 4.8 双端头控制器切换程序 .............................................................................................. 56 4.9 人机交互程序设计 ...................................................................................................... 58 4.10 本章小结 .................................................................................................................... 62 第五章 端头控制器实验室调试 ......................................................................................... 63 5.1 实验室调试平台 .......................................................................................................... 63 5.2 端头控制器硬件调试 .................................................................................................. 64 5.2.1 端头控制器硬件检测 ........................................................................................... 64 5.2.2 端头控制器硬件热老化试验 ............................................................................... 66 5.2.3 端头控制器硬件 EMC 试验 ................................................................................ 66 5.3 端头控制器功能测试 .................................................................................................. 69 5.3.1 参数巡检与支架控制功能 ................................................................................... 69 5.3.2 参数在线修改功能 ............................................................................................... 74 5.3.3 程序在线升级功能 ............................................................................................... 75 5.3.4 端头控制器热备份功能 ....................................................................................... 77 5.3.5 人机交互功能 ....................................................................................................... 78 5.6 本章小结 ...................................................................................................................... 81 第六章 结论与展望 ............................................................................................................. 83 6.1 结论 .............................................................................................................................. 83 6.2 工作展望 ...................................................................................................................... 84 万方数据 目 录 VII 参考文献 ................................................................................................................................. 85 附 录 ................................................................................................................................. 89 致 谢 ................................................................................................................................. 91 作者在攻读硕士学位期间的研究成果 ................................................................................. 93 万方数据 太原理工大学硕士研究生学位论文 VIII 万方数据 第一章 绪论 1 第一章 绪论 煤炭作为我国的主体能源,在一次能源结构中的比重占到 70左右,煤炭工业是关 系到国家经济命脉和能源安全的重要基础产业[1]。 煤炭工业发展“十二五”规划中指 出全国煤矿采煤机械化程度要求达到 75,其中大型煤矿要达到 95以上[2][3]。综采 工作面是地下煤矿开采的重要场所,其自动化水平直接决定了煤矿的开采效率。其中液 压支架作为综采工作面顶板支护中的重要设备,在生产过程中需要根据采煤工艺进行移 架和支护等操作,而液压支架集中控制系统是实现自动化采煤的关键装备。 1.1 课题研究的背景和意义 煤矿井下综采工作面主要的生产设备包括采煤机、 刮板运输机、 液压支架、 破碎机、 转载机、皮带运输机等设备,布局图如下图 1-1 所示。 回采区 皮 带 转 载 机 破 碎 机 回 风 顺 槽 运 输 顺 槽 刮板运输机采空区采煤机液压支架 图1-1 综采工作面设备布局图 Fig.1-1 Device layout of fully mechanized working face 目前,综采工作面采用沿进风巷回退式开采的方式。在生产中,采煤机在刮板运输 机的轨道上移动,前后滚筒旋转切割煤壁,液压支架以高压乳化液泵作为动力源,在采 煤过程中起到支撑顶板的作用