CN109104325A - Train network data transmission method, system and its apparatus based on CANopen agreement - Google Patents

Train network data transmission method, system and its apparatus based on CANopen agreement Download PDF

Info

Publication number
CN109104325A
CN109104325A CN201710477075.2A CN201710477075A CN109104325A CN 109104325 A CN109104325 A CN 109104325A CN 201710477075 A CN201710477075 A CN 201710477075A CN 109104325 A CN109104325 A CN 109104325A
Authority
CN
China
Prior art keywords
node
network
channel
message
sent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710477075.2A
Other languages
Chinese (zh)
Other versions
CN109104325B (en
Inventor
磨俊生
曾文晓
赵龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BYD Co Ltd
Original Assignee
BYD Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN201710477075.2A priority Critical patent/CN109104325B/en
Publication of CN109104325A publication Critical patent/CN109104325A/en
Application granted granted Critical
Publication of CN109104325B publication Critical patent/CN109104325B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40052High-speed IEEE 1394 serial bus
    • H04L12/40078Bus configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40169Flexible bus arrangements
    • H04L12/40176Flexible bus arrangements involving redundancy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Cardiology (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a kind of train network data transmission method, system and its apparatus based on CANopen agreement, wherein, applying in movable host node includes: to monitor the PDO message for respectively passing through the transmission of the first channel CAN from node relevant to movable host node on primary network according to preconfigured network node list;Judgement respectively from the first channel CAN of node whether failure;If failure, and be switched to backup network and monitor the PDO message that first node passes through the transmission of the 2nd channel CAN, wherein first node is that any one is relevant to movable host node from node;If receiving first node in backup network in preset the first heart beat cycle corresponding with first node passes through the PDO message that the 2nd channel CAN is sent, the data that first node is sent then are received on the backup route, meanwhile the data that other normal slave nodes for sending PDO message are sent are received on primary network.Thereby it is ensured that the good operation of vehicle, improves the redundancy effect of train network.

Description

Train network data transmission method, system and its apparatus based on CANopen agreement
Technical field
The present invention relates to vehicle communication technical field more particularly to a kind of train network data based on CANopen agreement Transmission method, system and its apparatus.
Background technique
Train Communication Network application at present is more widely Train Communication Network (TCN) bussing technique, and TCN is covered MVB (multifunctional vehicle bus), WTB (wired train bus), Ethernet, CAN (fieldbus) these four buses.For MVB, WTB, Ethernet, CAN these four buses design requirement in, a common requirement is network redundancy design.It is so-called Network redundancy refers to that a backup network should be set up again for each communication network, i.e., each node can use A on network The two-wire connection type of line and B line can be realized by backup network and be communicated, it is ensured that is each on network when a network fails Product data interaction is unimpeded, and the running environment of Train Communication Network is made to have high availability.
If usual Train Communication Network design carries out data interaction using CAN bus, most cases can be all based on A kind of CANopen (CAN bus based high-level communications protocol is a kind of current Industry Control commonly fieldbus) design, The definition of CANopen is the standardization application layer protocol based on CAN bus design, and CANopen agreement is that tradition CAN has supported one Perfect network management mechanism is covered, to support redundant network to design.It is all to require currently based on the redundant network design of CANopen All-network node two-way sends data simultaneously, but all nodes of default situations only obtain data from primary network, when some or It is certain from node in primary net drop, be switched to the data that backup network receives the part of nodes, receive the part of nodes The backup network that is uniformly switched to of data receives data, but if being the channel of multiple nodes break downs is not in the same net When network, hidden danger is will be present in this strategy, for example, multiple nodes if a failure occurs some in primary network, another part In backup network, then aforesaid way is used, no matter is uniformly switched to which network receives data, can all lead to some Node data does not receive, thus, due to receiving the imperfect of data, the realization of partial function is influenced, and then influence vehicle Operation.
Summary of the invention
The purpose of the present invention is intended to solve above-mentioned one of technical problem at least to a certain extent.
For this purpose, the first purpose of this invention is to propose a kind of train network data transmission based on CANopen agreement Method, this method ensure that the good operation of vehicle, improves the redundancy effect of train network.
Second object of the present invention is to propose another train network transmission side data based on CANopen agreement Method.
Third object of the present invention is to propose a kind of movable host node.
Fourth object of the present invention is to propose a kind of from node.
5th purpose of the invention is to propose a kind of train network data transmission system based on CANopen agreement.
6th purpose of the invention is to propose a kind of computer equipment.
7th purpose of the invention is to propose another computer equipment.
8th purpose of the invention is to propose a kind of storage medium.
9th purpose of the invention is to propose another storage medium.
To achieve the goals above, a kind of train based on CANopen agreement that first aspect present invention embodiment proposes Network data transmission method, comprising the following steps: the method is applied in movable host node, comprising the following steps: according to preparatory The network node list of configuration is monitored relevant to the movable host node respectively logical by the first CAN from node on primary network The PDO message that road is sent;According to the reception condition to the PDO message respectively sent from node, and according in PDO message The timing situation that disable time is the heartbeat timer being respectively correspondingly arranged from node is produced, is judged described respectively from the of node One channel CAN whether failure;If not in the primary network in preset the first heart beat cycle corresponding with first node The PDO message for receiving the first node, then know the first CAN channel failure of the first node, and is switched to spare First node described in network monitoring passes through the PDO message that the 2nd channel CAN is sent, wherein the first node is any one It is relevant from node to the movable host node;If described standby in preset the first heart beat cycle corresponding with first node The first node is received with network and passes through the PDO message that the 2nd channel CAN is sent, then institute is received in the backup network The data of first node transmission are stated, meanwhile, other normal slave nodes for sending PDO message are received on the primary network to be sent Data.
To achieve the goals above, another column based on CANopen agreement that second aspect of the present invention embodiment proposes Vehicle network data transmission method, the method are applied from node, comprising the following steps: are arranged according to preconfigured network node Table is monitored on primary network passes through the PDO message that the first channel CAN is sent from the relevant each node of node to described: according to right The reception condition for the PDO message that each node is sent, and according to the production disable time in PDO message be each node The timing situation for the heartbeat timer being correspondingly arranged, judge each node the first channel CAN whether failure;If preset The PDO message of the second node is not received in heart beat cycle corresponding with second node on the primary network, then Know the first CAN channel failure of the second node, and is switched to the backup network monitoring second node and passes through the 2nd CAN The PDO message that channel is sent, wherein the second node is that any one leads from node is relevant from node or activity to described Node;If receiving the second node in the backup network in preset heart beat cycle corresponding with second node to pass through The PDO message that 2nd channel CAN is sent then receives the data that the second node is sent in the backup network, meanwhile, The data that other normal nodes for sending PDO message are sent are received on the primary network.
To achieve the goals above, a kind of movable host node that third aspect present invention embodiment proposes, comprising: the first prison Module is listened, it is relevant each to the movable host node for being monitored on primary network according to preconfigured network node list Pass through the PDO message that the first channel CAN is sent from node;First judgment module, for basis to described respectively from node transmission The reception condition of PDO message, and according to the production disable time in PDO message be the heartbeat being respectively correspondingly arranged from node The timing situation of timer, judge it is described respectively from the first channel CAN of node whether failure;First knows module, for pre- If the first heart beat cycle corresponding with first node in not the primary network receive the first node PDO report Wen Shi knows the first CAN channel failure of the first node;Described first monitors module, is also used to be switched to backup network It monitors the first node and passes through the PDO message that the 2nd channel CAN is sent, wherein the first node is any one and institute It is relevant from node to state movable host node;First receiving module, in preset the first heartbeat week corresponding with first node In phase when the backup network receives the PDO message that the first node is sent by the 2nd channel CAN, described spare The data that the first node is sent are received on network, meanwhile, other normal transmission PDO messages are received on the primary network Slave node send data.
To achieve the goals above, what fourth aspect present invention embodiment proposed is a kind of from node, comprising: second monitors mould Block passes through to described from the relevant each node of node for being monitored on primary network according to preconfigured network node list The PDO message that first channel CAN is sent;Second judgment module, for the reception according to the PDO message sent to each node Situation, and according to the production disable time in PDO message be the timing feelings of heartbeat timer that each node is correspondingly arranged Condition, judge each node the first channel CAN whether failure;Second knows module, in preset and second node pair Described second is not known when receiving the PDO message of the second node on the primary network in the heart beat cycle answered First CAN channel failure of node;Described second monitors module, and it is logical to be also used to be switched to the backup network monitoring second node Cross the 2nd channel CAN transmission PDO message, wherein the second node be any one to it is described relevant from section from node Point or movable host node;Second receiving module is used in preset heart beat cycle corresponding with second node described spare When network receives the PDO message that the second node is sent by the 2nd channel CAN, in the backup network described in reception The data that second node is sent, meanwhile, the number that other normal nodes for sending PDO message are sent is received on the primary network According to.
To achieve the goals above, a kind of train based on CANopen agreement that fifth aspect present invention embodiment proposes Network data transmission system, including movable host node described in third aspect present invention embodiment;Described in fourth aspect embodiment Slave node, primary network;Backup network.
To achieve the goals above, a kind of computer equipment that sixth aspect present invention embodiment proposes, including memory, Processor and storage are on a memory and the computer program that can run on a processor, wherein described in the processor execution The train network transmission side data based on CANopen agreement described in first aspect present invention embodiment is realized when computer program Method.
To achieve the goals above, a kind of computer equipment that seventh aspect present invention embodiment proposes, including memory, Processor and storage are on a memory and the computer program that can run on a processor, wherein described in the processor execution The train network transmission side data based on CANopen agreement described in second aspect of the present invention embodiment is realized when computer program Method.
To achieve the goals above, a kind of storage medium that eighth aspect present invention embodiment proposes, for storing application Program, the application program are used to execute the train net based on CANopen agreement as described in first aspect present invention embodiment Network data transmission method.
To achieve the goals above, a kind of storage medium that ninth aspect present invention embodiment proposes, for storing application Program, the application program are used to execute the train net based on CANopen agreement as described in second aspect of the present invention embodiment Network data transmission method.
Technical solution provided in an embodiment of the present invention can include the following benefits:
It is monitored on primary network according to preconfigured network node list relevant respectively from node to movable host node The PDO message sent by the first channel CAN, according to the reception condition to the PDO message respectively sent from node, and according to Production disable time in PDO message is the timing situation for the heartbeat timer being respectively correspondingly arranged from node, is judged respectively from node The first channel CAN whether failure, if not in primary network in preset the first heart beat cycle corresponding with first node The PDO message for receiving first node, then know the first CAN channel failure of first node, and is switched to backup network monitoring First node passes through the PDO message that the 2nd channel CAN is sent, if in preset the first heart beat cycle corresponding with first node First node is received in backup network and passes through the PDO message that the 2nd channel CAN is sent, then receives first segment on the backup route The data that point is sent, meanwhile, the data that other normal slave nodes for sending PDO message are sent are received on primary network.As a result, When some or it is certain from node in primary net drop, be switched to backup network and receive data of the part from node, other It is still received on primary network from node data, ensure that the complete reception to correlation from node data, ensure that vehicle Good operation, improves the redundancy effect of train network.The additional aspect of the present invention and advantage will parts in the following description It provides, partially will become apparent from the description below, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is train network structural schematic diagram according to prior art;
Fig. 2 (a) is that there are risk schematic diagrames for the transmission of train network structured data according to prior art;
Fig. 2 (b) is that train network structured data transmission according to the present invention overcomes risk schematic diagram;
Fig. 3 is the train network data transmission method based on CANopen agreement of one embodiment according to the present invention Flow chart;
Fig. 4 is the example topological diagram of the train redundant network data transmission method of one embodiment of the invention;
Fig. 5 be according to the present invention cited primary network-bus failure when each node receive data instance figure;
Fig. 6 is the train network data transmission method based on CANopen agreement of second embodiment according to the present invention Flow chart;
Fig. 7 is the train network data transmission method based on CANopen agreement of third embodiment according to the present invention Flow chart;
Fig. 8 is the train network data transmission method based on CANopen agreement of the 4th embodiment according to the present invention Flow chart;
Fig. 9 is the structural schematic diagram of the movable host node of one embodiment according to the present invention;
Figure 10 is the structural schematic diagram of the host node of second embodiment according to the present invention;
Figure 11 is the structural schematic diagram of the host node of third embodiment according to the present invention;
Figure 12 is the structural schematic diagram of the host node of the 4th embodiment according to the present invention;
Figure 13 is the structural schematic diagram of the movable host node of the 5th embodiment according to the present invention;
Figure 14 is the structural schematic diagram of the movable host node of the 6th embodiment according to the present invention;
Figure 15 is the structural schematic diagram of the movable host node of the 7th embodiment according to the present invention;
Figure 16 is the structural schematic diagram of the slave node of one embodiment according to the present invention;
Figure 17 is the structural schematic diagram of the slave node of second embodiment according to the present invention;
Figure 18 is the structural schematic diagram of the slave node of third embodiment according to the present invention;
Figure 19 is the structural schematic diagram of the slave node of the 4th embodiment according to the present invention;
Figure 20 is the knot of the train network data transmission system according to an embodiment of the invention based on CANopen agreement Structure schematic diagram;
Figure 21 is according to host node receives schematic diagram data when the first CAN channel failure of node cited by the present invention;With And
Figure 22 be according to cited by the present invention when the first CAN channel failure of node from node receive schematic diagram data.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
Below with reference to the accompanying drawings describe the embodiment of the present invention the train network data transmission method based on CANopen agreement, System and its apparatus.
Specifically, by the redundant network design method in currently existing technology it is found that due to use at present CAN bus as For the train of communication network using fewer, i.e., the network architecture built with CAN bus is relatively simple, or even has applied at this stage On the train of CAN bus all properly consider network redundancy design, even there is this respect consideration, many vehicular manufacturer by It is limited in technical conditions, while in order to keep the processing of network node software logic simple, it can rapidly meet network establishment, so existing Having fairly perfect strategy is exactly that all nodes all send data in primary network and backup network simultaneously, but can only select wherein One network receives data, regardless of which node has gone offline on primary network, is uniformly switched to its relevant node spare Reception handles the go offline data of node and the data of other associated nodes on network.
For example, as shown in 1 example of attached drawing, network node A, C need the data of receiving node B, and node D, E do not connect The data for receiving node B, when the first CAN channel failure of node B, node A and node C switch to backup network and receive up Data, this ensures that normally receiving the data of node B.
However, such processing mode can have a kind of risk, as shown in attached drawing 2 (a) example, node A needs to receive section The data of point B and node C, but when the first CAN channel failure of node B and node the 2nd CAN channel failure of C, by existing way Node A can only take a network data, therefore can only select to abandon the data of node B or node C, but actual conditions node The data of B and node C are all critically important for node A, as soon as the data that can only be received, that will affect node A function, Jin Erying Vehicle operation is rung, redundancy effect is just had a greatly reduced quality, and redundancy purport meaning is not embodied.
In order to solve in the prior art, which there are part of nodes data, in whens multiple node difference channel failures to be normally received The technical issues of, in train network data transmission method proposed by the present invention, in the base of existing train network Redundancy Design structure On plinth, a kind of train redundant network data transmission scheme scheme is provided, can effectively avoid the primary network channel failure of part of nodes And some node datas need to be given up when part of nodes backup network channel failure, while also improving the practical effect of Redundancy Design Fruit has evaded the problem of some vehicle network failures cause vehicle operation to be obstructed well, can guarantee under some abnormal conditions, The each node of network still can be with normal communication.
Wherein, it is emphasized that, train network data transmission method of the invention is executed based on CANopen agreement , wherein the role for thering is a node to serve as host node in CANopen protocol requirement network, to manage other from the first of node The work such as beginningization, starting, supervision, reset or stopping.
In order to more clearly be said to the train network data transmission method of the invention based on CANopen agreement It is bright with reference to specific embodiments to concentrate on this method and apply to be described in movable host node side, be described as follows:
Wherein, in order to preferably execute the train network transmission side data based on CANopen agreement of the embodiment of the present invention Method has certain design requirement to host node, since host node is as network administrator's identity, so can be than more than the node The function of network state control, i.e. host node, which need to send network-control with backup network to primary network simultaneously after powering on, to be referred to It enables, control enters operation mode from the channel node two-way CAN, while synchronization can be sent together with backup network to primary network The messages such as packet, timestamp, urgent object.
Fig. 3 is the train network data transmission method based on CANopen agreement of one embodiment according to the present invention Flow chart, as shown in figure 3, this method comprises:
S101, monitored on primary network according to preconfigured network node list it is relevant to movable host node respectively from Node passes through the PDO message that the first channel CAN is sent.
Wherein, PD0 (Process Data Object, process data object) is provided pair for transmitting real-time data The direct access path of equipment application object, it is used to transmit real-time short frame data, priority with higher.
In PDO message monitoring mechanism, using in PDO object dictionary about messaging parameter index production disable time come As a node is defined, whether there is or not the crucial decision conditions to go offline.PDO messaging parameter structure is as shown in table 1 below.
Table 1
It is appreciated that establishing an all-network node listing according to topological diagram the present invention claims host node (can configure ), wherein network node list includes: relevant to movable host node respectively from node identification and corresponding heartbeat timer, In, respectively it is arranged from the corresponding heartbeat timer of node according to the production disable time in PDO message, from primary network and spare net Network sends network-control instruction from node to all simultaneously, and control enters from the first channel CAN of node and the 2nd channel CAN PDO message operation mode, and start relevant respectively from the corresponding heartbeat timer of node to the movable host node.
I.e. CANopen object dictionary about in RPDO object indexing (1400h to 15FFh) according to the time limit that actually goes offline Judgement demand gives each node selection one of them representative PDO respectively, when forbidding further according to the production in these PDO indexes Between parameter be respectively that a Heart rate meters is arranged in each node.
In turn, host node is after entering mode of operation, and host node can continue to detect each node PDO transmission situation, due to silent Recognize primary network work, thus, it is monitored on primary network according to preconfigured network node list and movable host node phase Each PDO message for passing through the transmission of the first channel CAN from node closed, in order to judge respectively from node according to message reception condition Whether go offline.
S102 prohibits according to the reception condition to the PDO message respectively sent from node, and according to the production in PDO message Only the time is the timing situation for the heartbeat timer being respectively correspondingly arranged from node, judgement respectively from the first channel CAN of node whether Failure.
It should be understood that in PDO message transmission mechanism, subindex 03h produces disable time with continued reference to upper table 1 It indicates to receive one PDO data of processing in preset time, if not receiving corresponding PDO data, node within a preset time It will record the PDO message frame losing, when not receiving PDO data in a production disable time, then Heart rate meters starts counting, When Heart rate meters is added to a preset value, host node can determine that the node goes offline.Therefore, in embodiments of the present invention, For the timing situation of production disable time setting heartbeat timer, thus, according to connecing to the PDO message respectively sent from node Situation is received, and is the timing feelings for the heartbeat timer being respectively correspondingly arranged from node according to the production disable time in PDO message Condition, judgement respectively from the first channel CAN of node whether failure.
Wherein, if the first CAN tunneling traffic from node is good, within the regular hour, host node can be normal The PDO message sent from node is received, otherwise, from the first CAN tunneling traffic failure of node.
S103, if not receiving first in primary network in preset the first heart beat cycle corresponding with first node The PDO message of node, then know the first CAN channel failure of first node, and it is logical to be switched to backup network monitoring first node Cross the PDO message of the 2nd channel CAN transmission.
Wherein, first node is that any one is relevant to movable host node from node.
Specifically, in preset the first heart beat cycle corresponding with first node, if do not connect on primary network The PDO message for receiving first node then shows the original of PDO message for causing movable host node not receive first node transmission Cause is caused by the first CAN channel failure, thus in order to guarantee that movable host node can normally receive the PDO report of first node Text maintains the normal operation of vehicle, is switched to backup network and monitors the PDO message that first node passes through the transmission of the 2nd channel CAN.
It is emphasized that movable host node can only monitor the PDO message of first node from backup network at this time, for it His the first channel CAN is trouble-free from node, still receives PDO message in primary network, thus, as shown in Fig. 2 (b), node A is needed The data of receiving node B Yu node C are wanted, when the first CAN channel failure of node B and node the 2nd CAN channel failure of C, according to this The data transmission method of invention, node A are sent by the data of primary network receiving node C from backup network receiving node B Data, thus can node B and node C data, ensure that the normal function of node A, and then guarantee that vehicle is well run, redundancy Effect enhancing.
In another embodiment of the present invention, if receiving first node in preset first heart beat cycle PDO message, then can be by resetting self-healing, to continue from primary net when showing the data transmission failure from node The data that first node is sent are received on network.
S104, if receiving first node in backup network in preset the first heart beat cycle corresponding with first node The PDO message sent by the 2nd channel CAN then receives the data that first node is sent on the backup route, meanwhile, primary The data that other normal slave nodes for sending PDO message are sent are received on network.
Specifically, if receiving first node in the first heart beat cycle corresponding with first node passes through the 2nd CAN The PDO message that channel is sent, then show that the 2nd CAN channel function is normal, sends to receive first node on the backup route Data, meanwhile, the data that other normal slave nodes for sending PDO messages are sent are received on primary network.
As a result, according to the above-mentioned description to the train network data transmission method based on CANopen agreement, with reference to row Design and track industry maturation fieldbus redundancy scheme of the industry specification CIA302-6 for CAN redundancy, it is desirable that the present invention is real The network architecture of example is applied with reference to attached drawing 4, two host nodes of network setup, one is movable host node, another is the main section of backup Point, when movable host node breaks down, the function of backup host node movable host node before just will do it instead.
That is, in one embodiment of the invention, if detecting movable host node failure, being switched to spare master Node is relevant to other to carry out data interaction from node.
In addition the node on all-network all uses A, B two to connect CAN line, and A line definitions are primary network, B route It is defined as backup network, all nodes at runtime, can be simultaneously toward sending information on A line and B line, but in initial default Only information can be received on A line, but node must be supported to receive information in A line and B line simultaneously, as a result, when one from node The first channel CAN when breaking down, the data of the node are received from standby node, are not had for remaining the first channel CAN The slave node to break down still receives its data sent from primary network, thereby guarantee to correlation from the complete of node data Whole reception ensure that normal good operation.
Certainly, the above-mentioned description to the embodiment of the present invention, defaults primary network and backup network communicates no failure, in reality Border in application, primary network and backup network are likely to occur failure, thus, after movable host node itself enters mode of operation, Also execute bus failure decision mechanism.
Specifically, all CAN controllers all must include a transmission error count according to CAN bus characteristic requirements Device and a reception wrong timing device, error detection mechanism defined in combined data link layer, when detecting that bus communication is different Chang Shi, error counter can enable, and counting is added to 255 nodes and enters bus off (bus-off) state.Even activity is main Transmission error counter or reception error counter in node are added to default value, then know primary network failure, cut Backup network is changed to be communicated with other nodes.
Now requirement activity host node monitors primary network and backup network bus state simultaneously, when the primary net of movable host node When network bus failure (for example, CAN line voltage is abnormal, erroneous frame excessively leads to busoff etc.), movable host node is first Standby host node message can be parsed, determines whether to enable standby host node, if standby host node can normally serve as movable work Dynamic master node roles, movable host node is out of service to enter silent status, and standby host node starting serves as movable host node, such as Fruit standby host node is currently in malfunction, can not serve as movable master node roles, that current active host node continues to Operation, and it is all from node data to immediately pass to backup network processing, while movable host node can be logical to instrument or other equipment Primary network is reported to be currently at malfunction, if failure also occurs in current backup network, communication network enters paralysis shape State, all nodes enter vehicle special operation state.
Wherein, the accumulative number 255 of above-mentioned error counter, a kind of only example, not according to concrete application demand Together, when movable host node sends wrong timing device or acceptance error timer is added to the default value arbitrarily met the requirements When, know primary network failure, is switched to backup network and is communicated with other nodes.
For example, as shown in figure 5, all nodes on the i.e. primary network of short trouble occurs in primary network-bus all can not Normal communication, the error counter of each node all can persistently add up, when each node determines that primary network channel enters After busoff state, it all can voluntarily be switched to backup network and receive respectively required data.
It is emphasized that be based on above description, in practical applications, it is possible to the channel CAN occur failure be not Operation pause etc. caused by permanent failure, such as network speed mutation, thus, in order to avoid the wave of resource caused by unnecessary switching Take, in one embodiment of the invention, reset instruction is sent to the channel failure CAN, according to the reception of PDO message after reset Whether situation, judgement currently break down really.
Specifically, in one embodiment of the invention, being informed in preset first heart beat cycle in judgement does not have After the PDO message for receiving first node, the first CAN channel failure is not judged directly, but from primary network to first Node sends reset instruction, so that the first channel CAN enters operation original state.
In turn, continue to monitor the PDO message that first node is sent on primary network, if in preset and first node It is not received by the PDO message of first node in corresponding second heart beat cycle, then knows the first channel the CAN event of first node Barrier, and be switched to backup network and monitor the PDO message that the first node is sent.
If receiving the PDO message of first node in preset second heart beat cycle, the of first node is known One CAN channel failure be it is temporary, by homing action exclude, thus primary network monitoring first node send PDO message.
Based on same principle, if when being switched to the PDO message of the 2nd CAN channel reception first node transmission pre- If the first heart beat cycle corresponding with first node in do not receive first node by the 2nd channel CAN send PDO report Text does not judge the 2nd CAN tunneling traffic failure directly then, but from backup network to first node transmission reset instruction, and Continue the PDO message that monitoring first node is sent in backup network.
If receiving first node in the second heart beat cycle corresponding with first node to send by the 2nd channel CAN PDO message, then know the 2nd CAN channel failure of first node be it is temporary, by homing action exclude, thus The data that first node is sent are received in backup network, meanwhile, received on primary network other it is normal send PDO messages from The data that node is sent.
If being not received by first node in the second heart beat cycle corresponding with first node passes through the 2nd channel CAN The PDO message of transmission then knows the 2nd CAN channel failure of first node.
It is emphasized that the duration of above-mentioned first heart beat cycle and the second heart beat cycle, it can be according on business scene Need to make by oneself calibration, the first heart beat cycle and the second heart beat cycle may be the same or different.
In conclusion the train network data transmission method based on CANopen agreement of the embodiment of the present invention, according to preparatory The network node list of configuration is monitored on primary network relevant to movable host node respectively passes through the first channel CAN hair from node The PDO message sent is forbidden according to the reception condition to the PDO message respectively sent from node, and according to the production in PDO message Time is the timing situation for the heartbeat timer being respectively correspondingly arranged from node, and whether judgement is respectively former from the first channel CAN of node Barrier, if not receiving the PDO of first node in primary network in preset the first heart beat cycle corresponding with first node Message, then know the first CAN channel failure of first node, and is switched to backup network monitoring first node and passes through the 2nd CAN The PDO message that channel is sent, if receiving the in backup network in preset the first heart beat cycle corresponding with first node One node passes through the PDO message that the 2nd channel CAN is sent, then receives the data that first node is sent on the backup route, meanwhile, The data that other normal slave nodes for sending PDO message are sent are received on primary network.As a result, when some or it is certain from node In primary net drop, it is switched to backup network and receives data of the part from node, other are from node data still in master It is received on network, ensure that the complete reception to correlation from node data, ensure that the good operation of vehicle, improve train The redundancy effect of network.
Based on above embodiments, in order to further increase the train network data transmission method based on CANopen agreement Stability and reusability, according to the fault message of real-time exhibition current train network the case where sending data, in order to correlation behaviour Make personnel and repaired as early as possible according to fault message, to improve the stability of train network data transmission.
Fig. 6 is the train network data transmission method based on CANopen agreement of second embodiment according to the present invention Flow chart, as shown in fig. 6, after above-mentioned steps S104 further include:
S201, if being not received by the backup route in preset the second heart beat cycle corresponding with first node The PDO message that one node is sent, then to the first channel CAN and the 2nd channel CAN for running monitoring node transmission first node Current failure message, and it is shown to operator, prompt current failure maintenance.
Wherein, the data that the slave node worked normally is sent be can receive in above-mentioned second heart beat cycle, in addition above-mentioned prison Node is controlled in the case where concrete application demand is different, can be different devices, for example, can be instrument display screen, terminal is set Standby application interface etc., herein with no restrictions.
Specifically, it is sent out less than first node by the 2nd channel CAN if received in preset second heart beat cycle The PDO message sent then shows that the 2nd channel CAN is also broken down, thus, for the ease of relevant operation personnel's timely learning failure Situation is to carry out troubleshooting, to the current of the first channel CAN and the 2nd channel CAN for running monitoring node transmission first node Failure message, and it is shown to operator, prompt current failure maintenance.
For example, in this example, preset second heart beat cycle is a heart beat cycle, and operation monitoring node is aobvious Display screen, then if a heart beat cycle still monitors the PDO message less than first node, movable host node on the backup route Directly be notified to the primary network of the first node to instrument display screen and backup network all broken down (fault type be it is current therefore Barrier), it prompts to overhaul the primary network of the node with backup network.
S202, continue on primary network and backup network monitor first node send PDO message, if it is preset with The PDO message for receiving first node in corresponding first heart beat cycle of first node from primary network, then know first node The first CAN routing restoration communication, then be switched on primary network receive first node send data, and to operation monitoring section Point sends the current failure message in the 2nd channel CAN of first node, and is shown to operator, prompts current failure maintenance.
Specifically, when communication failure all occurs in node two-way, movable host node need to continue in primary network and backup network Continue to monitor the data that the node is sent, if malfunctioning node primary network in midway is communicated with one of backup network recovery, Then communicated by the network restored.
For example, continue to monitor what first node was sent by the first channel CAN on primary network and backup network PDO message, if malfunctioning node primary network in midway is communicated with one of backup network recovery, i.e., host node is in primary network Upper a heart beat cycle can receive the PDO message of the first node, then host node received on the network of recovery processing this One node data, but still can be notified to the first node road network to operation monitoring node (such as instrument display screen) is history event Barrier and another road network are current failure.
S203 continues to monitor the PDO message that first node is sent on the backup route, if in preset and first node pair The PDO message of first node is received in the first heart beat cycle answered from backup network, then sends first to operation monitoring node First channel CAN of node and the historical failure message in the 2nd channel CAN are simultaneously shown to operator, prompt potential faults maintenance.
In order to enable train network restores that it is logical to continue monitoring first node on the backup route to improve its stability comprehensively The PDO message for crossing the transmission of the 2nd channel CAN, for example, if the primary network of midway malfunctioning node and backup network are all restored Communication, then movable host node only need to handle correlation from node data on primary network, but still can monitor node (such as to operation Instrument display screen etc.) it is notified to the primary network of the first node and historical failure all occurred in spare net, in order to relevant operation people Member excludes security risk, improves the security and stability of train network.
S204, continue on primary network and backup network monitor first node send PDO message, if it is preset with The PDO message for receiving first node in corresponding first heart beat cycle of first node from backup network, then know first node The 2nd CAN routing restoration communication, then from backup network receive first node send data, and to operation monitoring node hair The current failure message in the first channel CAN of first node is sent, and is shown to operator, prompts current failure maintenance.
Specifically, it if the 2nd channel CAN first restores to communicate relative to the first channel CAN, is received from backup network The data that first node is sent, and to the current failure message in the first channel CAN of operation monitoring node transmission first node, and It is shown to operator, prompts current failure maintenance.
S205 continues to monitor the PDO message that first node passes through the transmission of the first channel CAN on primary network, if pre- If the first heart beat cycle corresponding with first node in the PDO message of first node is received from primary network, then be switched to On primary network receive first node send data, and to operation monitoring node send first node the first channel CAN and The historical failure message in the 2nd channel CAN is simultaneously shown to operator, prompts potential faults maintenance.
Specifically, when receiving the data that the 2nd channel CAN is sent by backup network, the case where according to message, judgement Whether the first channel CAN of first node restores to communicate, if restored, is switched on primary network and receives first node transmission Data, and to operation monitoring node send first node the first channel CAN and the 2nd channel CAN historical failure message simultaneously It is shown to operator, prompts potential faults maintenance.
S206, if receiving first segment on the backup route in preset the second heart beat cycle corresponding with first node The PDO message that point is sent, the current failure message in the first channel CAN of first node is sent to operation monitoring node, and is shown To operator, current failure maintenance is prompted.
Specifically, if receiving what first node was sent by the 2nd channel CAN in preset second heart beat cycle PDO message then shows that the 2nd channel CAN can normally provide data service, thus, host node can be somebody's turn to do in spare online reception processing Node related data, the data of other nodes are still handled from reception on primary network, while host node can monitor node to operation The first channel CAN that (such as instrument display screen) is notified to first point of the section is broken down (fault type is current failure), is prompted The primary network of the first node is overhauled.
S207 continues to monitor the PDO message that first node passes through the transmission of the first channel CAN on primary network, if pre- If the first heart beat cycle corresponding with first node in receive the PDO message of first node, then know the of first node The communication of one CAN routing restoration is then switched to and receives the data that first node is sent on primary network.
S208 sends the historical failure message in the first channel CAN of first node to operation monitoring node and is shown to behaviour Work person prompts potential faults maintenance.
Specifically, after prompt relevant operation personnel overhaul the primary network of first node, on primary network Continue to monitor the PDO message that first node passes through the transmission of the first channel CAN, if the primary network recovery of midway failure first node Communication, for example, host node a heart beat cycle on primary network can receive the PDO message of first node, then host node is extensive It is multiple to the first node data are received on primary network, stop the processing from backup network, but host node can still be monitored to operation Node (such as instrument display screen) is notified to the primary network of first node and breaks down (fault type is historical failure), same to prompt The primary network of the first node is overhauled, is confirmed whether that there are potential faults.
In conclusion the train network data transmission method based on CANopen agreement of the embodiment of the present invention, according to train The real-time condition of network carries out the selection of primary network and backup network, and carries out phase to relevant operation personnel in monitoring node The display answered improves the stability and reusability of train network data transmission method.
In order to more clearly illustrate the train network transmission side data based on CANopen agreement of the embodiment of the present invention Method concentrates on describing from node side below in this way.
Wherein, as follows for the design requirement from node:
After receiving host node enabled instruction after powering on from node, into mode of operation, according to itself function and master is combined Node synchronous package frequency sends PDO data, it is desirable that sends data simultaneously from node to primary network and backup network, but defaults In the case of the special objects message such as synchronous package, timestamp of host node is only received from primary network, a only on primary network When the message period does not receive host node special object message, it can just be switched to backup network and go to receive, if in backup network Still a message period does not receive movable host node special object message, then respectively entering from special circumstances from node at this time Reason mode.
Fig. 7 is the train network data transmission method based on CANopen agreement of third embodiment according to the present invention Flow chart, as shown in fig. 7, this method comprises:
S301 is monitored on primary network logical to from the relevant each node of node according to preconfigured network node list Cross the PDO message of the first channel CAN transmission.
It is appreciated that according to network topological diagram establish with from the corresponding network node list of node, wherein network node arranges Table include: to from the relevant each node identification of node and corresponding heartbeat timer, wherein the corresponding heartbeat timer of each node According to the production disable time setting in PDO message.
In turn, network-control instruction is sent from primary network reception activity host node, starts the first channel CAN and second The channel CAN enters PDO message operation mode, and start to from the corresponding heartbeat timer of the relevant each node of node.
Specifically, being monitored according to preconfigured network node list related to from node in practical implementation Each node pass through the first channel CAN send PDO message, in practical applications, under default conditions it is each from node according to net Network node listing monitors related from the PDO message of node transmission situation on primary network.
S302 forbids according to the reception condition of the PDO message sent to each node, and according to the production in PDO message Time is the timing situation of heartbeat timer that each node is correspondingly arranged, judge each node the first channel CAN whether failure.
It should be understood that subindex 03h produces disable time and indicates in preset time in PDO message transmission mechanism One PDO data of processing are received, if not receiving corresponding PDO data within a preset time, node will record the PDO message Frame losing, when not receiving PDO data in a production disable time, then Heart rate meters starts counting, when Heart rate meters is tired When being added to a preset value, host node can determine that the node goes offline.Therefore, in embodiments of the present invention, when forbidding for production Between be arranged heartbeat timer timing situation, thus, according to respectively from node send PDO message reception condition, Yi Jigen It is the timing situation for the heartbeat timer being respectively correspondingly arranged from node according to the production disable time in PDO message, judges respectively from section Point the first channel CAN whether failure.
Wherein, if the first CAN tunneling traffic from node is good, within the regular hour, movable host node can be with The PDO message sent from node is normally received, otherwise, from the first CAN tunneling traffic failure of node.
S303, if not receiving the second section on primary network in preset heart beat cycle corresponding with second node The PDO message of point, then know the first CAN channel failure of second node, and is switched to backup network monitoring second node and passes through The PDO message that 2nd channel CAN is sent.
Wherein, to be any one relevant from node or movable host node to from node for second node.
It is appreciated that in practical application, not received if judgement is informed in heart beat cycle corresponding with second node To the PDO message of second node, then the first CAN channel failure of second node is known, thus in order to maintain train network just Often operation is switched to backup network and monitors the PDO message that second node passes through the transmission of the 2nd channel CAN.
S304 passes through if receiving second node in backup network in preset heart beat cycle corresponding with second node The PDO message that 2nd channel CAN is sent then receives the data that second node is sent on the backup route, meanwhile, in primary network The upper data for receiving other normal nodes for sending PDO message and sending.
Specifically, if receiving second node in heart beat cycle corresponding with second node passes through the 2nd channel CAN The PDO message of transmission then shows that the 2nd CAN channel function is normal, to receive the number that second node is sent on the backup route According to.
Certainly, the above-mentioned description to the embodiment of the present invention, defaults primary network and backup network communicates no failure, in reality Border in application, primary network and backup network are likely to occur failure, thus, after entering mode of operation from node itself, also hold Row bus fault verification mechanism.
That is, (passing through error counter reality from the node meeting primary network of real-time monitoring and backup network bus state It is existing), when from the failure of the first channel CAN of node (CAN line voltage is abnormal, erroneous frame excessively leads to busoff etc.), stand It is all from node data to go to backup network processing, while will record primary network from node and being currently at bus communication exception Malfunction, if bus failure equally also occurs in current backup network, communication network enters state of paralysis, all nodes Into vehicle special operation state.
Specifically, if from node transmission error counter or receive error counter be added to default value, Then know primary network failure, is switched to backup network and is communicated with other nodes.
In conclusion the train network data transmission method based on CANopen agreement of the embodiment of the present invention, according to preparatory The network node list of configuration is monitored on primary network and is sent by the first channel CAN from the relevant each node of node PDO message is according to the reception condition of the PDO message sent to each node, and according to the production disable time in PDO message The timing situation for the heartbeat timer that each node is correspondingly arranged, judge each node the first channel CAN whether failure, if default Heart beat cycle corresponding with second node in the PDO message of second node is not received on primary network, then know First CAN channel failure of two nodes, and be switched to backup network and monitor the PDO that second node passes through the transmission of the 2nd channel CAN Message, if receiving second node in backup network in preset heart beat cycle corresponding with second node passes through the 2nd CAN The PDO message that channel is sent then receives the data that second node is sent on the backup route, meanwhile, it is received on primary network The data that other normal nodes for sending PDO message are sent.As a result, when some or it is certain from node in primary net drop, It is switched to backup network and receives data of the part from node, other are still received on primary network from node data, are guaranteed To correlation from the complete reception of node data, it ensure that the good operation of vehicle, improve the redundancy effect of train network.
Based on above embodiments, in order to further increase the train network data transmission method based on CANopen agreement Stability and reusability, from nodes records send data the case where real-time exhibition current train network fault message, in order to Relevant operation personnel repair as early as possible according to fault message.
Fig. 8 is the train network data transmission method based on CANopen agreement of the 4th embodiment according to the present invention Flow chart, as shown in figure 8, after step s 304 described above further include:
S401, if receiving second node in backup network passes through the PDO message that the 2nd channel CAN is sent, record the The current failure message in the first channel CAN of two nodes.
Specifically, if can receive the data sent to the second node of primary net drop from node, from node The node related data can be handled in spare online reception, other are still handled from reception on primary network from the data of node, and Record the primary network communication failure of the second node.
S402 continues to monitor the PDO message that second node passes through the transmission of the first channel CAN on primary network, if pre- If heart beat cycle corresponding with second node in receive the PDO message of second node, then know the first CAN of second node Routing restoration communication is then switched to and receives the data that second node is sent on primary network.
Specifically, if the primary network recovery communication of the second node of midway failure, for example, from node on primary network Continuous b heart beat cycle can receive the PDO message of the second node, then be restored on primary network from node receive this Two node datas stop the processing from backup network.
S403, if not receiving the PDO report that second node is sent by the 2nd channel CAN in preset heart beat cycle Text then records the current failure message in the first channel CAN and the 2nd channel CAN of second node.
Specifically, if not receiving second node in preset heart beat cycle passes through the PDO that the 2nd channel CAN is sent Message, for example, continuous b heart beat cycle still monitors the PDO message less than the second node on the backup route, then from node It has gone offline depending on the second node, has recorded the primary network of the second node and backup network communication failure.
S404 continues the PDO message for monitoring second node on primary network and backup network, if preset with second The PDO message of second node is received in primary network in the corresponding heart beat cycle of node, then knows the first CAN of second node Routing restoration communication is then switched to and receives the data that second node is sent on primary network.
Specifically, when communication failure all occurs in second node two-way, second node need to continue in primary network and spare net Network continues to monitor second node PDO message, if one of the primary network of midway malfunctioning node and backup network restore logical Letter, for example, second node continuous c heart beat cycle on primary network can receive the PDO message of the second node, then from Node receives on the primary network of recovery handles the second node data, but still will record the primary network in the second node road For historical failure and another road network is current failure.
S405, continue on primary network and backup network monitor second node send PDO message, if it is preset with The first PDO message from node is received from backup network in the corresponding heart beat cycle of second node, then knows second node The communication of 2nd CAN routing restoration then receives the data that second node is sent from backup network.
For example, continuous c heart beat cycle can receive the PDO of the second node to second node on the backup route Message then receives in the backup network of recovery from node and handles the second node data, but still will record the second node should Road backup network is historical failure and another road network is current failure.
S406 continues to monitor the PDO message that second node is sent on primary network, if in preset and second node pair The PDO message for receiving second node in the heart beat cycle answered from primary network, then be switched on primary network and receive the second section The data that point is sent.
It specifically, then only need to be from node if the primary network of midway malfunctioning node and backup network have all restored communication The node data is handled on primary network, but still will record the primary network of the node and historical failure all occurred in backup network.
It is emphasized that the train network data based on CANopen agreement for concentrating on movable host node side description pass Transmission method, it is corresponding with the above-mentioned train network data transmission method based on CANopen agreement for concentrating on describing from node side, Realization principle is similar, and unpub details in the present embodiment, details are not described herein.
In conclusion the train network data transmission method based on CANopen agreement of the embodiment of the present invention, according to train The real-time condition of network carries out the selection of primary network and backup network, and carries out phase to relevant operation personnel in monitoring node The display answered improves the stability and reusability of train network data transmission method.
In order to realize above-described embodiment, the invention proposes a kind of movable host nodes.Fig. 9 is first reality according to the present invention The structural schematic diagram of the movable host node of example is applied, as shown in figure 9, the activity host node includes: the first monitoring module 101, first Judgment module 102, first know module 103 and the first receiving module 104.
Wherein, first monitor module 101, for being monitored on primary network according to preconfigured network node list and Movable host node is relevant respectively to pass through the PDO message that the first channel CAN is sent from node.
Figure 10 is the structural schematic diagram of the movable host node of second embodiment according to the present invention, as shown in Figure 10, such as On the basis of shown in Fig. 9, the activity host node further include: first establishes module 105 and the first control module 106.
Wherein, first module 105 is established, for establishing network node corresponding with movable host node according to network topological diagram List, wherein network node list includes: relevant to movable host node respectively from node identification and corresponding heartbeat timer, Wherein, respectively it is arranged from the corresponding heartbeat timer of node according to the production disable time in PDO message.
First control module 106, for sending network-control from node to all simultaneously from primary network and backup network Instruction, control enter PDO message operation mode from the first channel CAN of node and the 2nd channel CAN, and start and the main section of activity Point is relevant respectively from the corresponding heartbeat timer of node.
First judgment module 102, the reception condition for basis to the PDO message respectively sent from node, and according to PDO Production disable time in message is the timing situation for the heartbeat timer being respectively correspondingly arranged from node, and judgement is respectively from the of node One channel CAN whether failure.
First knows module 103, is used in preset the first heart beat cycle corresponding with first node not primary When network receives the PDO message of first node, the first CAN channel failure of first node is known.
In one embodiment of the invention, first module 101 is monitored, is also used to be switched to backup network and monitors first segment The PDO message that point is sent by the 2nd channel CAN, wherein first node is that any one is relevant to movable host node from section Point.
First receiving module 104 is used in preset the first heart beat cycle corresponding with first node in backup network When receiving the PDO message that first node is sent by the 2nd channel CAN, the number that first node is sent is received on the backup route According to, meanwhile, the data that other normal slave nodes for sending PDO message are sent are received on primary network.
Figure 11 is the structural schematic diagram of the movable host node of third embodiment according to the present invention, as shown in figure 11, such as On the basis of shown in Fig. 9, the activity host node further include: the first sending module 107.
First sending module 107 is used in preset the first heart beat cycle corresponding with first node not primary After network receives the PDO message of first node, reset instruction is sent from primary network to first node.
First monitors module 101, is also used to continue on primary network to monitor the PDO message that first node is sent.
First judgment module 102, be also used to detect in preset the second heart beat cycle corresponding with first node whether The PDO message of first node is received in primary network.
First knows module 103, is also used in preset the second heart beat cycle corresponding with first node not in master When receiving the PDO message of first node with network, then the first CAN channel failure of first node is known.
Figure 12 is the structural schematic diagram of the movable host node of the 4th embodiment according to the present invention, as shown in figure 13, such as On the basis of shown in Fig. 9, the activity host node further include: the second sending module 108.
Wherein, in the present embodiment, the second sending module 108, in preset first heart corresponding with first node In hop cycle not when backup network receives the PDO message of first node, sends and reset from backup network to first node Instruction.
First monitors module 101, is also used to continue the PDO message that monitoring first node is sent in backup network.
First receiving module 104 is also used in preset the second heart beat cycle corresponding with first node in spare net When receiving the PDO message of first node transmission on network, the data that first node is sent are received on the backup route, meanwhile, The data that other normal slave nodes for sending PDO message are sent are received on primary network.
In one embodiment of the invention, Figure 13 is the structure of the movable host node of the 5th embodiment according to the present invention Schematic diagram, as shown in figure 13, on the basis of as shown in Figure 9, the activity host node further include: the first switching module 109.
Wherein, the first switching module 109, by movable host node transmission error counter or receive mistake based on When number device is added to default value, knows primary network failure, be switched to backup network and communicated with other nodes.
Figure 14 is the structural schematic diagram of the movable host node of the 6th embodiment according to the present invention, as shown in figure 15, such as On the basis of shown in Fig. 9, the activity host node further include: the second switching module 110.
Wherein, the second switching module 110, for when detecting movable host node failure, be switched to standby host node with Other are relevant from node progress data interaction.
In conclusion the host node of the embodiment of the present invention, according to preconfigured network node list on primary network The PDO message for respectively passing through the transmission of the first channel CAN from node relevant to movable host node is monitored, according to respectively from node transmission PDO message reception condition, and according to the production disable time in PDO message be the heartbeat meter being respectively correspondingly arranged from node When device timing situation, judgement respectively from the first channel CAN of node whether failure, if preset corresponding with first node the The PDO message of first node is not received in primary network in heart cycle, then knows the first channel CAN of first node Failure, and be switched to backup network and monitor first node and pass through the PDO message that the 2nd channel CAN is sent, if preset with the The PDO report that first node is sent by the 2nd channel CAN is received in backup network in corresponding first heart beat cycle of one node Text then receives the data that first node is sent on the backup route, meanwhile, other normal transmission PDO are received on primary network The data that the slave node of message is sent.As a result, when some or it is certain from node in primary net drop, be switched to backup network Data of the part from node are received, other are still received on primary network from node data, ensure that correlation from node The complete reception of data ensure that the good operation of vehicle, improve the redundancy effect of train network.
Figure 15 is the structural schematic diagram of the movable host node of the 7th embodiment according to the present invention, as shown in figure 15, such as On the basis of shown in Fig. 9, the activity host node further include: the first cue module 111, the second cue module 112.
Wherein, the first cue module 111, for receive first node pass through the 2nd channel CAN send PDO message Later, the current failure message in the first channel CAN of first node is sent to operation monitoring node, and is shown to operator, is mentioned Show that current failure overhauls.
In the present embodiment, first module 101 is monitored, is also used to continue on primary network to monitor first node by the The PDO message that one channel CAN is sent.
First knows module 103, is also used to receive in preset the first heart beat cycle corresponding with first node When the PDO message of one node, the first CAN routing restoration communication of first node is known.
First receiving module 104 is also used to be switched to the data that first node transmission is received on primary network.
Wherein, in one embodiment of the invention, the first cue module 111 is also used on being switched to primary network After receiving the data that first node is sent, the historical failure in the first channel CAN of first node is sent to operation monitoring node Message is simultaneously shown to operator, prompts potential faults maintenance.
Second cue module 112 is used in preset the second heart beat cycle corresponding with first node in backup network On be not received by first node transmission PDO message when, to operation monitoring node send first node the first channel CAN and The current failure message in the 2nd channel CAN, and it is shown to operator, prompt current failure maintenance.
In the present embodiment, first module 101 is monitored, is also used to continue monitoring first on primary network and backup network The PDO message that node is sent.
First knows module 103, is also used in preset the first heart beat cycle corresponding with first node from primary net When network receives the PDO message of first node, the first CAN routing restoration communication of first node is known.
First receiving module 104 is also used to be switched to the data that first node transmission is received on primary network.
In one embodiment of the invention, the second cue module 112 is also used to send first segment to operation monitoring node The current failure message in the 2nd channel CAN of point, and it is shown to operator, prompt current failure maintenance.
First monitors module 101, is also used to continue on the backup route to monitor the PDO message that first node is sent.
Second cue module 112 is also used in preset the first heart beat cycle corresponding with first node from spare net When network receives the PDO message of first node, the first channel CAN and the 2nd CAN of first node are sent to operation monitoring node The historical failure message in channel is simultaneously shown to operator, prompts potential faults maintenance.
In one embodiment of the invention, first monitor module 101, be also used on primary network and backup network after The continuous PDO message monitoring first node and sending.
First knows module 103, is also used in preset the first heart beat cycle corresponding with first node from spare net When network receives the PDO message of first node, the 2nd CAN routing restoration communication of first node is known.
First receiving module 104 is also used to receive the data that first node is sent from backup network.
Second cue module 112 is also used to send the current event in the first channel CAN of first node to operation monitoring node Hinder message, and be shown to operator, prompts current failure maintenance.
First monitors module 101, is also used to continue on primary network to monitor first node and is sent by the first channel CAN PDO message.
First receiving module 104 is also used in preset the first heart beat cycle corresponding with first node from primary net When network receives the PDO message of first node, it is switched to and receives the data that first node is sent on primary network.
Second cue module 112 is also used to send the first channel CAN and second of first node to operation monitoring node The historical failure message in the channel CAN is simultaneously shown to operator, prompts potential faults maintenance.
It should be noted that the aforementioned train network number based on CANopen agreement for concentrating on movable host node side description According to transmission method, it is also applied for the host node of the embodiment of the present invention, realization principle is similar, and the present invention is in the description of host node Unpub details, details are not described herein.
In conclusion the host node of the embodiment of the present invention, according to the real-time condition of train network, primary network and standby is carried out It is shown accordingly with the selection of network, and in monitoring node to relevant operation personnel, improves train network data and transmit The stability and reusability of method.
In order to realize above-described embodiment, the invention also provides one kind from node, and Figure 16 is first reality according to the present invention The structural schematic diagram of the slave node of example is applied, should include: the second monitoring module 201, the second judgment module from node as shown in figure 16 202, second knows module 203 and the second receiving module 204.
Wherein, second monitor module 201, for being monitored on primary network according to preconfigured network node list and Pass through the PDO message that the first channel CAN is sent from the relevant each node of node.
Figure 17 is the structural schematic diagram of the slave node of second embodiment according to the present invention, as shown in figure 17, in such as Figure 16 Shown on the basis of, should include: second to establish module 205 and the second control module 206 from node.
Wherein, second establish module 205, for according to network topological diagram establish with from node corresponding network node column Table, wherein network node list include: to from the relevant each node identification of node and corresponding heartbeat timer, wherein each section The corresponding heartbeat timer of point is arranged according to the production disable time in PDO message.
Second control module 206, for sending network-control instruction, starting first from primary network reception activity host node The channel CAN and the 2nd channel CAN enter PDO message operation mode, and start to from the corresponding heartbeat of the relevant each node of node Timer.
Second judgment module 202 is reported for the reception condition according to the PDO message sent to each node, and according to PDO Production disable time in text is the timing situation for the heartbeat timer that each node is correspondingly arranged, and judges the first CAN of each node Channel whether failure.
Second knows module 203, is used in preset heart beat cycle corresponding with second node not in primary network On when receiving the PDO message of second node, know the first CAN channel failure of second node.
Second monitors module 201, is also used to be switched to backup network and monitors what second node was sent by the 2nd channel CAN PDO message, wherein it is relevant from node or movable host node to from node that second node is any one.
Second receiving module 204, for being received in preset heart beat cycle corresponding with second node in backup network When passing through the PDO message that the 2nd channel CAN is sent to second node, the data that second node is sent are received on the backup route, Meanwhile the data that other normal nodes for sending PDO message are sent are received on primary network.
Figure 18 is the structural schematic diagram of the slave node of third embodiment according to the present invention, as shown in figure 18, in such as Figure 16 Shown on the basis of, should from node include: third switching module 208.
Wherein, third switching module 208, for from node transmission error counter or receive error counter When being added to default value, primary network failure is known, be switched to backup network and communicated with other nodes.
In conclusion the slave node of the embodiment of the present invention, according to preconfigured network node list on primary network It monitors and passes through the PDO message that the first channel CAN is sent with from the relevant each node of node, according to the PDO report sent to each node The reception condition of text, and the meter of heartbeat timer being correspondingly arranged according to the production disable time in PDO message for each node When situation, judge each node the first channel CAN whether failure, if not having in preset heart beat cycle corresponding with second node There is the PDO message for receiving second node on primary network, then know the first CAN channel failure of second node, and switches Second node is monitored to backup network and passes through the PDO message that the 2nd channel CAN is sent, if preset corresponding with second node Second node is received in backup network in heart beat cycle and passes through the PDO message that the 2nd channel CAN is sent, then on the backup route The data that second node is sent are received, meanwhile, the number that other normal nodes for sending PDO message are sent is received on primary network According to.As a result, when some or it is certain from node in primary net drop, be switched to backup network and receive number of the part from node According to other are still received on primary network from node data, be ensure that the complete reception to correlation from node data, be ensure that The good operation of vehicle improves the redundancy effect of train network.
Figure 19 is the structural schematic diagram of the slave node of the 4th embodiment according to the present invention, as shown in figure 16, in such as Figure 16 Shown on the basis of, should be from node further include: the first logging modle 209, the second logging modle 210.
Wherein, the first logging modle 209, the current failure message in the first channel CAN for recording second node.
Second monitors module 201, is also used to continue on primary network to monitor second node and is sent by the first channel CAN PDO message.
Second knows module 203, is also used to receive the second section in preset heart beat cycle corresponding with second node When the PDO message of point, the first CAN routing restoration communication of second node is known.
Second receiving module 204 is also used to be switched to the data that second node transmission is received on primary network.
Second logging modle 210, for passing through the 2nd channel CAN hair being switched to backup network and monitor the second node After the PDO message sent, do not receive what the second node was sent by the 2nd channel CAN in preset heart beat cycle When PDO message, the current failure message in the first channel CAN and the 2nd channel CAN of the second node is recorded.
In the present embodiment, second module 201 is monitored, is also used to continue monitoring second on primary network and backup network The PDO message of node.
Second knows module 203, is also used to connect in preset heart beat cycle corresponding with second node in primary network When receiving the PDO message of second node, the first CAN routing restoration communication of second node is known.
Second receiving module 204 is also used to be switched to the data that second node transmission is received on primary network.
Second monitors module 201, is also used to continue on primary network and backup network to monitor the PDO that second node is sent Message.
Second knows module 203, is also used to connect in preset heart beat cycle corresponding with second node from backup network When receiving first from the PDO message of node, the 2nd CAN routing restoration communication of second node is known.
Second receiving module 204 is also used to receive the data that second node is sent from backup network.
In turn, in one embodiment of the invention, second module 201 is monitored, is also used to continue to supervise on primary network The PDO message for listening second node to send.
Second receiving module 204 is also used to connect in preset heart beat cycle corresponding with second node from primary network When receiving the PDO message of second node, it is switched to and receives the data that second node is sent on primary network.
It should be noted that the aforementioned train network data based on CANopen agreement for concentrating on describing from node side pass Transmission method is also applied for the slave node of the embodiment of the present invention, and realization principle is similar, and the present invention is not to public from the description of node The details of cloth, details are not described herein.
In conclusion the slave node of the embodiment of the present invention, according to the real-time condition of train network, primary network and standby is carried out It is shown accordingly with the selection of network, and in monitoring node to relevant operation personnel, improves train network data and transmit The stability and reusability of method.
In order to realize above-described embodiment, the invention also provides a kind of, and the train network data based on CANopen agreement are passed Defeated system, Figure 20 are the knots of the train network data transmission system according to an embodiment of the invention based on CANopen agreement Structure schematic diagram, as shown in figure 20, should include based on train network data transmission system of CANopen agreement movable host node 100, From node 200, primary network 300 and backup network 400.
Wherein, to movable host node 100 and from the description of node 200, it can refer to above-described embodiment, details are not described herein.
In order to more clearly illustrate the train network data transmission system based on CANopen agreement of the embodiment of the present invention Technical effect, be described below with reference to the comparison with the prior art.
In the related technology, the mistake for using CAN bus to consider as the design of redundant network used in the train of communication network It is few to imitate model comparision, all nodes all send data in primary network and backup network simultaneously, but can only select one of net Network receives data, and regardless of which node has gone offline on primary network, with its, relevant node is uniformly switched in backup network Reception handles the go offline data of node and the data of other associated nodes, therefore occurs when multiple node difference channel failures Part of nodes data can not normally receive, and then influence vehicle operation, and redundancy effect is just had a greatly reduced quality, and not embody redundancy master Order justice.
The present invention optimizes software realization strategy in legacy network Redundancy Design framework, according to bus error detection machine While switching between the primary network of formulation justice and backup network, also movable host node is wanted to from node proposition is corresponding respectively It asks, establishes a cyberrelationship list in respective object dictionary respectively, to be carried out with corresponding node PDO message in bus Comparison, and then whether predicate node goes offline, when some or it is certain from node in primary net drop, be switched to backup network and connect The data of the part of nodes are received, other node datas still receive on primary network, and also define a set of communication recovery Mechanism (referring to the description of above-described embodiment, details are not described herein).
In order to more clearly illustrate the train network data transmission system based on CANopen agreement of the embodiment of the present invention Workflow, be exemplified below:
Wherein, in this example, set up in network two host nodes, one be movable host node, one is is backed up main section Point (default does not work), five, from node A, B, C, D, E, now define host node and receive from node A, B, C data, connect from node A It receives from node B, C, D data, from Node-B receiver from node A, E data, receives from node C from node B, D data.
When from the first CAN channel failure of node B, according to definition need receive from Node B data have host node, from Node A, from node C, these three nodes store the node ID from node B in respective object dictionary respectively.Due to from node B from Master node, slave node A, the first CAN channel failure of node B will can not receive in primary network from node B always from node C PDO message.
In turn, when host node is not monitored in predetermined period from the PDO message of node, network-control is first passed through Reset instruction is first resetted the node, monitors certain heart beat cycle again later, at this time certain heart beat cycle from Node B cannot still restore normally, and the 2nd channel CAN all master node, slave node A, is switched to from node C in backup network monitoring The PDO message from node B whether is received, is normal transmission data from the 2nd channel CAN of node B, such host node receives Data cases are as shown in Fig. 21, i.e., host node receives data of the processing from node A, C from primary network, receive from backup network Handle from the data of node B, and from node A with it is as shown in Fig. 22 from node C reception data cases, i.e., from node A from primary Network receives processing from the data of node C, D, receives data of the processing from node B from backup network, from node C from primary network Data of the processing from node D are received, receive data of the processing from node B from backup network.
In conclusion the train network data transmission system based on CANopen agreement of the embodiment of the present invention, solves existing Occur the problem of part of nodes data can not normally receive in scheme when multiple node difference channel failures, effectively part is avoided to save The primary network channel failure of point and when part of nodes backup network channel failure, need to give up some node datas, while also improving The actual effect of Redundancy Design has been evaded the problem of some train network failures cause vehicle operation to be obstructed well, can guarantee Under some abnormal conditions, each node of network still can be with normal communication.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples It closes and combines.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example Property, it is not considered as limiting the invention, those skilled in the art within the scope of the invention can be to above-mentioned Embodiment is changed, modifies, replacement and variant.

Claims (41)

1. a kind of train network data transmission method based on CANopen agreement, which is characterized in that the method is applied in activity Host node, comprising the following steps:
It is monitored on primary network according to preconfigured network node list relevant respectively from node to the movable host node The PDO message sent by the first channel CAN;
According to the reception condition to the PDO message respectively sent from node, and according to the production disable time in PDO message For the timing situation of the heartbeat timer being respectively correspondingly arranged from node, judge described be from the first channel CAN of node respectively No failure;
If not receiving described first in the primary network in preset the first heart beat cycle corresponding with first node The PDO message of node, then know the first CAN channel failure of the first node, and is switched to backup network and monitors described the One node passes through the PDO message that the 2nd channel CAN is sent, wherein the first node is any one and the main section of activity Point is relevant from node;
If receiving the first node in the backup network in preset the first heart beat cycle corresponding with first node The PDO message sent by the 2nd channel CAN then receives the data that the first node is sent, together in the backup network When, the data that other normal slave nodes for sending PDO message are sent are received on the primary network.
2. the method as described in claim 1, which is characterized in that if described in preset first heart corresponding with first node In hop cycle not after the primary network receives the PDO message of the first node, further includes:
Reset instruction is sent from the primary network to the first node;
Continue to monitor the PDO message that the first node is sent on the primary network, detect in preset and first node Whether in the primary network PDO message of the first node is received in corresponding second heart beat cycle;
The first CAN channel failure for knowing the first node, comprising:
If not receiving described first in the primary network in preset the second heart beat cycle corresponding with first node The PDO message of node then knows the first CAN channel failure of the first node.
3. the method as described in claim 1, which is characterized in that receive the first node logical by the 2nd CAN described After the PDO message that road is sent, further includes:
The current failure message in the first channel CAN of the first node is sent to operation monitoring node, and is shown to operator, Prompt current failure maintenance;
Continue to monitor the PDO message that the first node passes through the transmission of the first channel CAN on the primary network, if default The first heart beat cycle corresponding with first node in receive the PDO message of the first node, then know the first segment The first CAN routing restoration communication of point, then be switched to and receive the data that the first node is sent on the primary network.
4. method as claimed in claim 3, which is characterized in that receive described first in described be switched on the primary network After the data that node is sent, further includes:
The historical failure message in the first channel CAN of the first node is sent to the operation monitoring node and is shown to operation Member prompts potential faults maintenance.
5. the method as described in claim 1, which is characterized in that lead in the backup network monitoring first node that is switched to It crosses after the PDO message of the 2nd channel CAN transmission, further includes:
If not receiving described first in the backup network in preset the first heart beat cycle corresponding with first node The PDO message of node then sends reset instruction from the backup network to the first node, and continues in the backup network Monitor the PDO message that the first node is sent;
If receiving the first segment in the backup network in preset the second heart beat cycle corresponding with first node The PDO message that point is sent then receives the data that the first node is sent in the backup network, meanwhile, described primary The data that other normal slave nodes for sending PDO message are sent are received on network.
6. method as claimed in claim 5, which is characterized in that further include:
If described is not received by the backup network in preset the second heart beat cycle corresponding with first node The PDO message that one node is sent then sends the first channel CAN of the first node to operation monitoring node and the 2nd CAN leads to The current failure message in road, and it is shown to operator, prompt current failure maintenance.
7. method as claimed in claim 6, which is characterized in that further include:
Continue to monitor the PDO message that the first node is sent on the primary network and the backup network, if default The first heart beat cycle corresponding with first node in the PDO message of the first node is received from the primary network, then The first CAN routing restoration communication for knowing the first node, then be switched on the primary network and receive the first node The data of transmission, and the current failure message that node sends the 2nd channel CAN of the first node is monitored to the operation, and It is shown to operator, prompts current failure maintenance;
Continue to monitor the PDO message that the first node is sent in the backup network, if in preset and first node pair The PDO message of the first node is received in the first heart beat cycle answered from the backup network, then is monitored to the operation Node sends the first channel CAN of the first node and the historical failure message in the 2nd channel CAN and is shown to operator, mentions Show that potential faults overhaul.
8. method as claimed in claim 6, which is characterized in that further include:
Continue to monitor the PDO message that the first node is sent on the primary network and the backup network, if default The first heart beat cycle corresponding with first node in the PDO message of the first node is received from the backup network, then The 2nd CAN routing restoration communication for knowing the first node, then receive the first node from the backup network and send Data, and send to the operation monitoring node current failure message in the first channel CAN of the first node, and show To operator, current failure maintenance is prompted;
Continue to monitor the PDO message that the first node passes through the transmission of the first channel CAN on the primary network, if default The first heart beat cycle corresponding with first node in the PDO message of the first node is received from the primary network, then It is switched to and receives the data that the first node is sent on the primary network, and to operation monitoring node transmission described the First channel CAN of one node and the historical failure message in the 2nd channel CAN are simultaneously shown to operator, prompt potential faults inspection It repairs.
9. the method as described in claim 1, which is characterized in that it is described according to preconfigured network node list primary It monitors relevant with the movable host node respectively before PDO message of the node by the transmission of the first channel CAN on network, also wraps It includes:
Network node list corresponding with the activity host node is established according to network topological diagram, wherein the network node column Table includes: relevant respectively from node identification and corresponding heartbeat timer to the movable host node, wherein respectively corresponding from node Heartbeat timer according in PDO message production disable time be arranged;
Network-control instruction is sent from node to all simultaneously from the primary network and the backup network, control is described from section The first channel CAN and the 2nd channel CAN of point enter PDO message operation mode, and start relevant to the movable host node Respectively from the corresponding heartbeat timer of node.
10. the method as described in claim 1, which is characterized in that further include:
If the transmission error counter or reception error counter in the activity host node are added to default value, know The primary network failure is switched to the backup network and is communicated with other nodes.
11. the method as described in claim 1-10 is any, which is characterized in that further include:
If detecting the movable host node failure, it is relevant to other from node progress data friendship to be switched to standby host node Mutually.
12. a kind of train network data transmission method based on CANopen agreement, which is characterized in that the method apply from Node, comprising the following steps:
Monitored on primary network according to preconfigured network node list to it is described from the relevant each node of node by the The PDO message that one channel CAN is sent;
It is according to the reception condition of the PDO message sent to each node, and according to the production disable time in PDO message The timing situation for the heartbeat timer that each node is correspondingly arranged, judge each node the first channel CAN whether failure;
If not receiving second section on the primary network in preset heart beat cycle corresponding with second node The PDO message of point, then know the first CAN channel failure of the second node, and is switched to backup network and monitors described second Node pass through the 2nd channel CAN send PDO message, wherein the second node be any one to it is described related from node Slave node or movable host node;
If receiving the second node in the backup network in preset heart beat cycle corresponding with second node to pass through The PDO message that 2nd channel CAN is sent then receives the data that the second node is sent in the backup network, meanwhile, The data that other normal nodes for sending PDO message are sent are received on the primary network.
13. method as claimed in claim 12, which is characterized in that receive the second node in the backup network and pass through After the PDO message that 2nd channel CAN is sent, further includes:
Record the current failure message in the first channel CAN of the second node;
Continue to monitor the PDO message that the second node passes through the transmission of the first channel CAN on the primary network, if default Heart beat cycle corresponding with second node in receive the PDO message of the second node, then know the second node The communication of first CAN routing restoration is then switched to and receives the data that the second node is sent on the primary network.
14. method as claimed in claim 12, which is characterized in that monitor the second node in the backup network that is switched to After the PDO message sent by the 2nd channel CAN, further includes:
If not receiving the second node in preset heart beat cycle passes through the PDO message that the 2nd channel CAN is sent, Record the current failure message in the first channel CAN and the 2nd channel CAN of the second node.
15. method as claimed in claim 14, which is characterized in that further include:
Continue to monitor the PDO message of the second node on the primary network and the backup network, if it is preset with The PDO message of the second node is received in the primary network in the corresponding heart beat cycle of second node, then is known described First CAN routing restoration of second node communicates, then is switched to and receives the number that the second node is sent on the primary network According to.
16. method as claimed in claim 14, which is characterized in that further include:
Continue to monitor the PDO message that the second node is sent on the primary network and the backup network, if default Heart beat cycle corresponding with second node in from the backup network receive the described first PDO message from node, then obtain The 2nd CAN routing restoration communication for knowing the second node, then receive what the second node was sent from the backup network Data;
Continue to monitor the PDO message that the second node is sent on the primary network, if in preset and second node pair The PDO message for receiving the second node in the heart beat cycle answered from the primary network, then be switched to the primary network The upper data for receiving the second node and sending.
17. method as claimed in claim 12, which is characterized in that it is described according to preconfigured network node list in master With monitored on network with before the PDO message by the transmission of the first channel CAN from the relevant each node of node, further includes:
It is established with described according to network topological diagram from the corresponding network node list of node, wherein the network node list packet It includes: to described from the relevant each node identification of node and corresponding heartbeat timer, wherein the corresponding heartbeat timer of each node According to the production disable time setting in PDO message;
Network-control instruction is sent from the primary network reception activity host node, starts the first channel CAN and the 2nd channel CAN Into PDO message operation mode, and start to described from the corresponding heartbeat timer of the relevant each node of node.
18. the method as described in claim 12-17 is any, which is characterized in that further include:
If the transmission error counter or reception error counter from node is added to default value, know described Primary network failure is switched to the backup network and is communicated with other nodes.
19. a kind of activity host node characterized by comprising
First monitors module, for being monitored on primary network according to preconfigured network node list and the main section of activity Point is relevant respectively to pass through the PDO message that the first channel CAN is sent from node;
First judgment module, for being reported according to the reception condition to the PDO message respectively sent from node, and according to PDO Production disable time in text is the timing situation of the heartbeat timer being respectively correspondingly arranged from node, is judged described respectively from section Point the first channel CAN whether failure;
First knows module, is used in preset the first heart beat cycle corresponding with first node not in the primary network When receiving the PDO message of the first node, the first CAN channel failure of the first node is known;
Described first monitors module, is also used to be switched to the backup network monitoring first node and passes through the transmission of the 2nd channel CAN PDO message, wherein the first node is that any one is relevant from node to the movable host node;
First receiving module, for being received in preset the first heart beat cycle corresponding with first node in the backup network When passing through the PDO message that the 2nd channel CAN is sent to the first node, the first node is received in the backup network The data of transmission, meanwhile, the data that other normal slave nodes for sending PDO message are sent are received on the primary network.
20. activity host node as claimed in claim 19, which is characterized in that further include:
First sending module is used in preset the first heart beat cycle corresponding with first node not in the primary network After the PDO message for receiving the first node, reset instruction is sent from the primary network to the first node;
Described first monitors module, is also used to continue to monitor on the primary network PDO message that the first node is sent;
Whether the first judgment module is also used to detect in preset the second heart beat cycle corresponding with first node in institute State the PDO message that primary network receives the first node;
Described first knows module, is also used in preset the second heart beat cycle corresponding with first node not in the master When receiving the PDO message of the first node with network, then the first CAN channel failure of the first node is known.
21. activity host node as claimed in claim 19, which is characterized in that further include:
First cue module, for receive the first node by the 2nd channel CAN send PDO message after, to Operation monitoring node sends the current failure message in the first channel CAN of the first node, and is shown to operator, and prompt is worked as Prior fault maintenance;
Described first monitors module, and it is logical by the first CAN to be also used to continue to monitor on the primary network first node The PDO message that road is sent;
Described first knows module, is also used to receive described in preset the first heart beat cycle corresponding with first node When the PDO message of one node, the first CAN routing restoration communication of the first node is known;
First receiving module is also used to be switched to the data that the first node transmission is received on the primary network.
22. activity host node as claimed in claim 21, which is characterized in that
First cue module is also used in the number for being switched to and receiving the first node on the primary network and sending According to later, the historical failure message in the first channel CAN of the first node is sent to the operation monitoring node and is shown to Operator prompts potential faults maintenance.
23. activity host node as claimed in claim 19, which is characterized in that further include:
Second sending module is used in preset the first heart beat cycle corresponding with first node not in the backup network When receiving the PDO message of the first node, reset instruction is sent from the backup network to the first node;
Described first monitors module, is also used to continue to monitor the PDO message that the first node is sent in the backup network;
First receiving module is also used in preset the second heart beat cycle corresponding with first node in the spare net When receiving the PDO message that the first node is sent on network, receive what the first node was sent in the backup network Data, meanwhile, the data that other normal slave nodes for sending PDO message are sent are received on the primary network.
24. activity host node as claimed in claim 23, which is characterized in that further include:
Second cue module, for not having in the backup network in preset the second heart beat cycle corresponding with first node When having the PDO message for receiving the first node transmission, the first CAN for sending the first node to operation monitoring node is logical The current failure message in road and the 2nd channel CAN, and it is shown to operator, prompt current failure maintenance.
25. activity host node as claimed in claim 24, which is characterized in that
Described first monitors module, is also used to continue on the primary network and the backup network to monitor the first node The PDO message of transmission;
Described first knows module, is also used in preset the first heart beat cycle corresponding with first node from the primary net When network receives the PDO message of the first node, the first CAN routing restoration communication of the first node is known;
First receiving module is also used to be switched to the data that the first node transmission is received on the primary network;
Second cue module is also used to send the 2nd channel CAN of the first node to the operation monitoring node Current failure message, and it is shown to operator, prompt current failure maintenance;
Described first monitors module, is also used to continue to monitor in the backup network PDO message that the first node is sent;
Second cue module is also used in preset the first heart beat cycle corresponding with first node from the spare net When network receives the PDO message of the first node, the first CAN for sending the first node to the operation monitoring node is logical The historical failure message in road and the 2nd channel CAN is simultaneously shown to operator, prompts potential faults maintenance.
26. activity host node as claimed in claim 24, which is characterized in that
Described first monitors module, is also used to continue on the primary network and the backup network to monitor the first node The PDO message of transmission;
Described first knows module, is also used in preset the first heart beat cycle corresponding with first node from the spare net When network receives the PDO message of the first node, the 2nd CAN routing restoration communication of the first node is known;
First receiving module is also used to receive the data that the first node is sent from the backup network;
Second cue module is also used to send the first channel CAN of the first node to the operation monitoring node Current failure message, and it is shown to operator, prompt current failure maintenance;
Described first monitors module, and it is logical by the first CAN to be also used to continue to monitor on the primary network first node The PDO message that road is sent;
First receiving module is also used in preset the first heart beat cycle corresponding with first node from the primary net When network receives the PDO message of the first node, it is switched to and receives the number that the first node is sent on the primary network According to;
Second cue module, be also used to it is described operation monitoring node send the first node the first channel CAN and The historical failure message in the 2nd channel CAN is simultaneously shown to operator, prompts potential faults maintenance.
27. activity host node as claimed in claim 19, which is characterized in that further include:
First establishes module, for establishing network node list corresponding with the activity host node according to network topological diagram, In, the network node list includes: relevant to the movable host node respectively from node identification and corresponding heartbeat timer, Wherein, respectively it is arranged from the corresponding heartbeat timer of node according to the production disable time in PDO message;
First control module, for sending network-control from node to all simultaneously from the primary network and the backup network Instruction, control is described to enter PDO message operation mode from the first channel CAN of node and the 2nd channel CAN, and start with it is described Movable host node is relevant respectively from the corresponding heartbeat timer of node.
28. activity host node as claimed in claim 19, which is characterized in that further include:
First switching module, for the transmission error counter in the movable host node or to receive error counter cumulative When to default value, knows the primary network failure, be switched to the backup network and communicated with other nodes.
29. activity host node as claimed in claim 19, which is characterized in that further include:
Second switching module, for it is related to other to be switched to standby host node when detecting the movable host node failure Slave node carry out data interaction.
30. a kind of from node characterized by comprising
Second monitors module, for being monitored on primary network with described according to preconfigured network node list from node phase Each node closed passes through the PDO message that the first channel CAN is sent;
Second judgment module, for the reception condition according to the PDO message sent to each node, and according to PDO message In production disable time be the timing situation of heartbeat timer that each node is correspondingly arranged, judge the of each node One channel CAN whether failure;
Second knows module, for not connecing on the primary network in preset heart beat cycle corresponding with second node When receiving the PDO message of the second node, the first CAN channel failure of the second node is known;
Described second monitors module, is also used to be switched to the backup network monitoring second node and passes through the transmission of the 2nd channel CAN PDO message, wherein the second node be any one to it is described relevant from node or movable host node from node;
Second receiving module, for receiving institute in the backup network in preset heart beat cycle corresponding with second node When stating the PDO message that second node is sent by the 2nd channel CAN, the second node is received in the backup network and is sent Data, meanwhile, the data that other normal nodes for sending PDO messages are sent are received on the primary network.
31. as claimed in claim 30 from node, which is characterized in that further include:
First logging modle, the current failure message in the first channel CAN for recording the second node;
Described second monitors module, and it is logical by the first CAN to be also used to continue to monitor on the primary network second node The PDO message that road is sent;
Described second knows module, is also used to receive second section in preset heart beat cycle corresponding with second node When the PDO message of point, the first CAN routing restoration communication of the second node is known;
Second receiving module is also used to be switched to the data that the second node transmission is received on the primary network.
32. as claimed in claim 30 from node, which is characterized in that further include:
Second logging modle, for be switched to backup network monitor the second node pass through the 2nd channel CAN send PDO After message, the second node is not received in preset heart beat cycle and passes through the PDO message that the 2nd channel CAN is sent When, record the current failure message in the first channel CAN and the 2nd channel CAN of the second node.
33. as claimed in claim 32 from node, which is characterized in that
Described second monitors module, is also used to continue on the primary network and the backup network to monitor the second node PDO message;
Described second knows module, is also used to connect in preset heart beat cycle corresponding with second node in the primary network When receiving the PDO message of the second node, the first CAN routing restoration communication of the second node is known;
Second receiving module is also used to be switched to the data that the second node transmission is received on the primary network.
34. as claimed in claim 32 from node, which is characterized in that
Described second monitors module, is also used to continue on the primary network and the backup network to monitor the second node The PDO message of transmission;
Described second knows module, is also used to connect in preset heart beat cycle corresponding with second node from the backup network When receiving described first from the PDO message of node, the 2nd CAN routing restoration communication of the second node is known;
Second receiving module is also used to receive the data that the second node is sent from the backup network;
Described second monitors module, is also used to continue to monitor on the primary network PDO message that the second node is sent;
Second receiving module is also used to connect in preset heart beat cycle corresponding with second node from the primary network When receiving the PDO message of the second node, it is switched to and receives the data that the second node is sent on the primary network.
35. as claimed in claim 30 from node, which is characterized in that further include:
Second establishes module, for being established with described according to network topological diagram from the corresponding network node list of node, wherein institute Stating network node list includes: to described from the relevant each node identification of node and corresponding heartbeat timer, wherein each node Corresponding heartbeat timer is arranged according to the production disable time in PDO message;
Second control module starts the first CAN for sending network-control instruction from the primary network reception activity host node Channel and the 2nd channel CAN enter PDO message operation mode, and start to described from the corresponding heartbeat of the relevant each node of node Timer.
36. the slave node as described in claim 30-35 is any, which is characterized in that further include:
Third switching module, it is pre- for being added in the transmission error counter from node or reception error counter If when numerical value, knowing the primary network failure, it is switched to the backup network and is communicated with other nodes.
37. a kind of train network data transmission system based on CANopen agreement characterized by comprising
Such as the described in any item movable host nodes of claim 19-29;
As claim 30-36 is described in any item from node;
Primary network;
Backup network.
38. a kind of computer equipment, which is characterized in that including memory, processor and store on a memory and can handle The computer program run on device, wherein the processor realizes that claim 1-11 such as appoints when executing the computer program Based on the train network data transmission method of CANopen agreement described in one.
39. a kind of computer equipment, which is characterized in that including memory, processor and store on a memory and can handle The computer program run on device, wherein the processor realizes that claim 12-18 such as appoints when executing the computer program Based on the train network data transmission method of CANopen agreement described in one.
40. a kind of storage medium, which is characterized in that for storing application program, the application program is for executing as right is wanted Seek any train network data transmission method based on CANopen agreement of 1-11.
41. a kind of storage medium, which is characterized in that for storing application program, the application program is for executing as right is wanted Seek any train network data transmission method based on CANopen agreement of 12-18.
CN201710477075.2A 2017-06-21 2017-06-21 Train network data transmission method, system and device based on CANopen protocol Active CN109104325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710477075.2A CN109104325B (en) 2017-06-21 2017-06-21 Train network data transmission method, system and device based on CANopen protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710477075.2A CN109104325B (en) 2017-06-21 2017-06-21 Train network data transmission method, system and device based on CANopen protocol

Publications (2)

Publication Number Publication Date
CN109104325A true CN109104325A (en) 2018-12-28
CN109104325B CN109104325B (en) 2020-10-23

Family

ID=64796222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710477075.2A Active CN109104325B (en) 2017-06-21 2017-06-21 Train network data transmission method, system and device based on CANopen protocol

Country Status (1)

Country Link
CN (1) CN109104325B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110488597A (en) * 2019-08-18 2019-11-22 中车永济电机有限公司 Locomotive Main Processor Unit dual redundant control method
CN112600740A (en) * 2021-01-08 2021-04-02 重庆长安汽车股份有限公司 Automatic detection method for Internet of vehicles CAN data uploading frame leakage rate
CN112859713A (en) * 2021-02-08 2021-05-28 航天科工空间工程发展有限公司 Autonomous error correction management method for CAN bus of spacecraft
CN114760650A (en) * 2022-03-15 2022-07-15 南京市德赛西威汽车电子有限公司 Vehicle-mounted radar network group control method and system, automobile and storage medium
CN117768380A (en) * 2023-12-20 2024-03-26 昆易电子科技(上海)有限公司 Data processing method, device, system, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100082873A1 (en) * 2008-09-26 2010-04-01 Raytheon Anschuetz Gmbh Ship Rudder Control (Autopilot) with a CAN Bus
CN106302064A (en) * 2016-08-16 2017-01-04 新誉集团有限公司 The data transfer optimization method and system of binary-channel redundancy CAN used for electric vehicle
CN106452870A (en) * 2016-10-13 2017-02-22 中车株洲电力机车研究所有限公司 Redundancy control method for primary device of CANopen network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100082873A1 (en) * 2008-09-26 2010-04-01 Raytheon Anschuetz Gmbh Ship Rudder Control (Autopilot) with a CAN Bus
CN106302064A (en) * 2016-08-16 2017-01-04 新誉集团有限公司 The data transfer optimization method and system of binary-channel redundancy CAN used for electric vehicle
CN106452870A (en) * 2016-10-13 2017-02-22 中车株洲电力机车研究所有限公司 Redundancy control method for primary device of CANopen network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李泽荣,王磊,杜会卿,邱瑞昌: "《基于在线双冗余CANopen架构的管轨列控系统》", 《电测与仪表》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110488597A (en) * 2019-08-18 2019-11-22 中车永济电机有限公司 Locomotive Main Processor Unit dual redundant control method
CN112600740A (en) * 2021-01-08 2021-04-02 重庆长安汽车股份有限公司 Automatic detection method for Internet of vehicles CAN data uploading frame leakage rate
CN112600740B (en) * 2021-01-08 2022-06-07 重庆长安汽车股份有限公司 Automatic detection method for Internet of vehicles CAN data uploading frame leakage rate
CN112859713A (en) * 2021-02-08 2021-05-28 航天科工空间工程发展有限公司 Autonomous error correction management method for CAN bus of spacecraft
CN114760650A (en) * 2022-03-15 2022-07-15 南京市德赛西威汽车电子有限公司 Vehicle-mounted radar network group control method and system, automobile and storage medium
CN117768380A (en) * 2023-12-20 2024-03-26 昆易电子科技(上海)有限公司 Data processing method, device, system, electronic equipment and readable storage medium
CN117768380B (en) * 2023-12-20 2024-06-07 昆易电子科技(上海)有限公司 Data processing method, device, system, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN109104325B (en) 2020-10-23

Similar Documents

Publication Publication Date Title
CN109104349A (en) Train network data transmission method, system and its apparatus based on CANopen agreement
CN109104325A (en) Train network data transmission method, system and its apparatus based on CANopen agreement
CN109104351A (en) Train network node and train network node monitoring method based on CANopen agreement
CN101252426B (en) Method for realizing high-reliability distributed redundant looped network
CN109104346A (en) Train network data transmission method, system and its apparatus based on CANopen agreement
CN106789264B (en) A kind of method and apparatus that link aggregation group channel is switched fast
CN104079442B (en) Redundancy control apparatus based on real-time ethernet, equipment redundancy system and method
CN102752126B (en) Automatic protection switching method, main device and standby device
US9231779B2 (en) Redundant automation system
CN109104348A (en) Train network data transmission method, system and its apparatus based on CANopen agreement
CA2782256C (en) Verifying communication redundancy in a network
CN105487945B (en) A kind of non-similar pair of remaining four machine monitors fault tolerant control method certainly
CN113127270A (en) Cloud computing-based 2-out-of-3 safety computer platform
CN102025562A (en) Path detection method and device
CN103701655A (en) Fault self-diagnosis and self-recovery method and system for interchanger
CN103139033A (en) Primary device redundancy switching method of single main communication control bus
CN108319256A (en) Controller redundancy switching method, device, computer equipment and storage medium
CN111541601B (en) STP protocol synchronization method and device in switching equipment of dynamic heterogeneous redundant architecture
CN115913906A (en) Redundancy control system and method for ship
CN106941424B (en) Redundancy switching method and device based on TTDP protocol
CN107026780A (en) A kind of distribution optical fiber ring network fault point positioning method and system based on Internet of Things
CN106817238A (en) Virtual machine repair method, virtual machine, system and business function network element
CN109617721A (en) A kind of onboard networks management end dual computer fault-tolerant backup method, device and storage medium
US20220368561A1 (en) Method for Data Transmission in a Redundantly Operable Communications Network and Coupling Communication Device
CN107026691A (en) A kind of method and system of automatism isolation distribution optical fiber ring network failure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant