机车状态信息检测与诊断记录的方法及装置技术领域本发明涉及网络控制技术，尤其涉及一种机车状态信息检测与诊断记录的方法及装置。 Locomotive state information recorded in the detection and diagnosis TECHNICAL FIELD The present invention relates to a network control technology, particularly to a locomotive monitoring and diagnostic status information recording method and apparatus. 背景技术机车作为铁路运输的关键组成部分，其运行状态的质量关系着整个铁路运输系统的质量。 BACKGROUND locomotive rail transport as a key component of the quality of their operational status of the relationship between the quality of the entire rail transport system. 在列车运行中，特别当机车故障或意外情况发生时，要求地面行车调度和机车运用管理部门能根据获取的机车运行;险测信息，远程向司机提供故障处理的技术支持。 In the train, especially when the locomotive failure or accident occurs, the required floor scheduling and traffic management departments to run the locomotive according to the locomotive acquired; risk measurement information, providing technical support for remote troubleshooting of the driver. 目前，尽管有些机车产品实现了机车运行信息和状态信息的在线动态检测、记录和诊断处理功能，但是它们要么是功能单一，要么就是处理的数据不全面，可以说能全面满足这种机车信息化改造要求的机车产品目前还是一片空白。 At present, although some locomotives to achieve a product line locomotive motion detection information and status information, records and diagnostic processing functions, but they are either single function or data processing is not comprehensive, it can be said to fully meet this locomotive information modification requirement locomotive products is still a blank. 机车状态信息检测与诊断记录装置的发明将填补这项空白。 Invention locomotive monitoring and diagnostic status information recording apparatus will fill this gap. 目前列车网络控制系统的总线接口类型主要有RS-485、 RS-422、 RS-232、 多功能车辆总线（MVB) 、 CAN、 LONWORKS、以太网等几种，其中MVB 总线主要负责车辆内部的数据通信，车辆总线采用符合IEC 61375标准的多功能车辆总线联结车辆的所有智能设备，其物理介质在近程采用电介质，远程可采用光纤，光纤通过星型耦合器联结；多功能车辆总线由节点中的总线管理器管理，车辆总线与列车总线之间通过网关交换数据；所有上网的车载设备采用统一规范的车载信息数据格式，信息记录采用分布与集中相结合的数据存储方式。 At present the type of network bus interface train control system mainly RS-485, RS-422, RS-232, multi-functional vehicle bus (MVB), CAN, LONWORKS, several Ethernet, MVB bus which is mainly responsible for the data of the vehicle interior communication, using a vehicle bus comply with all smart devices IEC 61375 standard vehicle coupled MVB, physical media coupled by the star coupler using the dielectric in the proximity, the remote can be optical fibers; MVB by the node the bus Manager, between the vehicle bus and the train bus via a gateway to exchange data; a data format of vehicle information, vehicle information recording all access equipment using a standardized data storage using a combination of centralized and distributed. 此外列车网络控制系统还包括其他总线，如PC104总线。 Further train network control system further includes other buses, such as the PC104 bus. PC 104 总线是国际上最早的嵌入式计算机总线标准，是一种专门为嵌入式控制而定义的工业控制总线，它采用ISA总线架构，其总线之间的互联使用了104根信号线，包括地址线、数据线、控制线、时钟线、电源线。 PC 104 is the world's first bus embedded computer bus standard, specifically for embedded control is defined industrial control bus, which uses the ISA bus architecture, which is interconnected between the bus use signal line 104, an address comprising lines, data lines, control lines, clock lines, power lines. 在《中国铁路》杂志2005年第12期中一篇名为"电力机车远程实时监控系统的研究"的文章中介绍的车载数据采集单元的设计采用了与本发明近似的技术方案。 In the article "China Railway" magazine in 2005 the first period 12 article entitled "study of power real-time monitoring system of remote locomotive" in the design of on-board data acquisition unit described in the present invention uses a similar technology programs. 该方案提出：车载数据采集单元采集电力机车运行信息、状态信息及各种设备的状态信息。 The solution proposed: a data acquisition unit onboard electric locomotive information, status information and various status information of the device. 电力机车的运行、状态参数及故障信息主要来自机车控制系统。 Electric locomotive operating state parameter and fault information from the main locomotive control system. 其系统结构见图l:车载数据采集单元通过CPU卡管理其内部总线，控制各子模块的工作， 通过内部的接口转换模块将从微机控制拒、机车逻辑控制单元（LCU)和机车安全信息综合监测装置（TAX)取得的数据进行甄别、分类等预处理后经通信接口发送到卫星通讯单元，从而使地面中心通过卫星通信和GPRS通信与车载进行双向数据传输，地面中心将实时传回的机车运行状态信息及机车设备信息存储在地面中心数据库，供地面中心进行综合分析。 The system structure shown in Figure l: vehicle data acquisition unit through the internal bus CPU card management, control operation of each sub-module, the interior of the refuse through the interface conversion module from the computer control locomotive logic control unit (LCU) and security information integrated locomotive after the data transmission monitoring means (of TAX) were obtained by screening, classification pretreatment via the communication interface to the satellite communication unit, so that the center of the ground via two-way satellite communications and data transmission GPRS communication with the vehicle-mounted, the center ground return real-time locomotive operational status information and device information is stored in the ground locomotive central database, a comprehensive analysis for the center ground. 上述方案不足之处在于：(1) 不能记录机车的运行数据车载数据采集单元虽能实时向地面发送信息，但是受数据传输量的限制， 也只能从大量信息中提取必要的小容量信息传输，很可能使一些有用的机车运行数据忽略掉而没有记录存储下来，这就大大减少了提供给地面系统故障诊断的依据。 The above-described embodiment in that the shortcomings: (1) not recording data onboard the locomotive runs in real time, although the data acquisition unit transmits information to the ground, but by limiting the amount of data transmission, only a small capacity to extract the necessary information is transferred from the large amount of information it is likely to make some useful data locomotive ignored and no records stored, which greatly reduces the basis to provide ground fault diagnosis system. (2) 不能在线故障诊断车载数据采集单元本身不具备在线诊断功能，所有故障诊断只能通过地面系统进行处理，这样就降低了故障诊断的反应速度，同时也加大了地面系统的工作负担。 (2) can not fault diagnosis online vehicle data acquisition unit itself does not have line diagnostics, all faults diagnosis can only be processed by the ground system, thus reducing the reaction speed of fault diagnosis, but also increased the workload of the ground system. (3) 不能实时监测所有类型机车的运行状态信息。 (3) can not be real-time monitoring operational status information for all types of locomotives. 上述方案提到该车载数据采集单元只从微机控制拒、机车逻辑控制单元(LCU)和机车安全信息综合监测装置（TAX)采集信息。 The above-mentioned embodiment controls only the vehicle data acquisition unit refuse from the microcomputer, the locomotive logic control unit (LCU) and security information locomotive integrated monitoring means (of TAX) collection of information. 由此可以看出它采集的信息不够全面，对机车车载设备不具备开放性，无法满足各种车型信息化改造的需求。 It can be seen that the information collected is not comprehensive enough, locomotive onboard equipment is not open, unable to meet the needs of various models of information reform. (4)没有采用冗余设计机车车载数据采集单元的基本特性是对大量数据的高速处理，由于没有采用冗余设计， 一旦出现故障，数据的可靠性和连续性就无法得到保障了。 The basic characteristic (4) onboard a locomotive without redundant design data acquisition unit is a high-speed processing of large amounts of data, since no redundant design, once the failure, reliability and continuity of data can not be guaranteed. 发明内容有鉴于此，本发明解决的问题是提供一种机车状态信息检测与诊断记录的方法及装置，可以客观真实的记录机车运行状态数据并实现在线诊断。 SUMMARY OF THE INVENTION Accordingly, the present invention is to provide a problem detection and diagnosis of locomotive status information recording method and apparatus, can record the real objective locomotive status data and for online diagnostics. 为此，本发明提供的技术方案如下：一种机车状态信息检测与诊断记录的装置，该装置包括：数据采集单元和数据处理单元；所述数据采集单元用于与机车的车载设备进行实时数据通信，釆集机车的运行数据；所述数据处理单元用于读取数据采集单元采集的数据，并通过对所述数据按不同机车事件类型进行分类逻辑判断得到机车发生的各种事件，并将机车发生的所有事件及相关参数写入记录文件并存储，同时与地面实时通信， 完成车地之间数据的双向传输。 To this end, the present invention provides the following technical solution: an apparatus for detection and diagnosis of locomotive status information recorded, the apparatus comprising: a data acquisition unit and a data processing unit; the data collection unit for performing real-time data with the locomotive-vehicle device communications, operating data sets preclude the locomotive; data for the data processing unit reads data acquisition unit and the locomotive events occurring obtained by classifying the data according to different logical judgment locomotive event types, and All events and associated parameters locomotive occurred writing the record and file storage, real-time communication with the ground at the same time to complete the two-way transmission of data between the vehicle ground. 优选的，所述数据采集单元采用嵌入式系统，包括RS-485接口采集板、 RS-422接口采集板、RS-232接口采集板、CAN接口采集板、LONWORKS 接口采集板、MVB接口采集板、混合接口采集板、模拟量采集板和数据量采集板。 Preferably, the data acquisition unit embedded systems, including acquisition board RS-485 interface, RS-422 interface to capture board, RS-232 interface to capture board, CAN interfaces acquisition board, the LONWORKS acquisition board interfaces, interfaces the MVB acquisition board, hybrid interface acquisition board, and the data acquisition board analog quantity acquisition board. 优选的，各采集板具有数据存储器，用于存储采集到的数据。 Preferably, each of the data acquisition board has a memory for storing data collected. 优选的，所述采集板作为主设备，其他车载设备作为从设备；或所述采集板作为从设备，其他车载设备作为主设备；或所述采集板作为串行总线上的侦听设备。 Preferably, the acquisition board as a master device, the other-vehicle device as a slave device; acquisition board or as a slave device, the master device as the other on-vehicle devices; or the collecting plate as a listening device on the serial bus. 优选的，所述数据处理单元采用嵌入式系统，具有高速的微处理器和嵌入式的实时多任务才喿作系统，并支持多种外围硬件。 Preferably, the data processing unit with embedded system, having a real-time multitasking and high-speed microprocessor for embedded systems only Qiao, and supports a variety of peripheral hardware. 优选的，所述数据处理单元包括主CPU板和从CPU板，主从CPU板互为热备冗余。 Preferably, the data processing unit includes a main CPU board and the CPU board, the main mutually Redundancy from the CPU board. 优选的，所述数据处理单元还具有大容量的不挥发存储卡，用于存储大容量的数据记录文件。 Preferably, the data processing unit also has a large capacity non-volatile memory card, for storing large volumes of data log files. 一种机车状态信息检测与诊断记录的方法，该方法包括：步骤一、采集机车运行数据后存储；步骤二、读取存储的机车运行数据，对所述数据进行分类处理，将数据按不同机车事件类型进行分类逻辑判断后得到机车发生的各种事件；步骤三、将机车发生的所有事件及相关参数写入记录文件并存储；步骤四、与地面实时通信，完成车地之间数据的双向传输。 One kind of locomotive state information recording detection and diagnosis, the method comprising: a step of collecting the data storing locomotive; two step, read the stored data of the locomotive, the data sorting process, the data in different locomotive obtained after the classification logic determines the type of event occurring events locomotive; step three, writes all events occurring locomotives and associated parameters and storing the log file; step 4 with the surface real-time communication, data between the two cars to the bidirectional transmission. 优选的，步骤一具体包括：在发送状态向车载设备发送查询主帧，如果经判断车载设备回送了有效数据信息，便将接收的数据写入数据存储器的相应位置，之后重新开始新一轮的查询；如果经判断车载设备未回送信息或回送信息错误，则重新发送查询主帧，重新查询。 Preferably, the step a comprises: sending a query to the main frame in the vehicle device transmission condition is judged if the vehicle device sends back information of the effective data, write data corresponding to put the received data memory location, then start a new round of query; is judged if the vehicle-mounted device does not send back an error message or information sent back, the main frame is re-transmitted query, the query again. 优选的，步骤一具体包括：在接收状态实时侦听总线上的通信，并接收需要的数据，经判断数据有效后将数据存储在数据存储器的相应位置。 Preferably, the step a comprises: receiving listening state in real-time communication on the bus, and receives the desired data, the data is judged valid data is stored after the corresponding location in the data store. 优选的，步骤二具体为：读取存储的机车运行数据，对所述数据按模拟量事件、定时事件、数字量事件、故障事件、特殊事件进行分类逻辑判断后得到机车发生的各种事件。 Preferably, two step specifically includes: reading the stored data of the locomotive, the analog data by the event, timed events, digital event, a failure event, and various events to obtain specific event classification logic is determined after the occurrence of the locomotive. 优选的，步骤三具体包括：对实时采集的机车运行参数和故障数据进行分析处理后，按照事件产生记录的原则，并依照统一规范的文件记录格式对采集的数据信息进行记录存储。 Preferably, the three step comprises: after locomotive operating parameters and fault analysis of data collected in real time processing, an event is generated in accordance with the principles of recording, and data recording format for recording the collected information in accordance with a standardized file storage. 优选的，所述记录文件包括：记录数字量发生变化时产生的事件及相关参数的数字量事件记录、记录规定时间间隔点上发生的事件及相关参数的定时事件记录、记录模拟量大于、等于或小于阈值点时产生的事件及相关参数的模拟量事件记录、记录发生的故障事件和相关参数的故障事件记录以及记录无规律输入的单个数据或多项数据的特殊事件记录。 Preferably, the log file comprising: a digital recording events and event recording related parameters generated when the digital quantity is changed, the recording timing events and event recording related parameters a predetermined time interval occurring point greater than the analog recording, is equal to analog event record events and associated parameters generated when points or less than the threshold, recording failure event records special events and records failure-related event occurs and parameters single data record irregular or more input data. 优选的，步骤四具体包括：定时判断从地面发送的点播信息，并回送相应的数据给地面；对机车出现的故障信息会立即发送到地面，并可以实时接收地面发送来的故障处理建议。 Preferably, the step of four comprises: a timing determination demand information transmitted from the ground, and returning data corresponding to the ground; failure information The locomotive will be sent immediately to the ground, and may receive troubleshooting recommendations terrestrial transmitted in real time. 优选的，所述数据包括机车状态信息、记录文件和故障发生前的详细历史数据。 Preferably, the data comprises locomotive status information, detailed historical record and file data before failure. 可以看出，采用本发明的装置和方法，通过对导致故障事件发生的其它事件按照先后顺序进行逻辑判断，获得机车发生的故障事件，实现了故障的在线诊断；通过将数据按不同机车事件类型进行分类逻辑判断后得到机车发生的各种事件，并将机车发生的所有事件及相关参数按统一规范的格式写入记录文件，实现了客观真实的记录机车的运行数据；通过各种通用的机车设备总线接口可以实时监测各类机车的运行状态信息；同时通过与车地无线传输装置及显示屏实时通信，可以使地面人员和司机了解在途机车的运行情况， 提高了机车的安全性和运用效率。 As can be seen, using the apparatus and method of the present invention, the other event caused the failure judgment logic of events in the order to give the locomotive fault event occurs, a failure to achieve an online diagnosis; data types by different events locomotive after classifying logical decision to get the locomotive events occur, all events occur and the related parameters and locomotive write log files according to a standardized format, to achieve the objective of recording real operating data locomotive; through a variety of general-purpose locomotive device bus interface can be real-time monitoring of various types of locomotives operating status information; the same time through real-time communication with the vehicle wireless transmission device and display, you can make the ground staff and drivers to understand the operation of the locomotives of the way to improve the safety and efficiency of the use locomotives . 附图说明图l是现有技术中车载数据采集单元结构示意图;图2是本发明装置的机构框图； 图3是本发明实施例l装置的机构框图； 图4是本发明方法的流程框图。 FIG l is a schematic structure of vehicle data acquisition unit in the prior art; FIG. 2 is a block diagram of a mechanism of the present invention apparatus; FIG. 3 is a block diagram of a mechanism of the embodiment of the present invention, apparatus l; FIG. 4 is a flow diagram of the method of the present invention. 具体实施方式本发明实现机车状态信息检测与诊断记录的装置结构如图2所示，该装置包括：数据采集单元101和数据处理单元102。 DETAILED DESCRIPTION The present invention achieves the device configuration state information recorded locomotive detection and diagnosis shown in FIG. 2, the apparatus comprising: a data acquisition unit 101 and data processing unit 102. 所述数据采集单元101用于与机车的车载设备进行实时数据通信，采集机车的运行数据；所述数据处理单元102用于读取数据采集单元采集的数据，并通过对所述数据按不同机车事件类型进行分类逻辑判断后得到机车发生的各种事件， 将机车发生的所有事件及相关参数按统一规范的格式写入记录文件并存储， 同时通过以太网口与车地无线传输装置实时通信，实现车地之间数据的双向传输。 The data collection unit 101 for performing real-time data communication with the vehicle-mounted device of the locomotive, locomotive data collection operation; the data processing unit 102 for reading data of the data acquisition unit, and through the data according to different locomotive after determining the type of event classification logic to obtain locomotive events occurring, all relevant parameters and locomotive events occurring documents written in the recording format according to a standardized and stored while the vehicle through an Ethernet port to communicate with the wireless transmission device in real time, two-way transmission of data between the vehicle ground. 具体的，本发明实施例1详细描述了实现机车状态信息检测与诊断记录的装置200,如图3所示：该装置200中数据采集单元101的设计充分考虑了接口的通用性和兼容性，因此具备丰富的总线接口采集板，可以覆盖铁路机车所有列车网络控制系统的总线接口类型；这些接口采集板采用嵌入式系统，可直接与机车的车载设备进行实时数据通信，最大限度的全面采集机车的运行数据（安全监控数据、机车状态数据、机车故障数据），对采集的数据进行判别、分类等预处理后将数据块存储到数据存储器（RAM)中。 Specifically, embodiments of the present invention is described in detail a means for implementing the detection and diagnosis of locomotive status information record 200 shown in Figure 3: Design of the data acquisition unit 200 in the device 101 full account of the versatility and compatibility of the interface, Thus the bus interface with rich acquisition board, may cover all types of railway rolling train network bus interface control systems; these interfaces acquisition board embedded system, real-time data communication may be performed directly with the in-vehicle apparatus locomotive, the locomotive to maximize the overall collection operating data (data safety monitoring, status data of the locomotive, locomotive trouble data), the data collected is determined, after a pre-classification of data blocks stored in the data memory (RAM),. 当系统上电后，接口采集板会依据已定义好的总线通信协议与总线上其它车载设备进行通信，通信的方式有以下三种：(1) 、接口釆集板作为主设备，其它车载设备作为从设备： 接口采集板首先置为发送状态并开始发送查询主帧，然后便置为接收状态，如果经判断其它车载设备回送了有效信息，便将接收的数据写到数据存储器的相应位置，之后重新置为发送状态开始新一轮的查询；如果经判断其它车载设备未发信息或发送信息错误，接口采集板便会重新置为发送状态重新开始查询。 When the system is powered on, the interface board will be collected on the basis of well defined bus protocol with other bus-vehicle devices communicate, the communication of the following three: (1), the interface board preclude set as a master device, the other-vehicle device as a slave device: first acquisition board is set to the interface transmission state and starts transmitting query main frame, and then it is set to the reception state, if the other is determined by the vehicle device sends back the effective information, put the received data is written to the corresponding memory location of the data, after reset to start a new query to a transmission state; if the device is not is judged that the other-vehicle information or send a message to an error, the interface will be reset to the acquisition board to transmit status inquiry resumed. (2) 接口采集板作为从设备，其它车载设备作为主设备：接口采集板首先置为接收状态， 一旦接收到其它车载设备发送给自己的查询帧，经判断该查询帧有效后立即置为发送状态，并从数据存储器中读取相关数据发送给相应的车载设备，之后重新置为接收状态，准备接收车载设备的运行数据。 (2) Interface acquisition board as a slave device, the other-vehicle device as a master device: an interface acquisition board is first set to the receiving state, upon receipt of the other vehicle-mounted device transmits to their inquiry frame, is judged after the inquiry frame is valid set immediately to transmit state, the data read from the memory and transmits the data to the respective associated vehicle device, then re-set to the reception state, ready to receive in-vehicle equipment operation data. (3 )接口采集板作为串行总线上的侦听设备：接口采集板始终置为接收状态，实时侦听总线上的通信，并接收需要的数据，经判断有效后将数据存储在数据存储器的相应位置。 (3) Acquisition Interface Board as listening devices on the serial bus: Acquisition Interface Board is always set to the reception state, listening real-time communications on the bus, and receives desired data, after the data is judged valid data stored in the memory the corresponding position. 具体的，接口采集板主要包括：RS-485接口采集板221、 RS-422接口采集板222、 RS-232接口釆集板223、 CAN接口采集板224、 MVB接口采集板225、 LONWORKS接口采集板226、混合接口采集板227、纟莫拟量采集板228和数据量釆集板229，但并不局限于只有上述接口板；其中：RS-485接口釆集板221 、 RS-422接口采集板222、 RS-232接口釆集板223 、 CAN接口采集板224以及LONWORKS接口采集板226工作原理基本相同：通过微控制器对总线协议控制器和总线收发器进行收发控制，使接口采集板实时与其它机车车载网络控制设备进行通信，并将接收到的数据进行判别、分类等预处理后存储到RAM中，数据处理单元102通过内部PC104总线经地址译码来访问RAM中的相关内容；MVB接口采集板225的通信任务是通过数据处理单元102来控制的，当数据处理单元102发出读写采集板RAM地址的信号时，即可通过PC104总 Specifically, the interface acquisition board including: RS-485 interface to capture board 221, RS-422 interface to capture board 222, RS-232 interface to preclude the collector plate 223, CAN interfaces acquisition board 224, MVB Interface acquisition board 225, LONWORKS Interface acquisition board 226, hybrid interface acquisition board 227, the amount of Si Mo proposed acquisition board 228 and the data amount preclude the set plate 229, but is not limited to only the above-described interface board; wherein: RS-485 interface to preclude the collector plate 221, RS-422 Interface acquisition board 222, RS-232 interface to preclude the collector plate 223, CAN acquisition board 224 and the interface Interface LONWORKS collection plate 226 is substantially the same principle: a transceiver controller and the control of the bus protocol via the microcontroller bus transceiver, so that the interface and the real-time acquisition board other onboard a locomotive communication network control apparatus, and stores the received data in the RAM after the discrimination and classification of preprocessing, the data processing unit 102 accesses the RAM via the relevant content through the internal address decoder PC104 bus; the MVB Interface communication task collecting plate 225 is controlled by the data processing unit 102, when the data processing unit 102 to signal acquisition board RAM read and write addresses can by total PC104 来控制MVB接口板225上MVB协议控制器和总线收发器进行收发数据；模拟量采集板228是针对有些车型上车载网络上传输的数据并不完全， 有可能某些模拟量（如风缸压力、变压器油温等）需要检测但是既有车载设备上却并未采集的缺陷而设计的；主要负责将外部输入的模拟量转化为数字量，由微控制器控制将外部输入的模拟量经采样保持电路、放大隔离电路、 通道选择电路后送入数/模（A/D)转换电路进行模数转换，再将转换后的结果存储到RAM中；数据处理单元102通过内部PC104总线经地址译码来访问RAM中的相关内容；数据量采集板229是针对有些车型的车载总线上传输的数据并不完全， 有可能某些数字量（如110V电源拒开关、司机台上的扳钮开关等）需要检测但既有车载设备上并未采集和传输的缺陷而设计的，通过该数字量采集板来处理这些额外需要采集 Controlling MVB interface board 225 to transmit and receive data on the protocol controller and the MVB bus transceiver; acquisition board 228 is an analog data for transmission on some models on the vehicle network is not complete, there may be some analog (wind pressure cylinder , transformer oil, etc.), but both need to detect on-vehicle device has not acquired a defect in design; primarily responsible for the externally input analog to digital conversion, controlled by the microcontroller to an external analog input sampled hold circuit, amplifying circuit isolation, after the channel selection circuit into the digital / analog (a / D) converter for analog-digital conversion circuit, and then converting the result into the RAM; and a data processing unit 102 via the internal bus via the address translation PC104 RAM access codes to the related content; data acquisition module 229 for data transmission on some models vehicle bus is not complete, there may be some digital (e.g., 110V power switch repellent, the driver stage toggle switch or the like ) necessary to detect defects but not both capture and transport of the vehicle device is designed to deal with these additional requirements for collecting the digital board via 的数字量；数字量采集板229主要是用来检测IIOV开关量的输入，当数据处理单元102读取地址译码所指定的地址时，对应的110V 开关量经模拟整定电路转化为5V的信号量，再经驱动器被送至数据处理单元102中。 Digital quantity; Digital acquisition board 229 is mainly used to detect IIOV digital input, when the data processing unit 102 reads the address specified address decoder, via the analog switch 110V tuning circuit into a signal corresponding to the 5V amount, and then the driver is sent to the data processing unit 102. 本发明装置具有各种通用的机车设备总线接口，兼容所有机车的既有设备，因此能够全面采集各种机车的运行数据。 Various general purpose apparatus of the present invention having a bus interface device of the locomotive, the locomotive is compatible with all existing equipment, so that various data collection operation can be fully locomotive. 而且本装置可以通过专门提供的串行接口可扩展其它多个机车状态检测和诊断设备，通过该方式可自由灵活的扩展机车状态检测和诊断设备，并且外扩设备的数量和物理形式不受本装置自身板位和尺寸空间的限制。 The device can be extended and a plurality of other locomotives and diagnostic equipment state detecting dedicated serial interface provided by which a freely flexible expansion locomotive equipment status detection and diagnosis, and the number of physical forms and extended device is not present Slot apparatus itself and restriction in the size of the space. 该装置200中数据处理单元102主要由CPU板211构成，负责对所有采集的数据信息进行相应处理（包括故障判断分析、状态信息的记录存储及数据的实时传送控制），以及对其它模块之间的工作进行协调和调度。 The apparatus 200 in the data processing unit 102 is mainly composed of a CPU board 211, is responsible for processing between the respective other module (including failure determination analysis, real-time storage and data transfer control record status information), as well as all data collected coordination and scheduling of work. CPU板211采用嵌入式系统，具有高速的微处理器和嵌入式的实时多任务操作系统， 该设计支持多种外围硬件、设备和网络系统，包括键盘、鼠标、显示屏、串行端口、以太网连接、调制解调器、通用串行总线（USB)设备、音频设备、 并行端口、打印机设备和存储设备，同时使得将专家系统等智能处理方法应用到CPU板211的软件当中成为可能，使CPU板211具备机车在线故障分析诊断的能力。 Embedded system CPU board 211, having a high speed microprocessor and an embedded real-time multitasking operating system, which supports various peripheral hardware design, systems and network devices, including a keyboard, mouse, monitor, serial ports, Ethernet network connection, a modem, a universal serial bus (USB) device, an audio device, a parallel port, a printer and storage devices, so that while the processing method of application intelligence expert systems software to the CPU board 211 which may be the CPU board 211 the ability to analyze online fault diagnosis of locomotive. 它通过以太网接口与车-地无线传输装置通信，实现车地双向数据传输。 Ethernet interface via which the vehicle - a communication means wirelessly transmitting, to the vehicle to achieve two-way data transmission. 同时，数据处理单元102还可具有大容量的不挥发存储器压缩闪存(CF)卡，用于存储大容量的数据记录文件。 Meanwhile, the data processing unit 102 may be a nonvolatile memory having a large capacity compact flash (CF) card, a large capacity for storing the data record file. CPU板采用高速微型处理器与嵌入式操作系统Windows CE的解决方案(Microsoft Windows CE是一个为多种嵌入式系统和产品而"i殳计的紧凑、高效、可升级的操作系统。其模块化设计使嵌入式系统开发者和应用程序开发者能够根据多种不同产品进行定制，例如，用户电子设备、专用工业控制器以及嵌入式通信设备。Windows CE支持多种外围硬件、设备和网络系统，包括键盘、鼠标、触摸屏、串行端口、以太网连接、调制解调器、通用串行总线（USB)设备、音频设备、并行端口、打印机设备和存储设备），CPU板上装有CF卡，用于存放系统程序和应用程序。当系统上电后，程序首先对硬盘（即CF卡）剩余空间进行检测，如果检测到剩余空间小于5M,就发报警信息给显示器，提示有关人员进行处理，在没被处理前CPU板将不记录任何信息；然后将CPU板的一段内存虚拟地址映射到 CPU board with high-speed microprocessors and embedded operating system Windows CE solutions (the Microsoft Windows CE is a variety of embedded systems for the products and "i Shu meter compact, efficient and scalable operating system. Its modular embedded design allows system developers and application developers can be customized according to a variety of different products, e.g., consumer electronics, industrial controllers dedicated and embedded communications device supports multiple .Windows CE peripheral hardware, system and network device, including a keyboard, a mouse, a touch screen, a serial port, an Ethernet connection, a modem, a universal serial bus (USB) device, an audio device, a parallel port, a printer and storage devices), the CPU board with a CF card, for storing system and applications. when the system is powered on, the program first remaining hard disk space (i.e., CF card) is detected, if the detected remaining space is less than 5M, to send alarm information to the display, prompts the officer processing, when it is not processed CPU board front will not record any information; and a section of memory mapping the virtual address to the CPU board 接口采集板数据存储器的物理地址；因车栽装置通过以太网与车地无线传输装置通信，因此需要分配一个IP地址；之后进行系统初始化，主要包括：(1) 从接口采集板读取监控装置的时间进行系统校时，并记录上电时间；(2) 从接口采集板读取机车车型和编号，并以此确定将要生成的记录文件和索引文件的名称；(3)检测硬盘上是否已存在该名称的记录文件和索引文件，如果不存在就在硬盘生成新的记录文件和索引文件（每个记录文件对应一个索引文件，通过索引文件可以查询记录文件里每条记录的序号、起始存放位置和长度）；如果这两个文件存在，就4企测文件内容是否有损坏，并对损坏的文件进行相应弥补处理。系统初始化后进行数据的处理和传送控制，主要包括： (1 )读取各接口采集板RAM中存储的所有相关数据，对机车发生的各种事件进行判断 Data acquisition board interface physical addresses of the memory; car plant by means of Ethernet communication with the vehicle by wireless transmission, it is necessary to assign an IP address; After system initialization, including: (1) reading from the interface monitoring device acquisition board when the time for system calibration and the recording-on time; (2) read from the interface ID and locomotive models capture board, and thereby determines the name of a recording file and the index file to be generated; whether (3) Test the hard the presence of the log file and an index file name, if there is no record file and generates a new index file in the hard disk (file corresponds to each record an index file, record file can check the serial number of each recording by the index file, starting storage position and length); if the two files are present, whether the contents of the documents as measured half 4 is damaged, the damaged files and the process proceeds accordingly to compensate for process control and data transmission system initialization, including: (1). reading acquisition board interfaces the RAM stores all relevant data to various events occurring judges locomotives 理。并将得到的机车发生的各种事件及相关参数存储成数据记录文件，以备机车入库时供地面分析系统调用。具体的，对机车发生的各种事件（包括模拟量事件、定时事件、数字量事件、故障事件、特殊事件）进行分析判断，并最终形成数据记录文件，产生记录的事件可以按照用户的要求适当定义，以釆集合理数量的采样数据以利于地面重现各类机车运行参数的曲线，支持地面离线故障分析与诊断。步骤如下：① 数字量事件记录：指某数字量发生变化，将该数字量以及相关参数（如曰期时间、公里标等）记录下来形成的数据记录。② 定时事件记录：在规定时间间隔点上发生的事件，该事件发生后把相关的数字量或一莫拟量记录下来形成的数据记录，如时间变化1秒。 Li. Locomotive and the resulting events occurring and parameters related to the data records stored in file storage to prepare for the locomotive system calls for surface analysis. Specifically, various events occurred locomotives (including analog event, the timing event, digital event, a failure event, special events) analysis to determine the final form of data records and files, generating recording can be suitably defined in accordance with the user's requirements, in order to preclude the sampled data set to facilitate a reasonable number of reproducing all types of ground locomotive operating parameters of the curve, the ground support fault analysis and diagnosis offline following steps:. ① event recording digital: digital means a change, the digital recording and related parameters (e.g., of said time, and other standard km) is formed off .② data recording timed events recorded: events in a predetermined time interval point, after the occurrence of the event associated with a digital or quasi Mo amount of the recording data are recorded form, such as a one second time. ③ 模拟量定量事件记录：指当某个模拟量大于、等于或小于阈值点时产生的事件，该事件发生后把该模拟量和相关参数（如日期时间、公里标等） 记录下来形成的数据记录。 ③ analog quantitative event record: refers to the data event generated when a simulation is greater than, equal to or smaller than the threshold point, after the event occurred to the analog and related parameters (e.g., date and time, km mark, etc.) recorded is formed recording. 如速度变化5公里，距离变化500米等。 The rate of change is 5 km change 2,500 m. 模拟量的阈值可设定。 Analog threshold may be set. ④ 故障事件记录：指当某个故障产生后把该故障事件代码和相关参数（如故障发生前后某时间段类相关参数的瞬变数据信息、日期时间、公里标等） 记录下来形成的数据记录。 ④ Fault Event Record: data recording means to the fault event codes and associated parameters when a fault is generated (transient data such as failure some period of time before and after the class of the relevant parameters, date and time, and other standard km) recorded is formed . ⑤特殊事件记录：特殊事件记录是一些无规律输入的单个数据或多项数据的数据记录，该事件记录的内容可以不受限制，可用于系统的初始化阶段、 故障信息产生之时、某一事件发生之时或有地面请求之时。 ⑤ Special Event Record: Event Record is a specific single number of irregular data entry or data recording more data, the event records may not be limited, the system may be used for generating the initialization phase, failure information, an event when the occurrence of the request or the ground. (2)将处理后的状态数据和故障数据发送给司机室显示屏和车地无线传输装置。 (2) transmits the processed data and state data to the fault display and a vehicle cab wireless transmission apparatus. -明可。 - Ming can. 诊断；还可以客观真实的记录机车的运行数据，并存储在不挥发的大容量数据存储介质中，供地面分析系统处理后实现机车状态的回放，判断和预测机车的故障部位；通过与车地无线传输装置及显示屏通信，可以使地面人员和司机实时了解在途机车的运行情况，提高了机车的安全性和运用效率。 Diagnostics; may also be the real objective record locomotive operating data and stored in the mass data storage medium is not volatile, the donor fault position playback Locomotive state after the surface analysis system processing, determination and prediction locomotive; through the vehicle ground wireless communications transmission device and display, you can make the ground staff and drivers in real time to understand the operation of the locomotives of the way to improve the safety and efficiency of the use locomotives. 此外，本发明装置中数据处理单元102还可包括一从CPU板212,它与CPU板211互为热备冗余；CPU板211可以看作是主CPU板，它定期向从CPU板212发送反映自身正常工作的状态数据，同时，主CPU板211也定期接收来自从CPU板212的状态数据，当发生接收超时时，主CPU211板认为从CPU板212已经发生故障，向显示屏发出从CPU板212故障的信息，以便维护；从CPU板212—直记录数据，但不参与故障的诊断以及响应其他设备的命令，当发生接收超时时，从CPU板212认为主CPU板211已经发生故障， 自动切换进入主机工作状态，并向显示屏发出主CPU板211故障的信息，以便检修人员及时维护，从而保证了系统数据的可靠性与连续性。 Further, the apparatus of the present invention may further comprise a data processing unit 102 from a CPU board 212, CPU board 211 it mutually Redundancy; CPU board 211 can be considered as the main CPU board, it is periodically transmitted from the CPU to the plate 212 reflecting the state of normal operation of the data itself, while the main CPU board 211 also periodically receives the status data from the CPU board 212, when receiving the timeout occurs, the main CPU211 CPU board that has failed from the plate 212, sent from the CPU to the display failure information of plate 212 so as to maintain; 212- linear recording data from the CPU board, but does not participate in the fault diagnosis and in response to a command other devices, when receiving the timeout occurs, the CPU board 212 of the main CPU board 211 that a failure has occurred, automatically switches the working state into the host, send a message to the main CPU fault display plate 211, so that maintenance personnel timely maintenance, thus ensuring reliability and continuity of the system data. 基于上述装置，本发明提供一种实现机车状态信息检测与诊断记录的方法，如图4所示，该方法包括：步骤401:采集机车运行数据后存储；步骤402:读取存储的机车运行数据，将数据按不同机车事件类型进行分类逻辑判断后得到^L车发生的各种事件；步骤403: 将机车发生的所有事件及相关参数按统一规范的格式写入记录文件并存储。 Based on the above apparatus, the present invention provides a method to achieve detection and diagnosis of locomotive status information record shown in Figure 4, the method includes: Step 401: after collecting the data storage locomotive; Step 402: reading the stored data locomotive after the data are determined according to different classification logic to obtain locomotive event types of events occur car ^ L; step 403: the relevant parameters of the locomotive and all events occurring documents written in the recording format according to a standardized and stored. 步骤404:将处理后的状态数据和故障数据发送给车地无线传输装置和司机室显示屏。 Step 404: The state of the processed data and fault data to the wireless transmission apparatus and the vehicle cab display. 本发明实施例2详细描述了实现机车状态信息检测与诊断记录的方法， 具体为：在发送状态向车载设备发送查询主帧，如果经判断车载设备回送了有效数据信息，便将接收的数据写入数据存储器的相应位置，之后重新开始新一轮的查询；如果经判断车载设备未回送信息或回送信息错误，则重新发送查询主帧，重新查询。 Embodiment of the present invention in detail described implemented method locomotive status information detection and diagnosis recording, specifically: sending a query main frame to the vehicle device transmitting state, if the judged vehicle device sends back valid data information, put the received data write corresponding location in data memory, then start a new round of inquiries; determining if the vehicle-mounted device via the information or not sent back, returning the error message, the main frame is re-transmitted query, the query again. 此外还可以在接收状态接收其它车载设备发送给自己的查询帧，经判断该查询帧有效后立即置为发送状态，并从数据存储器中读取相关数据发送给相应的车载设备，之后重新置为接收状态，准备接收车载设备的运行数据。 Furthermore the reception state may also receive other-vehicle device sends a query to its own frame, immediately after the query is determined by the effective frame set to the transmission state, and read data is sent to the corresponding vehicle device from the data memory, then reset to receiving state, ready to receive operational data on-board equipment. 还可以在接收状态实时侦听总线上的通信，并接收需要的数据，经判断数据有效后将数据存储在数据存储器的相应位置。 May also listen for the reception state in real time on the communication bus, and receives the desired data, the data is judged valid data is stored after the corresponding location in the data store. 通过上述三种方式实现与车载设备的通信并采集数据后存储，但本发明不局限于只通过以上方式来采集lt据。 Communication is achieved by way of the three-vehicle device after collection and data storage, but the present invention is not limited only to data collected in the above manner lt. 在采集数据并存储后，对所有数据按照不同机车事件类型进行分类处理：① 数字量事件处理：对数据中所有的数字量事件进行——判断，判断依据是数字量事件发生从0到1或从1到0的变化，如果本次判断出来至少有一个数字量事件发生了变化就将这些发生变化的数字量事件以及相关参数(如日期时间、公里标等）按照统一规范的格式写到记录文件中。 After the data collected and stored all the data processed according to different classification locomotive event types: ① Digital Event Processing: All of the digital data events - determination, it is determined based on the digital event occurred or from 0 to 1 change from 1 to 0, it is determined if the current digital event at least one of a change event will these and related digital parameters (e.g., date and time, and other standard km) is changed in accordance with a standardized format written record file. ② 定时事件处理：对数据中的定时事件进行一一判断，判断依据是定时事件在其规定的时间间隔点上(如时间变化5秒)发生了变化，若本次判断出至少有一个定时事件发生变化就把这些定时事件以及相关参数按照统一规范的;格式写到记录文件中。 ② the timing of the event processing: timing of the event data is determined one by one, is determined based on a timing event (e.g., time, 5 seconds) has changed at the point of its predetermined time interval, if it is determined that this has at least one timing event these changes put the timed events and related parameters in accordance with the unified standard; written to a log file format. ③ 模拟量事件处理：对数据中所有的模拟量事件进行一一判断，判断依据是模拟量事件大于、等于或小于阈值点（如机车速度变化5公里），如果本次判断出来至少有一个模拟量事件发生变化就将这些发生变化的模拟量事件和相关参数（如日期时间、公里标等）按照统一规范的格式写到记录文件中。 ③ analog event processing: the data for all analog events eleven judgment, judge based analog event is greater than, equal to or less than the threshold point (e.g., locomotive speed change 5 km), if the current is determined out of at least one analog these events will change the amount of change of analog and event-related parameters (such as date and time, mileage and other standard) written in accordance with a standardized format log file. ④ 故障事件诊断处理：故障事件可以分为两类，即部件级故障和整车级故障。 ④ diagnosis and treatment failure event: fault events can be divided into two categories, namely component level fault and vehicle-level failures. 部件级故障是其它车载设备对自身能够诊断出的故障，本装置识别后不做诊断处理；整车级故障是需要综合相关机车状态信息进行诊断的故障， 故障诊断的过程是根据故障征兆，运用规则库和推理机按一定的推理策略逐步完成的。 Level fault other member of its own vehicle-mounted device can diagnose the fault, the diagnosis process is not the unit identification; fault is a need for a comprehensive vehicle-level state information related to the locomotive, the failure diagnosis process is diagnosed according to the fault symptom, the use of rule base and inference engine according to a certain gradual completion of reasoning strategies. 规则库是基于故障树设计实现的。 Rule base is based on the fault tree design implementation. 故障树模型是一个基于研究对象结构、功能特征的行为模型，是一种定性的因果模型，以系统最不希望发生的事件为顶事件，以可能导致顶事件发生的其它事件为底事件，并用逻辑门表示事件之间关联的一种倒树状结构的逻辑。 Fault tree model is a behavioral model based on the study structure, function features, is a qualitative causal model to the system most do not want the incident to the top events to other events that may lead to top event for the end of the event, and with correlation between logic gate represents a logical tree structure down. 故障树定性分析的目的是寻找导致顶事件发生的原因或原因组合，识别导致顶事件发生的所有故障模式。 Fault tree qualitative analysis purpose is to find the cause or causes of the top event of a combination of reasons, identify all failure modes lead to top event. 每个故障现象对应一种故障树；例如：如无压无流作为故障树的顶事件， 底事件预备及预备形成的各种逻辑构成了该树的一条枝叶，底事件牵引命令及牵引命令形成的各种逻辑构成了该树的另一条枝叶。 Fault A fault corresponding to each tree; example: If no pressure no flow fault tree as the top event, event preparation and preliminary bottom is formed constitute a logical various branches of the tree, and pulling the end of the event command commanded traction formed various constitute another logical branches of the tree. 推理机控制协调规则库的运行。 Inference engine controls the operation of the coordination rule base. 电力机车系统复杂，情况多变，故障识别的复杂程度不能一概而论，故而在对机车故障进行推理诊断时，采用正向推理与反向推理相结合的办法，既保证了故障推理的准确性又保证了系统运行的高效性：针对一些只需少数规则就能表达清楚的故障，系统采用正向推理的方法，即系统将规则库中已有的信息与规则的前提条件进行匹配，再把匹配成功的规则所对应的结论作为新的事实进行下一轮的规则匹配，直到推导出最终结论。 Electric locomotive Complex systems, the situation is changing, the complexity of the fault identification can not be generalized, and therefore in the locomotive fault diagnosis reasoning, using way forward reasoning and backward reasoning combination of both to ensure the accuracy of fault reasoning and ensure efficient operation of the system: for some of the rules will be able to articulate just a few failures, system uses a forward inference, that the system will be a prerequisite for the rule base in existing information and rules to match, then the match is successful rules corresponding to the conclusions of the fact that as a new rule for the next round of matches until the final conclusion is derived. 在判断机车电气设备是否过载时，都是采用正向推理的方法。 When determining whether locomotive electrical equipment overload, is the forward inference method. 对于复杂故障则采用反向推理方法，这种推理方式，通常是先根据原始信息， 提出一个结论，然后，再用反向推理倒过来查找支持这个结论的证据，反复这个过程，直到得出结果。 For complex fault backward reasoning method is used, this line of reasoning, is usually the first based on the original information, make a conclusion, then, then backward reasoning upside down to find evidence to support this conclusion, repeat this process until the outcome . 具体的，对于所有整车级故障诊断的依据是对导致该故障发生的其它事件按照先后顺序进行逻辑判断，如果每个事件都符合规定的逻辑就可以诊断出发生了某一故障，否则判断为无故障发生；如果本次判断出机车发生了至少1个部件级或整车级的故障，就立即将故障事件和相关参数（如故障发生前后某时间段内相关参数的瞬变数据信息、日期时间、公里标等）按照统一M^范的格式写到记录文件中。 Specifically, for vehicle-level fault diagnosis based on all that other events leading to the failure of logical judgment in accordance with the order, if each event logical provisions can diagnose a fault occurs, otherwise judged no failure; if it is determined that this has occurred the locomotive level or at least one vehicle component level faults on the fault event and related parameters (e.g., data relating to transient fault parameters before and after a certain period of time immediately information, date time, kilometer mark, etc.) written to a log file in accordance with the unified M ^ range of formats. 如以牵引风机继电器故障为例，牵引风机继电器动作过程：当牵引风机断路器闭合、牵引风机隔离开关处于运行位和牵？ As an example to traction fan relay failure, pulling the fan relay process: When the circuit breaker is closed fan traction, pulling the fan in a running position disconnector and the retractor? 1风机接触器吸合三个条件成立时，牵引风机即会启动起来，当风机达到一定的转速时，就能使牵引风机继电器达到其最低额定动作值，使其闭合。 1 fan contactor closed three conditions are satisfied, i.e., pulling the fan starts up, when a certain rotational speed of the fan, the fan will be able to relay the traction action reaches its minimum rated value, causing it to close. 牵引风机继电器故障是以牵引风机启动信号和牵引风机继电器的动作反馈信号来综合判断的，先对牵引风机启动信号的三个必要条件进行判断，如果确定牵引风机已经启动，再判断牵引风机继电器的动作反馈信号，如果未收到牵引风机继电器闭合的信号，则可以确定出现了牵引风机继电器故障。 Traction fan is pulling air blower relay fault operation start signal and the feedback signal to the traction fan relay comprehensive judgment, the first of three necessary conditions traction fan start signal is judged, if it is determined traction fan has started, then the fan is determined traction relay operation of the feedback signal, if the traction fan relay closure signal is not received, it can be determined that a traction fan relay failure. ⑤特殊事件处理：特殊事件记录是一些无规律输入的单个数据或多项数据的数据记录，该事件记录的内容可以不受限制，可用于系统的初始化阶^a、故障信息产生之时、某一事件发生之时或有地面请求之时。 Special event process ⑤: special event is a single data record number or irregular input data record items of data, which is recorded content event may not be limited, can be used for the generation of the initialization order of the system ^ a, failure information, a when the occurrence of an event or the ground of the request. 如果本次判断出来至少有一个特殊事件发生就将这些特殊事件和相关参数（如日期时间、公里标等）按照统一规范的格式写到记录文件中。 If it is determined this time that at least one of these special events will special events and associated parameters (e.g., date and time, and other standard km) in accordance with a standardized format written to the log file. 在记录文件后，机车如有故障事件发生，立即将故障信息按照严重等级从高到低依次发送到车地无线传输装置和司机室显示屏显示。 After the log file, if the locomotive fault event occurs, immediately turn the failure information is sent wirelessly to the vehicle transmission device and the display shows the driver's cab in accordance with the severity level from high to low. 同时定时判断从地面发送的点播信息，并回送相应的数据（包括状态信息、记录文件、故障发生前的历史数据）给地面；还可以实时接收地面发送来的故障处理建议，送到显示器显示。 While the timing is determined on-demand information transmitted from the ground, sending back the corresponding data (including state information, log file, historical data prior to the failure) to the ground; may also receive troubleshooting recommendations ground transmitted in real time to the monitor. 以上所述的实施例仅为本发明的较佳实施例而已，并不用以限制本发明， 凡在本发明的精神和原则之内，所作的任何修改、等同替换、改进等，均应包含在本发明的保护范围之内。 Merely the preferred embodiment of the present invention, the above-described embodiment embodiments only, not intended to limit the present invention, any modifications within the spirit and principle of the present invention, the, equivalent substitutions, improvements should be included in the within the scope of the present invention.