WO2018233642A1 - 列车网络节点和基于CANopen协议的列车网络节点监测方法 - Google Patents

列车网络节点和基于CANopen协议的列车网络节点监测方法 Download PDF

Info

Publication number
WO2018233642A1
WO2018233642A1 PCT/CN2018/092047 CN2018092047W WO2018233642A1 WO 2018233642 A1 WO2018233642 A1 WO 2018233642A1 CN 2018092047 W CN2018092047 W CN 2018092047W WO 2018233642 A1 WO2018233642 A1 WO 2018233642A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
network
heartbeat
channel
message
Prior art date
Application number
PCT/CN2018/092047
Other languages
English (en)
French (fr)
Inventor
磨俊生
曾文晓
Original Assignee
比亚迪股份有限公司
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 比亚迪股份有限公司 filed Critical 比亚迪股份有限公司
Priority to BR112019027654-8A priority Critical patent/BR112019027654A2/pt
Priority to US16/625,526 priority patent/US11146457B2/en
Publication of WO2018233642A1 publication Critical patent/WO2018233642A1/zh

Links

Images

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/40143Bus networks involving priority mechanisms
    • H04L12/4015Bus networks involving priority mechanisms by scheduling the transmission of messages at the communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/16Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using machine learning or artificial intelligence
    • 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/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • 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
    • 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/40006Architecture of a communication node
    • H04L12/40013Details regarding a bus controller
    • 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/40006Architecture of a communication node
    • H04L12/40026Details regarding a bus guardian
    • 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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • 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
    • 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

Definitions

  • the present disclosure relates to the field of vehicle communication technologies, and in particular, to a train network node and a train network node monitoring method based on the CANopen protocol.
  • the train communication network is widely used in the TCN bus technology of the train communication network.
  • the TCN Traffic Communication Network
  • the TCN covers the MVB (Multifunction Vehicle Bus) and the WTB (Wire Train Bus). Bus, Ethernet, CAN (Controller Area Network).
  • MVB Multifunction Vehicle Bus
  • WTB Wire Train Bus
  • Bus Ethernet
  • CAN Controller Area Network
  • the so-called network redundancy refers to the establishment of a standby network for each communication network, that is, each node on the network will adopt the A-line and B-line two-wire connection. When the network fails, it can be used for backup.
  • the network realizes communication, ensures the smooth interaction of the products of the products on the network, and makes the running environment of the train communication network highly available.
  • CANopen a high-level communication protocol based on CAN bus, which is a kind of field bus commonly used in industrial control.
  • the definition of CANopen is based on CAN bus design.
  • the standardized application layer protocol, CANopen protocol supports a complete network management mechanism for traditional CAN to support redundant network design.
  • the redundant network design based on CANopen requires all network nodes to send data simultaneously in two channels. However, by default, all nodes only obtain data from the primary network. When one or some slave nodes are disconnected from the primary network, they switch. Receive data from the part of the node to the standby network.
  • the purpose of the present disclosure is to solve at least one of the above technical problems to some extent.
  • the first object of the present disclosure is to propose a method for monitoring a train network node based on the CANopen protocol, which realizes that the node is powered on automatically and uses appropriate node drop monitoring for its related nodes, thereby improving the detection and judgment of the node.
  • the accuracy of the results makes it easy to improve the redundancy of the train network and ensure the good operation of the vehicle.
  • a second object of the present disclosure is to propose a train network node.
  • a third object of the present disclosure is to propose a computer device.
  • a fourth object of the present disclosure is to propose a storage medium.
  • a first aspect of the present disclosure provides a train network node and a CANopen protocol-based train network node monitoring method, including the following steps: a train network node acquires a network node according to a pre-configured network node list. The drop-down duration set by the associated drop timer of each node and the heartbeat packet sending period set by the heartbeat timer; the drop-down duration set by the drop timer corresponding to each node and the heartbeat timer setting The heartbeat message sending period is compared, and the disconnection monitoring mode of each node is determined according to the comparison result.
  • the train network node of the embodiment of the present disclosure and the train network node monitoring method based on the CANopen protocol acquires the drop duration set by the drop timer corresponding to each node related to the network node according to the pre-configured network node list, and The heartbeat packet sending period set by the heartbeat timer compares the dropped duration set by the corresponding drop timer of each node and the heartbeat packet sending period set by the heartbeat timer, and determines the dropped line of each node according to the comparison result.
  • Monitoring method. Therefore, the node is powered on automatically adopts appropriate node drop monitoring for its related nodes, which improves the accuracy of the node detection and judgment results, improves the redundancy effect of the train network, and ensures the good operation of the whole vehicle.
  • a train network node includes: an obtaining module, configured to acquire, according to a pre-configured network node list, a drop timer corresponding to each node related to the network node. The set timeout period and the heartbeat message sending period set by the heartbeat timer; the comparison module is configured to send the dropped time duration set by the drop timer corresponding to each node and the heartbeat message set by the heartbeat timer And performing a comparison, and determining a module, configured to determine, according to the comparison result, a disconnection monitoring manner of each node.
  • the train network node acquires the drop duration set by the drop timer corresponding to each node related to the network node according to the pre-configured network node list, and the heartbeat packet sending period set by the heartbeat timer
  • the comparison is performed by comparing the drop duration set by the drop timer corresponding to each node and the heartbeat packet sending period set by the heartbeat timer, and determining the drop monitoring mode of each node according to the comparison result. Therefore, the node is powered on automatically adopts appropriate node drop monitoring for its related nodes, which improves the accuracy of the node detection and judgment results, improves the redundancy effect of the train network, and ensures the good operation of the whole vehicle.
  • a computer apparatus includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer
  • the CANopen protocol-based train network node monitoring method described in the first aspect of the present disclosure is implemented in the program.
  • a storage medium for storing an application for executing a CANopen protocol-based train network node according to the first aspect of the present disclosure. Monitoring method.
  • FIG. 1 is a flowchart of a train network node monitoring method based on a CANopen protocol, according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a network node list architecture according to an embodiment of the present disclosure
  • FIG. 3 is a flowchart of a train network data transmission method based on a CANopen protocol according to a first embodiment of the present disclosure
  • FIG. 4 is a schematic topological diagram of a method for transmitting data of a train redundant network according to an embodiment of the present disclosure
  • FIG. 5 is a diagram showing an example of receiving data of each node when the primary network bus fails according to the present disclosure
  • FIG. 6 is a flowchart of a train network data transmission method based on a CANopen protocol according to a second embodiment of the present disclosure
  • FIG. 7 is a flowchart of a train network data transmission method based on a CANopen protocol according to a third embodiment of the present disclosure
  • FIG. 8 is a flowchart of a train network data transmission method based on a CANopen protocol according to a fourth embodiment of the present disclosure
  • FIG. 9 is a schematic structural diagram of a train network master node according to a first embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a train network master node according to a second embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of a train network master node according to a third embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of a train network master node according to a fourth embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of a train network master node according to a fifth embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of a train network master node according to a sixth embodiment of the present disclosure.
  • 15 is a schematic structural diagram of a train network master node according to a seventh embodiment of the present disclosure.
  • the monitoring mechanism based on the node heartbeat packet is preferably used to detect the heartbeat message, that is, by monitoring the relevant node to send the heartbeat message, when several consecutive (predefined times) heartbeat periods are If the heartbeat message of one or some nodes is not received, it is determined that it is offline on the network.
  • each node on the network uses the heartbeat packet monitoring mechanism for the node drop monitoring priority.
  • the so-called heartbeat packet monitoring mechanism is to set a heartbeat timer and heartbeat timer value for each node. Set as a heartbeat message period, after the node enters the operation state, each heartbeat timer will count down, and the node parses the received heartbeat message to the corresponding node ID, and then the node in its own object dictionary. The ID table matches, and the heartbeat timer corresponding to the node on the match is set and re-timed.
  • the node will record that the heartbeat packets of this part of the node are dropped.
  • the heartbeat packet of some nodes that is, the number of dropped calls of the node heartbeat packet is added to a certain value, it is determined that the part of the node is dropped on the network.
  • the heartbeat packet period of all nodes must be unified, so that each node can more conveniently query whether the relevant nodes are online. If the heartbeat packet period of each node is different, then the decision for the disconnection of each node is A burden. Moreover, the heartbeat packet is only a kind of state data. According to the regulations, the transmission period cannot be defined too fast, for example, 50ms. If the transmission period is set too fast, the amount of communication network data will be increased, and the network load will increase, causing large-scale data conflicts. (Some data needs to be transmitted at a certain point in time, but only one data can be transmitted on any communication bus single channel).
  • the present disclosure proposes a train network node monitoring method based on the CANopen protocol, which realizes that the node power-on automatically adopts appropriate node drop-off monitoring for its related nodes, and improves the detection result of the node detection. Accuracy, easy to improve the redundancy effect of the train network, to ensure the good operation of the vehicle.
  • FIG. 1 is a flowchart of a method for monitoring a train network node based on a CANopen protocol according to an embodiment of the present disclosure. As shown in FIG. 1, the method includes:
  • the train network node acquires, according to the pre-configured network node list, a drop duration set by a drop timer corresponding to each node associated with the network node, and a heartbeat packet sending period set by the heartbeat timer.
  • the drop duration of the drop timer corresponding to each node related to the network node is set in advance, and the drop duration is stored in the storage space corresponding to the object dictionary of the network node.
  • the present disclosure is based on the CANopen application protocol, and requires each node to establish a list of all network nodes according to the topology map, where the network node list refers to an object index in the custom CANopen object dictionary with nodes unique to each node.
  • the ID is used to mark the identity of each node, and the node IDs of all related nodes are included in the object storage space, and a drop timer and a heartbeat timer are also bound to the node ID of each node. That is, the network node list architecture in the embodiment of the present disclosure is as shown in FIG. 2.
  • S102 Compare the drop duration set by the drop timer corresponding to each node and the heartbeat packet sending period set by the heartbeat timer, and determine the drop monitoring mode of each node according to the comparison result.
  • each node powers up and initializes into a pre-operation state, first comparing a drop timer associated with all nodes in the network node list with a heartbeat timer, to determine each according to the comparison result. The way the node is dropped.
  • the heartbeat packet drop monitoring mechanism in addition to the heartbeat packet drop monitoring mechanism, there is another common drop detection mechanism, which is based on PDO (Process Data Object). Monitoring mechanism for production prohibition time.
  • PDO Process Data Object
  • Monitoring mechanism for production prohibition time When the heartbeat packet period is higher than the PDO transmission period of the node, the PDO production prohibition time drop determination mechanism is enabled for the node. For example, we now define a heartbeat packet period of 500ms for each node, but the actual PDO transmission period of the product is 50ms, according to the industry standard, if the PDO data (five PDO transmission periods) cannot be received for 250ms continuously, it is necessary to determine the traction communication abnormality and perform the emergency operation mode.
  • PDO production prohibition time that is, receiving and processing one PDO data through a preset time (PDO production prohibition time, which may also be equal to the PDO transmission period)
  • PDO production prohibition time which may also be equal to the PDO transmission period
  • the so-called PDO production prohibition time mechanism refers to selecting one representative for each node according to the actual drop time limit determination requirement in the RPDO (Receive Process Data Object) object index (1400h to 15FFh) in the CANopen object dictionary.
  • the PDO according to the production prohibition time parameters in these PDO indexes, respectively, sets a PDO production counter for each node. After the node enters the operation state, the node will continuously detect the PDO transmission of the relevant node, when a production prohibition time If the PDO data is not received, the PDO production counter starts counting. When the PDO production counter is added to a preset value, it is determined that the node is dropped.
  • the PDO production prohibition time is adopted for the drop-off monitoring mechanism design, but each node of the network uses the PDO production prohibition time drop-out judgment mechanism, and the transmission period of one node PDO is 10 ms, one node PDO sends The period is 50ms, the transmission period of one node PDO is 100ms, the transmission period of one node PDO is 500ms, etc., the drop determination processing for the nodes associated with these nodes is also a burden, because it needs to be set according to the characteristics of each node. Different drop-off timers need to modify the software for each new node and do not use management.
  • the two types of drop-off monitoring mechanisms have their own characteristics and limitations, that is, the current consideration for node drop-off monitoring design.
  • the failure mode is relatively small.
  • the simple use of the node heartbeat message monitoring mechanism or the PDO production prohibition time monitoring mechanism cannot accurately define the actual situation of all nodes in the network, which has certain limitations.
  • the characteristics of the existing node-based heartbeat message and the PDO-based production prohibition time are combined, and the node is set by combining the drop-off timer of each node, and then a certain determination condition is implemented. Power-on automatically uses the appropriate node drop monitoring for its associated nodes.
  • a production counter is also included.
  • the value of the drop timer of all nodes is greater than the value of the heartbeat timer.
  • the heartbeat packet monitoring mechanism is used for the related nodes, and the PDO production counter corresponding to the relevant node is set to 0.
  • the node is disabled based on the PDO production prohibition time mechanism.
  • the heartbeat timer is reset.
  • the relevant node is determined to be dropped.
  • FIG. 3 is a flowchart of a method for transmitting data of a train network based on the CANopen protocol according to the first embodiment of the present disclosure. As shown in FIG. 3, the method includes:
  • the network node list corresponding to the active master node is established according to the network topology map, wherein the network node list includes: a slave node identifier associated with the active master node and a corresponding heartbeat timer, wherein the node identifier may be The identifier of the node, such as the ID of the node, uniquely identifies the data information.
  • the network control instruction is sent from the primary network and the backup network to all the slave nodes at the same time, and the first CAN channel and the second CAN channel of the slave node are controlled to enter the heartbeat message operation mode, and each slave node associated with the active master node is started. Corresponding heartbeat timer.
  • the active master node can establish a list of all network nodes (configurable) according to the network topology map, that is, one of the custom CANopen object dictionary.
  • the object index marks the identity of each node with the node identifier unique to each node, and the node identifiers (such as node IDs) of all nodes are included in the object storage space, and the active master node sets a heartbeat timer for each node.
  • each heartbeat timer counts down, and the active master node parses the received heartbeat message into the corresponding node identifier, such as the node ID, and then the node in its own object dictionary.
  • the list is matched, and then the heartbeat timer corresponding to the node on the matching is set and re-timed. According to this characteristic requirement, all nodes including the active master node will pass the specific node ID on the primary network and the standby network at the same time.
  • the heartbeat message is sent periodically.
  • the active primary node in the default state, first monitors the heartbeat message transmission status of each slave node on the primary network, that is, monitors the slave nodes related to the active master node on the primary network according to the pre-configured network node list.
  • the active master node can normally receive the heartbeat message sent by the slave node within a certain time, otherwise, the first CAN channel of the slave node communicates with the fault.
  • the active active node may not receive the heartbeat message sent by the slave node normally due to some other reasons, for example, the network signal is suddenly interfered, etc., so in order to avoid misjudgment, the slave nodes are accurately determined. Whether the first CAN channel is faulty or not, comprehensively considers the timing of the heartbeat timer set by each slave node and the reception status of the heartbeat message, and determines whether the first CAN channel of each slave node is faulty.
  • the active master node when there are three heartbeat cycles that do not detect the heartbeat message of a certain node, the active master node first resets the node through the network-controlled reset command, and then listens to two heartbeat cycles, in two The heartbeat message of the node may be received in the heartbeat period, and the active master node maintains the processing of the node in the primary network, otherwise it may determine that the first CAN channel of the slave node may be faulty.
  • the timing of the heartbeat timer in the above example is only an example. According to different application requirements, a combination of other heartbeat cycles may also be used to determine whether the first CAN channel of each slave node is faulty, for example, When there is no heartbeat message of a certain slave node in five heartbeat cycles, the first CAN channel failure of the slave node is directly determined.
  • the first CAN channel failure of the first node is learned, and the standby network is monitored to listen to the heartbeat sent by the first node. Text.
  • the heartbeat message sent by the first node that is monitored by the standby network is sent by the first node by using the second CAN channel, where the first node is any slave node associated with the active master node.
  • the heartbeat packet of the first node is not received in the preset first heartbeat period, it indicates that the active master node does not receive the heartbeat packet sent by the first node, and is the first CAN channel fault.
  • the active master node in order to ensure that the active master node can normally receive the data of the first node, maintain the normal operation of the whole vehicle, and switch to the standby network to listen to the heartbeat message sent by the first node through the second CAN channel.
  • the active master node only listens to the heartbeat message of the first node from the standby network, and the node that is not faulty for the other first CAN channel still receives the heartbeat message on the active network, and thus, the node A needs to receive.
  • Node B and node C data, node B first CAN channel failure and node C second CAN channel failure according to the data transmission method of the present disclosure, node A receives node C data through the primary network, receives nodes from the standby network The data sent by B, so the data of node B and node C can ensure the normal function of node A, thereby ensuring good operation of the whole vehicle and enhancing the redundancy effect.
  • the heartbeat message of the first node if the heartbeat message of the first node is received within a preset period, it indicates that the data transmission failure of the node can be self-repaired by resetting, thereby continuing to receive from the primary network. The data sent by the first node.
  • the heartbeat message sent by the first node through the second CAN channel is received within the preset first heartbeat period, it indicates that the second CAN channel functions normally, so that the data sent by the first node is received on the standby network. .
  • the network architecture reference of the embodiment of the present disclosure is required. 4, referring to FIG. 4, receiving data transmitted from nodes B and C from node A, receiving data transmitted from nodes A and E from node B, receiving data transmitted from nodes B and D from node C, and establishing two networks
  • the active active node one is the active active primary node, and the other is the backup active primary node.
  • the backup active primary node performs the function of replacing the active active primary node.
  • all nodes on the network use A and B pairs of CAN lines.
  • the A line is defined as the primary network
  • the B line is defined as the standby network.
  • all nodes will send information to the A line and the B line at the same time.
  • the node must support receiving information in both the A line and the B line, thereby receiving from the standby node when the first CAN channel of a slave node fails.
  • the data of the node, for the slave nodes that have not failed in the remaining first CAN channels still receive the data sent by the slave network, thereby ensuring complete reception of the data of the relevant slave nodes, and ensuring normal good operation.
  • the default primary network and the backup network communication are not faulty.
  • both the primary network and the backup network may be faulty. Therefore, after the active primary node enters the operational state, it is also executed. Bus fault determination mechanism.
  • all CAN controllers must include a transmit error counter and a receive error timer, combined with the error detection mechanism defined by the data link layer.
  • the error counter Will be enabled, the count is added to 255 and the node enters the bus off state.
  • the active master node simultaneously monitors the status of the primary network and the standby network bus.
  • the primary node of the active primary node fails (for example, abnormal CAN line voltage, excessive error frame leading to busoff, etc.)
  • the active primary node first The active active node heartbeat message is parsed to determine whether the standby active primary node is enabled. If the standby active primary node can function as the active active primary node, the active primary node stops running into the silent state, and the standby node starts to act as the active active primary node.
  • the standby active primary node If the standby active primary node is currently in a failed state and cannot act as the active active primary node, the currently active primary node continues to operate and immediately goes to the standby network to process all secondary node data, while the active primary node notifies the meter or other device.
  • the primary network is currently in a fault state. If the current backup network also fails, the communication network enters a state in which all nodes enter the vehicle special operation state.
  • the number of times 255 accumulated by the error counter is only an example. According to different application requirements, when the active master sends an error timer or accepts an error timer and accumulates any preset value that satisfies the requirement, the master is used. The network fails and switches to the standby network to communicate with other nodes.
  • a short circuit fault occurs on the primary network bus, that is, all nodes on the primary network cannot communicate normally, and error counters of each node are continuously accumulated.
  • each node determines that the primary network channel enters the busoff state, , they will switch to the standby network to receive the data they need.
  • a reset command is sent to the failed CAN channel to determine whether a fault has actually occurred according to the reception condition of the heartbeat message after the reset.
  • the first CAN channel failure is not directly determined, but The primary network sends a reset command to the first node to cause the first CAN channel to enter an operational initial state.
  • the heartbeat packet sent by the first node is continuously monitored on the active network. If the heartbeat packet of the first node is not received in the preset second heartbeat period, the first CAN channel of the first node is learned to be faulty. And switching to the standby network to listen to the heartbeat message sent by the first node.
  • Heartbeat message of the first node is received in the preset second heartbeat period, it is learned that the first CAN channel failure of the first node is temporary and has been eliminated by the reset action, thereby monitoring the first node in the primary network. Heartbeat message sent.
  • the reset command is sent from the standby network to the first node, and the heartbeat message sent by the first node is continuously monitored on the standby network.
  • the network receives the data sent by the first node, and simultaneously receives data sent by the slave node that normally sends the heartbeat message on the primary network.
  • the second CAN channel failure of the first node is learned.
  • the CANopen protocol-based train network data transmission method monitors, according to a pre-configured network node list, a heartbeat message sent by each slave node related to the active master node through the first CAN channel according to the pre-configured network node list, and according to Determining whether the first CAN channel of each slave node is faulty, and determining whether the first CAN channel of each slave node is faulty, and thus, if it is determined that it is not received within the preset first heartbeat period, the timing of the heartbeat timer set corresponding to each slave node and the reception status of the heartbeat message are determined.
  • the heartbeat message of the first node learns the first CAN channel failure of the first node, and switches to the standby network to listen to the heartbeat message sent by the first node through the second CAN channel, if it is within the preset first heartbeat period.
  • Receiving a heartbeat message sent by the first node through the second CAN channel receiving data sent by the first node on the standby network, and receiving other slave nodes of the slave nodes except the first node on the primary network.
  • the data sent sent.
  • the switch to the standby network receives the data of the partial slave node, and the other slave node data is still received on the primary network, ensuring the data of the relevant slave node.
  • the complete reception ensures the good operation of the whole vehicle and improves the redundancy effect of the train network.
  • the fault information of the current train network is displayed in real time according to the situation of the transmitted data, so that the relevant operators can repair the fault information as soon as possible.
  • FIG. 6 is a flowchart of a method for transmitting data of a train network based on the CANopen protocol according to the second embodiment of the present disclosure. As shown in FIG. 6, after the step S204, the method further includes:
  • durations of the first heartbeat period and the second heartbeat period may be self-calibrated according to the needs of the public scene, and the first heartbeat period and the second heartbeat period may be the same or different.
  • monitoring nodes may be different devices, such as an instrument display screen, an application interface of the terminal device, and the like, which are not limited herein.
  • the heartbeat message sent by the first node through the second CAN channel is not received within the preset second heartbeat period, it indicates that the second CAN channel also fails, so that the relevant operator can be informed in time.
  • the fault condition is used for fault processing, and the current fault message of the first CAN channel and the second CAN channel of the first node is sent to the operation monitoring node, and is displayed to the operator to prompt the current fault repair.
  • the preset second heartbeat period is five heartbeat periods
  • the running monitoring node is a display screen, if the heartbeat of the first node is still not monitored for five consecutive heartbeat periods on the standby network. If the active node directly informs the meter display that the primary node and the backup network of the first node have failed (the fault type is the current fault), the active network and the standby network of the node are prompted to be repaired.
  • the heartbeat packet sent by the first node through the first CAN channel is continuously monitored on the primary network and the backup network. If the heartbeat packet of the first node is received from the primary network in the preset first heartbeat period, Obtaining that the first CAN channel of the first node resumes communication, switching to the primary network to receive the data sent by the first node, and sending the current fault message of the second CAN channel of the first node to the operation monitoring node, and displaying the The operator prompts the current troubleshooting.
  • the active primary node needs to continue to listen to the heartbeat message of the node in the primary network and the standby network. If the primary node of the faulty node recovers communication with the backup network, the communication succeeds. The recovered network communicates.
  • the heartbeat message sent by the first node through the first CAN channel is continuously monitored. If the primary node of the faulty node recovers communication with the backup network, the active primary node is in the primary.
  • the heartbeat message of the first node can be received by five consecutive heartbeat periods on the network, and the active master node receives and processes the first node data on the restored network, but still runs the monitoring node (such as the meter display screen, etc.)
  • the system is notified that the first node is a historical fault and the other network is a current fault.
  • the device continues to monitor the heartbeat packet sent by the first node through the second CAN channel on the standby network. If the heartbeat packet of the first node is received from the standby network in the preset first heartbeat period, the monitoring node is sent to the monitoring node. Sending a historical fault message of the first CAN channel and the second CAN channel of the first node and displaying it to the operator, prompting the fault to be repaired.
  • the heartbeat message sent by the first node through the second CAN channel is continuously monitored on the standby network. For example, if the faulty node has recovered communication between the primary network and the backup network.
  • the active master node only needs to process the relevant slave node data on the primary network, but still reports to the running monitoring node (such as the meter display screen) that the primary node of the first node has a historical fault with the standby network, so that Improve the safety and stability of the train network by eliminating relevant safety hazards from relevant operators.
  • the main network and the backup network continue to monitor the heartbeat message sent by the first node through the first CAN channel. If the heartbeat message of the first node is received from the standby network in the preset first heartbeat period, Obtaining that the second CAN channel of the first node resumes communication, receiving data sent by the first node from the standby network, and sending a current fault message of the first CAN channel of the first node to the operation monitoring node, and displaying the current fault message to the operator, Prompt for current troubleshooting.
  • the second CAN channel resumes communication with respect to the first CAN channel
  • the data sent by the first node is received from the standby network, and the current fault message of the first CAN channel of the first node is sent to the operation monitoring node, And displayed to the operator, prompting the current troubleshooting.
  • the heartbeat packet sent by the first node through the first CAN channel is continuously monitored. If the heartbeat packet of the first node is received from the primary network in the preset first heartbeat period, the switch is performed.
  • the primary network receives the data sent by the first node, and sends a historical fault message of the first node and the second CAN channel of the first node to the operation monitoring node, and displays the message to the operator, prompting the fault to be repaired.
  • the standby network when receiving the data sent by the second CAN channel through the standby network, determining whether the first CAN channel of the first node resumes communication according to the preset first heartbeat period and the condition of receiving the heartbeat message, and if restored, Switching to the primary network to receive the data sent by the first node, and sending the historical fault message of the first CAN channel and the second CAN channel of the first node to the operation monitoring node and displaying it to the operator, prompting the fault hidden danger maintenance.
  • the current fault message of the first CAN channel of the first node is sent to the operation monitoring node, and displayed to the operation. Member, prompting for current troubleshooting.
  • the heartbeat message sent by the first node through the second CAN channel is received in the preset second heartbeat period, it indicates that the second CAN channel can normally provide the data service, so that the active master node is on the standby network.
  • the active primary node receives and processing the data related to the node, the data of other nodes is still received and processed from the primary network, and the active primary node notifies the running monitoring node (such as the instrument display screen) that the first CAN channel of the first point of the section is faulty ( The fault type is the current fault), prompting to repair the primary network of the first node.
  • the heartbeat packet sent by the first node through the first CAN channel is continuously monitored. If the heartbeat packet of the first node is received in the preset first heartbeat period, the first node is learned. When a CAN channel resumes communication, it switches to the primary network to receive data sent by the first node.
  • the active primary node After prompting the relevant operator to repair the primary network of the first node, continue to listen to the heartbeat message sent by the first node through the first CAN channel on the primary network, if the first node primary network fails in the middle of the fault. Resume communication. For example, if the active primary node receives the heartbeat message of the first node for five consecutive heartbeat periods on the primary network, the active primary node returns to the primary network to receive the first node data, and stops the secondary network. Processing, but the active master node still informs the running monitoring node (such as the meter display) that the primary node of the first node is faulty (the fault type is historical fault), and also prompts to repair the primary network of the first node. Confirm if there is a fault.
  • the running monitoring node such as the meter display
  • the CANopen protocol-based train network data transmission method selects the primary network and the standby network according to the real-time situation of the train network, and performs corresponding display on the monitoring node to the relevant operator.
  • the stability and reusability of the train network data transmission method are improved.
  • the comparison knows that the disconnection duration of the node associated with the network node is less than or equal to the heartbeat message transmission period, enables the production prohibition time mechanism based on the PDO message to perform the drop determination, and according to the drop duration and the PDO report of the relevant node.
  • the production prohibition time of the text sets a threshold in the PDO production counter corresponding to the relevant node, wherein the threshold is that the node automatically assigns an appropriate value to the PDO according to the preset value of the dropped timer and the PDO production prohibition time of the part of the node. The value of the production counter.
  • the PDO production counter starts counting, and when the PDO production counter is accumulated to the threshold, it is determined that the relevant node is dropped.
  • FIG. 7 is a flowchart of a method for transmitting a train network data based on a CANopen protocol according to a third embodiment of the present disclosure. As shown in FIG. 7, the method includes:
  • the PD0 Provided Data Object
  • the PD0 Provided Data Object
  • the PD0 Provided Data Object
  • the PD0 is used to transmit real-time data and provides a direct access channel to the device application object. It is used to transmit real-time short-frame data with high priority.
  • the production prohibition time of the communication parameter index in the PDO object dictionary is used as a key determination condition for defining whether or not a node is dropped.
  • the PDO communication parameter structure is shown in Table 1 below.
  • the present disclosure requires the master node to establish a list of all network nodes (configurable) according to the topology map, where the network node list includes: each slave node identifier associated with the active master node and a corresponding heartbeat timer, wherein each The heartbeat timer corresponding to the slave node sends network control commands to all the slave nodes simultaneously from the primary network and the standby network according to the production prohibition time setting in the PDO message, and controls the first CAN channel and the second CAN channel of the slave node to enter the PDO.
  • the message operation mode starts a heartbeat timer corresponding to each slave node associated with the active master node.
  • the master node After the master node enters the operation state, the master node continuously detects the PDO transmission status of each node. Because the default primary network works, the primary network is monitored on the primary network according to the pre-configured network node list. The PDO message sent by the slave node through the first CAN channel is used to determine whether each slave node is dropped according to the receiving condition of the message.
  • S402. Determine, according to the receiving condition of the PDO message sent by each slave node, the timing of the heartbeat timer set by each slave node according to the production prohibition time in the PDO message, and determine whether the first CAN channel of each slave node is malfunction.
  • the sub-index 03h production prohibition time indicates that a PDO data is received and processed within a preset time, and if the corresponding PDO data is not received within a preset time, The node records the PDO packet drop frame.
  • the heartbeat counter starts counting.
  • the master node determines that the node is dropped.
  • the timing of the heartbeat timer is set for the production prohibition time, thereby, according to the reception condition of the PDO message sent to each slave node, and the production prohibition time according to the PDO message,
  • the node corresponds to the timing of the set heartbeat timer, and determines whether the first CAN channel of each slave node is faulty.
  • the master node can normally receive the PDO message sent by the slave node within a certain time, otherwise, the communication failure of the first CAN channel of the slave node.
  • the PDO message of the first node is not received in the primary network in the first heartbeat period corresponding to the first node, the first CAN channel of the first node is faulty, and the device is switched to the standby network. Listening to the PDO message sent by the first node through the second CAN channel.
  • the first node is any slave node associated with the active master node.
  • the PDO message of the first node is not received on the primary network, it indicates that the active primary node does not receive the first node.
  • the reason for the PDO message is caused by the failure of the first CAN channel, so as to ensure that the active master node can normally receive the PDO message of the first node, maintain the normal operation of the whole vehicle, and switch to the standby network to listen to the first node through the first Two PDO messages sent by the CAN channel.
  • the active master node can only listen to the PDO message of the first node from the standby network, and the slave node that is not faulty for the other first CAN channel still receives the PDO message on the active network, thereby, node A
  • the Node A receives the data of the Node C through the primary network, from the standby network. Receiving the data sent by the node B, the data of the node B and the node C can ensure the normal function of the node A, thereby ensuring good operation of the whole vehicle and enhancing the redundancy effect.
  • the PDO message of the first node if the PDO message of the first node is received within the preset first heartbeat period, it indicates that the data transmission failure of the slave node can be self-repaired by resetting, thereby continuing from The data sent by the first node is received on the primary network.
  • the PDO message sent by the first node through the second CAN channel is received in the first heartbeat period corresponding to the first node, it indicates that the second CAN channel functions normally, thereby receiving the first node on the standby network.
  • the transmitted data receives data sent by other slave nodes that normally send PDO messages on the primary network.
  • the network architecture reference of the embodiment of the present disclosure is required.
  • the network establishes two master nodes, one is the active master node and the other is the backup master node.
  • the backup master node performs the function of replacing the active master node.
  • the alternate primary node is switched to perform data interaction with other related secondary nodes.
  • all nodes on the network use A and B pairs of CAN lines.
  • the A line is defined as the primary network
  • the B line is defined as the standby network.
  • all nodes will send information to the A line and the B line at the same time.
  • the node must support receiving information in both the A line and the B line, thereby receiving from the standby node when the first CAN channel of a slave node fails.
  • the data of the node, for the slave nodes that have not failed in the remaining first CAN channels still receive the data sent by the slave network, thereby ensuring complete reception of the data of the relevant slave nodes, and ensuring normal good operation.
  • the default primary network and the backup network communication are not faulty.
  • both the primary network and the backup network may be faulty. Therefore, after the active primary node enters the operational state, it is also executed. Bus fault determination mechanism.
  • all CAN controllers must include a transmit error counter and a receive error timer, combined with the error detection mechanism defined by the data link layer.
  • the error counter Will be enabled, the count is added to 255 and the node enters the bus off state. That is, if the transmission error counter or the reception error counter in the active master node is added to the preset value, the master network fault is learned, and the standby network is switched to communicate with other nodes.
  • the active master node simultaneously monitors the status of the primary network and the standby network bus.
  • the primary node of the active primary node fails (for example, abnormal CAN line voltage, excessive error frame leading to busoff, etc.)
  • the active primary node first The standby master node is parsed to determine whether the standby master node is enabled.
  • the standby master node can function as the active active master node, the active master node stops running and enters the silent state, and the standby master node starts to act as the active master node, if the standby master node Currently in a fault state, unable to act as the active master node, the currently active master node continues to operate, and immediately goes to the standby network to process all slave nodes, while the active master node notifies the meter or other device that the primary network is currently faulty. Status, if the current backup network also fails, the communication network enters the ⁇ state, and all nodes enter the vehicle special operation state.
  • the number of times 255 accumulated by the error counter is only an example. According to different application requirements, when the active master sends an error timer or accepts an error timer and accumulates any preset value that satisfies the requirement, the master is used. The network fails and switches to the standby network to communicate with other nodes.
  • a short circuit fault occurs on the primary network bus, that is, all nodes on the primary network cannot communicate normally, and error counters of each node are continuously accumulated.
  • each node determines that the primary network channel enters the busoff state, , they will switch to the standby network to receive the data they need.
  • a reset command is sent to the faulty CAN channel to determine whether a fault has actually occurred according to the reception condition of the PDO message after the reset.
  • the primary network after determining that the PDO message of the first node is not received within the preset first heartbeat period, the first CAN channel failure is not directly determined, but The primary network sends a reset command to the first node to cause the first CAN channel to enter an operational initial state.
  • the PDO message sent by the first node is continuously monitored on the active network, and if the PDO message of the first node is not received in the preset second heartbeat period corresponding to the first node, the first node is learned.
  • the first CAN channel fails and switches to the standby network to listen to the PDO message sent by the first node.
  • the second CAN channel when the second CAN channel is switched to receive the PDO message sent by the first node, if the first node is not received in the first heartbeat period corresponding to the first node, the first node is not sent through the second CAN channel.
  • the PDO message does not directly determine the second CAN channel communication failure, but sends a reset command from the standby network to the first node, and continues to listen to the PDO message sent by the first node in the standby network.
  • the PDO message sent by the first node through the second CAN channel is received in the second heartbeat period corresponding to the first node, it is learned that the second CAN channel failure of the first node is temporary and has been eliminated by the reset action. Therefore, the data sent by the first node is received on the standby network, and at the same time, the data sent by the slave node that normally sends the PDO message is received on the primary network.
  • the second CAN channel failure of the first node is learned.
  • durations of the first heartbeat period and the second heartbeat period may be self-calibrated according to the needs of the public scene, and the first heartbeat period and the second heartbeat period may be the same or different.
  • the CANopen protocol-based train network data transmission method monitors the PDOs sent by the slave nodes related to the active master node through the first CAN channel on the primary network according to the pre-configured network node list.
  • the message determines the first CAN channel of each slave node according to the reception status of the PDO message sent by each slave node and the timing of the heartbeat timer set by each slave node according to the production prohibition time in the PDO message. Whether the fault is that if the PDO message of the first node is not received in the primary network in the first heartbeat period corresponding to the first node, the first CAN channel of the first node is faulty and is switched to the standby.
  • the network monitors the PDO message sent by the first node through the second CAN channel, and receives the PDO message sent by the first node through the second CAN channel in the standby network in the first heartbeat period corresponding to the first node, Then, the data sent by the first node is received on the standby network, and at the same time, the data sent by the other node that normally sends the PDO message is received on the primary network.
  • the switch to the standby network receives the data of the partial slave node, and the other slave node data is still received on the primary network, ensuring the data of the relevant slave node.
  • the complete reception ensures the good operation of the whole vehicle and improves the redundancy effect of the train network.
  • the fault information of the current train network is displayed in real time according to the situation of the transmitted data, so that the relevant operators can repair the fault information as soon as possible.
  • FIG. 8 is a flowchart of a method for transmitting data of a train network based on the CANopen protocol according to the fourth embodiment of the present disclosure. As shown in FIG. 8 , after the step S404, the method further includes:
  • the data sent by the working slave node may be received in the second heartbeat period, and the monitoring node may be a different device if the specific application requirements are different, such as an application of the instrument display screen and the terminal device. Interface, etc., no restrictions here.
  • the PDO message sent by the first node through the second CAN channel is not received within the preset second heartbeat period, it indicates that the second CAN channel also fails, so that the relevant operator can be informed in time.
  • the fault condition is used for fault processing, and the current fault message of the first CAN channel and the second CAN channel of the first node is sent to the operation monitoring node, and is displayed to the operator to prompt the current fault repair.
  • the preset second heartbeat period is a heartbeat period
  • the running monitoring node is a display screen, if the PDO message of the first node is still not monitored in a heartbeat period on the standby network. Then, the active master node directly informs the meter display that the primary node and the backup network of the first node have failed (the fault type is the current fault), and prompts that the primary network and the standby network of the node are inspected.
  • S502 Continuing to monitor the PDO packet sent by the first node on the primary network and the standby network, and receiving the PDO packet of the first node from the primary network in the first first heartbeat period corresponding to the first node. And knowing that the first CAN channel of the first node resumes communication, switching to the primary network to receive the data sent by the first node, and sending the current fault message of the second CAN channel of the first node to the operation monitoring node, and displaying Give the operator a prompt for current troubleshooting.
  • the active primary node needs to continue to listen to the data sent by the active node and the standby network, and if the failed node primary network and the standby network resume communication, the system passes.
  • the recovered network communicates.
  • the PDO message sent by the first node through the first CAN channel is continuously monitored. If the primary node of the faulty node recovers communication with the backup network, the primary node is in the primary service.
  • a heartbeat period on the network can receive the PDO message of the first node, and the master node receives and processes the first node data on the restored network, but still reports the running monitoring node (such as a meter display screen, etc.)
  • the first node of the network is a historical fault and the other network is a current fault.
  • the PDO message sent by the first node is continuously monitored on the standby network. If the PDO message of the first node is received from the standby network in the first heartbeat period corresponding to the first node, the operation is monitored. The node sends a historical fault message of the first CAN channel and the second CAN channel of the first node and displays it to the operator, prompting the fault to be repaired.
  • the PDO message sent by the first node through the second CAN channel is continuously monitored on the standby network. For example, if the faulty node primary network and the standby network are restored in the middle of the faulty node, the communication is resumed.
  • the active master node only needs to process the relevant slave node data on the primary network, but still reports to the running monitoring node (such as the meter display screen) that the primary node of the first node has a historical fault with the standby network, so that Improve the safety and stability of the train network by eliminating relevant safety hazards from relevant operators.
  • the PDO message sent by the first node is continuously monitored on the primary network and the backup network, and if the PDO message of the first node is received from the standby network in the first heartbeat period corresponding to the first node, Then, the second CAN channel of the first node is learned to resume communication, and the data sent by the first node is received from the standby network, and the current fault message of the first CAN channel of the first node is sent to the operation monitoring node, and displayed to the operator. , prompts the current troubleshooting.
  • the second CAN channel resumes communication with respect to the first CAN channel
  • the data sent by the first node is received from the standby network, and the current fault message of the first CAN channel of the first node is sent to the operation monitoring node, And displayed to the operator, prompting the current troubleshooting.
  • the PDO message sent by the first node through the first CAN channel is continuously monitored on the active network, and the PDO of the first node is received from the primary network in a preset first heartbeat period corresponding to the first node.
  • the message is switched to the primary network to receive the data sent by the first node, and the historical fault message of the first CAN channel and the second CAN channel of the first node is sent to the operation monitoring node and displayed to the operator, indicating a hidden fault Overhaul.
  • the standby network when receiving the data sent by the second CAN channel through the standby network, determining whether the first CAN channel of the first node resumes communication according to the condition of the message, and if the recovery, switching to the primary network and receiving the first node Sending data, and sending a historical fault message of the first CAN channel and the second CAN channel of the first node to the operation monitoring node and displaying it to the operator, prompting the fault hidden danger maintenance.
  • the current fault message of the first CAN channel of the first node is sent to the operation monitoring node. And displayed to the operator, prompting the current troubleshooting.
  • the PDO message sent by the first node through the second CAN channel is received in the preset second heartbeat period, it indicates that the second CAN channel can normally provide the data service, so that the master node receives the data on the standby network.
  • Processing the data related to the node the data of other nodes is still received and processed from the primary network, and the primary node notifies the running monitoring node (such as the instrument display screen) that the first CAN channel of the first point of the section is faulty (fault type) For the current fault), prompt to repair the primary network of the first node.
  • the PDO message sent by the first node through the first CAN channel is continuously monitored on the active network, and if the PDO message of the first node is received in the preset first heartbeat period corresponding to the first node, After learning that the first CAN channel of the first node resumes communication, it switches to the primary network to receive data sent by the first node.
  • the PDO message sent by the first node through the first CAN channel is continuously monitored on the primary network, and if the first node is in the middle of the fault, the first node is used in the primary network. Resume communication.
  • the master node can receive the PDO message of the first node in a heartbeat period on the primary network, and then the master node recovers to the primary network and receives the data of the first node, and stops processing from the standby network.
  • the master node still informs the running monitoring node (such as the meter display) that the primary node of the first node is faulty (the fault type is historical fault), and also prompts to repair the primary network of the first node to confirm whether there is a fault. Hidden dangers.
  • the CANopen protocol-based train network data transmission method selects the primary network and the standby network according to the real-time situation of the train network, and performs corresponding display on the monitoring node to the relevant operator.
  • the stability and reusability of the train network data transmission method are improved.
  • each node establishes a list of all network nodes according to the topology map, which is configurable and is all relevant.
  • the drop-off timer for the actual duration of a node's dropped call determination can also be changed by the user according to the characteristics of each node.
  • the list of network nodes associated with the changed node and its corresponding drop timer are reconfigured to enable or disable the offline monitoring of the changed node.
  • the network there are five nodes in the network, one active master node and four slave nodes A, B, C, and D.
  • the current master node needs to monitor the running status of four slave nodes in real time, that is, need to understand four slaves. Whether the node is dropped.
  • the heartbeat packet transmission period of all nodes including the master node is 500 ms.
  • the drop duration of the master node and the slave nodes A, B, and C is 5s, that is, when 5s does not receive the node data, it is considered to be dropped, and the slave node D is special. If the data of the slave node D is not received within 300 ms, the relevant node such as the master node determines that the slave node D is offline.
  • the PDO message period sent by the master node is 100 ms
  • the PDO message period sent from node A is 1000 ms
  • the PDO message period sent from node B is 50 ms
  • the PDO message period sent from node C is 100 ms
  • the PDO message is sent from node D is 50ms.
  • the drop timers of the slave nodes A, B, C, and D in the network node list are compared with the time of the heartbeat timer, where the slave nodes A, B, and C belong.
  • the value of the drop timer is 5s
  • the value of the drop timer from the node D is 300ms
  • the values set by the heartbeat timers of the nodes A, B, C, and D are all 500ms, due to the slave node.
  • the value of the drop timer belonging to A, B, and C is greater than the value of the heartbeat timer.
  • the master node uses the heartbeat packet monitoring mechanism for the three slave nodes, and the value of the drop timer to which the slave node belongs.
  • the master node adopts the PDO production prohibition time mechanism for the slave node D, and the PDO message period sent from the node D is 50 ms, and the master node also needs 50 ms to receive and process the data from the node D, that is, the master.
  • the node sets the prohibition time for the PDO from the node D to 50ms, and calculates the value of the drop timer and the value of the production prohibition time.
  • the value of the production counter is 6, which means that the PDO is not received within a production prohibition time. Data, then PDO production counter To begin counting, the counter accumulates the PDO production to 6, it will be dropped from the determined node D.
  • the invention solves the technical problem that the node drop monitoring mechanism in the prior art has a negative impact on the network communication due to excessive limitation, and provides a train network node drop monitoring design scheme based on the existing two offline monitoring mechanisms.
  • the node heartbeat message is combined with the PDO production prohibition time based on two kinds of drop monitoring mechanisms.
  • the network node decides to monitor the related nodes according to a set of check algorithms.
  • the heartbeat message mechanism still adopts the PDO production prohibition time mechanism, which can effectively avoid the problem that the single drop monitoring mechanism can not meet the actual demand, and also enhances the actual effect of the redundant design and improves the train network security. .
  • the train network node acquires the drop duration set by the drop timer corresponding to each node associated with the network node according to the pre-configured network node list. And the heartbeat packet sending period set by the heartbeat timer, comparing the drop-off duration set by the drop timer corresponding to each node and the heartbeat packet sending period set by the heartbeat timer, and determining the drop of each node according to the comparison result Line monitoring method. Therefore, the node is powered on automatically adopts appropriate node drop monitoring for its related nodes, which improves the accuracy of the node detection and judgment results, improves the redundancy effect of the train network, and ensures the good operation of the whole vehicle.
  • FIG. 9 is a schematic structural diagram of a train network master node according to the first embodiment of the present disclosure. As shown in FIG. 9, the node includes: an acquisition module 100. , the comparison module 200 and the determination module 300.
  • the obtaining module 100 is configured to obtain, according to the pre-configured network node list, a drop duration set by a drop timer corresponding to each node related to the network node, and a heartbeat packet sending period set by the heartbeat timer.
  • FIG. 10 is a schematic structural diagram of a train network master node according to a second embodiment of the present disclosure. As shown in FIG. 10, the node further includes a setting module 400 and a saving module 500, as shown in FIG.
  • the setting module 400 is configured to set a drop duration of the drop timer corresponding to each node associated with the network node.
  • the saving module 500 is configured to save the drop duration in a storage space corresponding to the object dictionary of the network node.
  • the comparison module 200 is configured to compare the drop duration set by the drop timer corresponding to each node and the heartbeat packet sending period set by the heartbeat timer.
  • the determining module 300 is configured to determine, according to the comparison result, a disconnection monitoring manner of each node.
  • the determination module 300 includes a first startup unit 310 and a first setting unit. 320.
  • the first initiating unit 310 is configured to enable the heartbeat packet monitoring mechanism to perform faulty drop determination on the relevant node when comparing that the disconnection duration of the node associated with the network node is greater than the heartbeat packet sending period.
  • the first setting unit 320 is configured to set the PDO production counter corresponding to the relevant node to 0.
  • FIG. 12 is a schematic structural diagram of a train network master node according to a fourth embodiment of the present disclosure.
  • the first startup unit 310 includes a first monitor subunit 311, and A judging subunit 312, a first switching subunit 313, and a first receiving subunit 314.
  • the first monitoring sub-unit 311 is configured to monitor, on the primary network, the heartbeat packets sent by the slave nodes related to the active master node through the first CAN channel according to the pre-configured network node list.
  • the first determining sub-unit 312 is configured to determine whether the first CAN channel of each slave node is faulty according to the timing of the heartbeat timer and the receiving condition of the heartbeat message set corresponding to each slave node.
  • the first switching sub-unit 313 is configured to: when it is determined that the heartbeat message of the first node is not received within the preset first heartbeat period, learn the first CAN channel failure of the first node, and switch to the standby network monitoring. A heartbeat message sent by the first node, where the first node is any slave node associated with the active master node.
  • the first receiving subunit 314 is configured to receive the data sent by the first node on the standby network when receiving the heartbeat message sent by the first node by using the second CAN channel in the preset first heartbeat period, and simultaneously The data sent by the slave node that normally sends the heartbeat message is received on the primary network.
  • the determination module 300 includes a second enabling unit 330 and a second setting unit, as shown in FIG. 340.
  • the second enabling unit 330 is configured to enable the PDO packet-based production prohibition time mechanism to perform a disconnection fault judgment on the relevant node when comparing the learned disconnection duration of the node associated with the network node to be less than or equal to the heartbeat message transmission period.
  • the second setting unit 340 is configured to set a threshold in the PDO production counter corresponding to the relevant node according to the drop duration and the production prohibition time of the PDO message of the relevant node.
  • FIG. 14 is a schematic structural diagram of a train network master node according to a sixth embodiment of the present disclosure. As shown in FIG. 14, the node further includes: a configuration module 600.
  • the configuration module 600 is configured to reconfigure a list of network nodes related to the changed node and a corresponding drop timer thereof when the node is added or removed on the train network, so as to enable or disable the disconnection monitoring of the changed node. .
  • the second enabling unit 330 includes a second snoop subunit 331, The second determining subunit 332, the second switching subunit 333, and the second receiving subunit 334.
  • the second monitoring sub-unit 331 is configured to monitor, on the primary network, the PDO packets sent by the slave nodes related to the active master node through the first CAN channel according to the pre-configured network node list.
  • the second determining sub-unit 332 is configured to determine, according to the receiving condition of the PDO message sent by each slave node, and the timing of the heartbeat timer set by each slave node according to the production prohibition time in the PDO message, Whether the first CAN channel of the node is faulty.
  • the second switching sub-unit 333 is configured to learn that the first node of the first node is faulty when the primary network does not receive the PDO message of the first node in the first heartbeat period corresponding to the first node. And switching to the standby network to listen to the PDO message sent by the first node through the second CAN channel, where the first node is any slave node associated with the active master node.
  • the second receiving sub-unit 334 is configured to receive, on the standby network, the PDO message sent by the first node through the second CAN channel when the standby network receives the first node in the first heartbeat period corresponding to the first node.
  • the data sent by a node at the same time, receives data sent by other slave nodes that normally send PDO messages on the primary network.
  • the train network node acquires the drop duration set by the drop timer corresponding to each node related to the network node according to the pre-configured network node list, and the heartbeat timer setting.
  • the heartbeat packet sending period compares the drop duration set by the drop timer corresponding to each node and the heartbeat packet sending period set by the heartbeat timer, and determines the drop monitoring mode of each node according to the comparison result. Therefore, the node is powered on automatically adopts appropriate node drop monitoring for its related nodes, which improves the accuracy of the node detection and judgment results, improves the redundancy effect of the train network, and ensures the good operation of the whole vehicle.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

本公开公开了一种列车网络节点和基于CANopen协议的列车网络节点监测方法,其中,方法包括:列车网络节点根据预先配置的网络节点列表获取与网络节点相关的各节点对应的掉线计时器设置的掉线时长,以及心跳计时器设置的心跳报文发送周期;将各节点对应的掉线计时器设置的掉线时长以及心跳计时器设置的心跳报文发送周期进行比对,根据比对结果确定各节点的掉线监测方式。由此,实现了节点上电自动为与其相关节点采用合适的节点掉线监测,提高了对节点检测判断结果的准确度,便于提高列车网络的冗余效果,保证整车的良好运行。

Description

列车网络节点和基于CANopen协议的列车网络节点监测方法
相关申请的交叉引用
本申请要求比亚迪股份有限公司于2017年06月21日提交的、公开名称为“列车网络节点和基于CANopen协议的列车网络节点监测方法”的、中国专利申请号“201710478215.8”的优先权。
技术领域
本公开涉及车辆通信技术领域,尤其涉及一种列车网络节点和基于CANopen协议的列车网络节点监测方法。
背景技术
目前列车通信网络应用比较广泛的是列车通信网络TCN总线技术,TCN(Train Communication Network,列车通信网络)涵盖了MVB(Multifunction Vehicle Bus,多功能车辆总线)、WTB(Wire Train Bus,绞线式列车总线)、以太网、CAN(Controller Area Network,现场总线)这四种总线。在对于MVB、WTB、以太网、CAN这四种总线的设计要求中,一个共同的要求是网络冗余设计。所谓的网络冗余,指的是为每个通信网络都应再设立一个备用网络,即网络上每个节点都会采用A线和B线的双线连接方式,当网络出现故障时,可以通过备用网络实现通信,确保网络上各产品数据交互畅通,使列车通信网络的运行环境具备高可用性。
通常列车通信网络设计如果应用CAN总线进行数据交互,多数情况都会基于CANopen(一种基于CAN总线的高层通信协议,是目前工业控制常用的一种现场总线)设计,CANopen的定义是基于CAN总线设计的标准化应用层协议,CANopen协议为传统CAN支援了一套完善的网络管理机制,以支撑冗余网络设计。目前基于CANopen的冗余网络设计都是要求所有网络节点双路同时发送数据,但默认情况所有节点只从主用网络获取数据,当某个或某些从节点在主用网络掉线时,切换到备用网络接收该部分节点的数据。
发明内容
本公开的目的旨在至少在一定程度上解决上述的技术问题之一。
为此,本公开的第一个目的在于提出一种基于CANopen协议的列车网络节点监测方法,该方法实现了节点上电自动为与其相关节点采用合适的节点掉线监测,提高了对节点检测判断结果的准确度,便于提高列车网络的冗余效果,保证整车的良好运行。
本公开的第二个目的在于提出一种列车网络节点。
本公开的第三个目的在于提出一种计算机设备。
本公开的第四个目的在于提出一种存储介质。
为了实现上述目的,本公开第一方面实施例提出了一种列车网络节点和基于CANopen协议的列车网络节点监测方法,包括以下步骤:列车网络节点根据预先配置的网络节点列表获取与所述网络节点相关的各节点对应的掉线计时器设置的掉线时长,以及心跳计时器设置的心跳报文发送周期;将所述各节点对应的掉线计时器设置的掉线时长以及心跳计时器设置的心跳报文发送周期进行比对,根据比对结果确定所述各节点的掉线监测方式。本公开实施例的列车网络节点和基于CANopen协议的列车网络节点监测方法,列车网络节点根据预先配置的网络节点列表获取与网络节点相关的各节点对应的掉线计时器设置的掉线时长,以及心跳计时器设置的心跳报文发送周期,将各节点对应的掉线计时器设置的掉线时长以及心跳计时器设置的心跳报文发送周期进行比对,根据比对结果确定各节点的掉线监测方式。由此,实现了节点上电自动为与其相关节点采用合适的节点掉线监测,提高了对节点检测判断结果的准确度,便于提高列车网络的冗余效果,保证整车的良好运行。
为了实现上述目的,本公开第二方面实施例提出的一种列车网络节点,包括:获取模块,用于根据预先配置的网络节点列表获取与所述网络节点相关的各节点对应的掉线计时器设置的掉线时长,以及心跳计时器设置的心跳报文发送周期;比对模块,用于将所述各节点对应的掉线计时器设置的掉线时长以及心跳计时器设置的心跳报文发送周期进行比对;确定模块,用于根据比对结果确定所述各节点的掉线监测方式。
本公开实施例的列车网络节点,列车网络节点根据预先配置的网络节点列表获取与网络节点相关的各节点对应的掉线计时器设置的掉线时长,以及心跳计时器设置的心跳报文发送周期,将各节点对应的掉线计时器设置的掉线时长以及心跳计时器设置的心跳报文发送周期进行比对,根据比对结果确定各节点的掉线监测方式。由此,实现了节点上电自动为与其相关节点采用合适的节点掉线监测,提高了对节点检测判断结果的准确度,便于提高列车网络的冗余效果,保证整车的良好运行。
为了实现上述目的,本公开第三方面实施例提出的一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现本公开第一方面实施例所述的基于CANopen协议的列车网络节点监测方法。
为了实现上述目的,本公开第四方面实施例提出的一种存储介质,用于存储应用程序,所述应用程序用于执行如本公开第一方面实施例所述的基于CANopen协议的列车网络节点监测方法。
本公开附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本公开的实践了解到。
附图说明
本公开上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1是根据本公开一个实施例的基于CANopen协议的列车网络节点监测方法的流程图;
图2是根据本公开一个实施例的网络节点列表架构示意图;
图3是根据本公开第一个实施例的基于CANopen协议的列车网络数据传输方法的流程图;
图4为本公开一个实施例的列车冗余网络数据传输方法的示例拓扑图;
图5是根据本公开所列举的主用网络总线故障时各节点接收数据示例图;
图6是根据本公开第二个实施例的基于CANopen协议的列车网络数据传输方法的流程图;
图7是根据本公开第三个实施例的基于CANopen协议的列车网络数据传输方法的流程图;
图8是根据本公开第四个实施例的基于CANopen协议的列车网络数据传输方法的流程图;
图9是根据本公开第一个实施例的列车网络主节点的结构示意图;
图10是根据本公开第二个实施例的列车网络主节点的结构示意图;
图11是根据本公开第三个实施例的列车网络主节点的结构示意图;
图12是根据本公开第四个实施例的列车网络主节点的结构示意图;
图13是根据本公开第五个实施例的列车网络主节点的结构示意图;
图14是根据本公开第六个实施例的列车网络主节点的结构示意图;以及
图15是根据本公开第七个实施例的列车网络主节点的结构示意图。
具体实施方式
下面详细描述本公开的实施例,所述实施例的示例在附图中示出,其中自始至终相同 或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本公开,而不能理解为对本公开的限制。
下面参考附图描述本公开实施例的列车网络节点和基于CANopen协议的列车网络节点监测方法。
应当理解的是,相关技术中,首选采用基于节点心跳报文的监测机制进行心跳报文的检测,即通过监测相关节点发送心跳报文,当连续几个(预定义数次)的心跳周期都接收不到某个或某些节点的心跳报文,则判定其在该网络上掉线。
也就是说,根据CANopen应用协议特点,网络上各节点对于节点掉线监测优先使用心跳报文监测机制,所谓心跳报文监测机制,是为每个节点都设置一个心跳计时器,心跳计时器数值设定为一个心跳报文周期,节点在进入操作状态后,每个心跳计时器就会进行倒计时,节点把收到的心跳报文解析出相应的节点ID,然后再与其自身对象字典中的节点ID表匹配,并把匹配上的节点对应的心跳计时器置位,重新计时。若心跳计时器超时,依然接收不到某部分节点的心跳报文,则节点会记录这部分节点心跳报文掉线,当连续几个(预定义数次)心跳周期都接收不到某个或某些节点的心跳报文,即节点心跳报文掉线记录次数累加到一定值时,则判定这部分节点在该网络上掉线。
然而,按现有CANopen规范定义,所有节点的心跳包周期必须统一,这样各节点才能更方便地查询相关节点是否在线,如果每个节点心跳包周期不一样,那么对于各节点掉线判定处理是一种负担。并且,心跳包只是一种状态数据,按规定是不能定义发送周期过快,例如50ms,设置过快发送周期,则会加大通信网络数据量,网络负载增大就会引起大批量的数据冲突(某一时间点会存在多个数据需要传输,但任何通信总线单通道上只能允许一个数据发送)。
为了解决上述技术问题,本公开提出了一种基于CANopen协议的列车网络节点监测方法,该方法实现了节点上电自动为与其相关节点采用合适的节点掉线监测,提高了对节点检测判断结果的准确度,便于提高列车网络的冗余效果,保证整车的良好运行。
图1是根据本公开一个实施例的基于CANopen协议的列车网络节点监测方法的流程图,如图1所示,该方法包括:
S101,列车网络节点根据预先配置的网络节点列表获取与网络节点相关的各节点对应的掉线计时器设置的掉线时长,以及心跳计时器设置的心跳报文发送周期。
可以理解,预先设置与网络节点相关的各节点对应的掉线计时器的掉线时长,将掉线时长保存在网络节点的对象字典对应的存储空间内。
具体而言,本公开是基于CANopen应用协议,要求各节点根据拓扑图建立一个所有网络节点列表,这里的网络节点列表是指自定义CANopen的对象字典中的一个对象索引以各 节点独有的节点ID来标记各节点身份,把所有相关节点的节点ID都包含在该对象存储空间内,同时与每个节点的节点ID所绑定的还有一个掉线计时器、一个心跳计时器。即本公开实施例中的网络节点列表架构如附图2所示。
S102,将各节点对应的掉线计时器设置的掉线时长以及心跳计时器设置的心跳报文发送周期进行比对,根据比对结果确定各节点的掉线监测方式。
具体地,本公开要求各节点上电完成初始化进入预操作状态时,首先要把网络节点列表上中所有节点相关的掉线计时器与心跳计时器进行比对,以根据该比对结果确定各节点的掉线监测方式。
更具体地,在实际应用中,各节点的掉线监测方式除了包括心跳报文掉线监测机制外,还存在另一种常见的掉线检测机制,基于PDO(Process data object,过程数据对象)生产禁止时间的监测机制。当心跳包周期高于该节点PDO发送周期时,就对该节点启用PDO生产禁止时间掉线判定机制,例如我们现在给各节点定义了心跳包周期为500ms,但是实际牵引这个产品PDO发送周期为50ms,按行业规范,连续250ms接收不到牵引的PDO数据(5个PDO发送周期)就需要判定牵引通信异常,进行紧急运行模式。
其中,基于PDO生产禁止时间,即通过预设时间(PDO生产禁止时间,也可等于PDO发送周期)内接收处理一个PDO数据,如果在预设时间内未接收到对应PDO数据,则节点会记录该PDO报文丢帧,当生产禁止约束时间超时记录超过一个预定义的值时,则判定该节点在该网络上掉线。
所谓基于PDO生产禁止时间机制,是指在CANopen对象字典关于RPDO(Receive Process data object,接收过程数据对象)对象索引(1400h to 15FFh)中根据实际掉线时限判定需求分别给各个节点选取其中一个代表性的PDO,再根据这些PDO索引里的生产禁止时间参数分别为每个节点都设置一个PDO生产计数器,节点在进入操作状态后,节点会持续检测相关节点PDO发送情况,当一个生产禁止时间内未接收到PDO数据,则PDO生产计数器开始计数,当PDO生产计数器累加到一个预设值时,则会判定该节点掉线。
在该掉线监测机制中,对于掉线监测机制设计采用基于PDO生产禁止时间,但网络每个节点都使用PDO生产禁止时间掉线判定机制的话,一个节点PDO发送周期为10ms,一个节点PDO发送周期为50ms,一个节点PDO发送周期为100ms,一个节点PDO发送周期为500ms,等等,对于跟这些节点相关联的节点的掉线判定处理也是一种负担,因为需要根据各节点特点来设定不同掉线定时器,每新增一个节点都需要修改软件,不利用管理。
因此,结合以上对心跳报文掉线监测机制和PDO报文掉线监测机制的分析可知,这两种掉线监测机制都有各自的特点和局限性,即目前对于节点掉线监测设计考虑的失效模式比较少,单纯使用基于节点心跳报文监测机制或者基于PDO生产禁止时间监测机制,都无 法准确地界定网络所有节点掉线实际情况,存在一定的局限性。本公开实施例中,融合现有基于节点心跳报文与基于PDO生产禁止时间两种掉线监测机制的特点,通过设定各节点的掉线计时器,再结合一定的判定条件,从而实现节点上电自动为与其相关节点采用合适的节点掉线监测。
即继续参照图2,与每个节点的节点ID所绑定的除了一个掉线计时器和一个心跳计时器外,还包括一个生产计数器。
具体而言,第一种场景:
在该场景下,所有节点掉线计时器的数值都大于心跳计时器的数值,对与其相关节点采用使用心跳报文监测机制,并将相关节点对应的PDO生产计数器设置为0,此时前对于该节点基于PDO生产禁止时间机制使用失效。
当一个心跳报文发送周期内未接收到心跳报文,则心跳计时器重新置位,当累加到预设周期时,则会判定相关节点掉线。
在本实施例中,图3是根据本公开第一个实施例的基于CANopen协议的列车网络数据传输方法的流程图,如图3所示,该方法包括:
S201,根据预先配置的网络节点列表在主用网络上监听与活动主节点相关的各从节点通过第一CAN通道发送的心跳报文。
可以理解,预先根据网络拓扑图建立与活动主节点对应的网络节点列表,其中,网络节点列表包括:与活动主节点相关的各从节点标识和对应的心跳计时器,其中,节点标识可以是从节点的身份标识ID等唯一标识数据信息的标识。
进而,同时从主用网络和备用网络向所有从节点发送网络控制指令,控制从节点的第一CAN通道和第二CAN通道进入心跳报文操作模式,并启动与活动主节点相关的各从节点对应的心跳计时器。
具体而言,活动主节点在自身操作状态后,执行心跳报文监测机制,活动主节点可根据网络拓扑图建立一个所有网络节点列表(可配置的),即自定义CANopen的对象字典中的一个对象索引以各节点独有的节点标识来标记各节点身份,把所有节点的节点标识(比如节点ID)都包含在该对象存储空间内,活动主节点会为每个节点都设置一个心跳计时器,活动主节点在进入操作状态后,每个心跳计时器就会进行倒计时,活动主节点把收到的心跳报文解析出相应的节点标识,比如节点ID,然后再与其自身对象字典中的节点列表匹配,再把匹配上的节点对应的心跳计时器置位,重新计时,根据此特性要求,包含活动主节点在内所有节点都会同时在主用网络与备用网络上以各自节点ID通过特定的周期循环发送心跳报文。
在实际应用中,默认状态下活动主节点先在主用网络上监测各个从节点的心跳报文发 送情况,即根据预先配置的网络节点列表在主用网络上监听与活动主节点相关的各从节点通过第一CAN通道发送的心跳报文。
S202,根据与各从节点对应设置的心跳计时器的计时情况和心跳报文的接收情况,判断各从节点的第一CAN通道是否故障。
具体地,如果从节点的第一CAN通道通信良好,则在一定的时间内,活动主节点可以正常接收从节点发送的心跳报文,否则,从节点的第一CAN通道通信故障。
当然,在某些情况下,可能因为一些其他原因导致活动主节点没有正常接收从节点发送的心跳报文,比如,网络信号受到突然的干扰等,因而为了避免误判,准确确定各从节点的第一CAN通道是否故障,综合考量各从节点对应设置的心跳计时器的计时情况和心跳报文的接收情况,判断各从节点的第一CAN通道是否故障。
举例而言,当有三个心跳周期未监测到某个节点的心跳报文时,活动主节点首先会通过网络控制的复位指令先使该节点进行复位,之后再监听两个心跳周期,在两个心跳周期内可以收到节点的心跳报文,活动主节点维持在主用网络处理该节点处理,否则判断该从节点的第一CAN通道可能故障。
需要强调的是,上述示例中的心跳计时器的计时情况仅仅是一种示例,根据具体应用需求的不同,也可采取其他心跳周期的组合判断各从节点的第一CAN通道是否故障,比如,当有5个心跳周期未检测到某个从节点的心跳报文时,则直接判断该从节点的第一CAN通道故障。
S203,若判断获知在预设的第一心跳周期内没有接收到第一节点的心跳报文,则获知第一节点的第一CAN通道故障,并切换到备用网络监听第一节点发送的心跳报文。
其中,在备用网络监听的第一节点发送的心跳报文是第一节点通过第二CAN通道发送的,其中,第一节点为任意一个与活动主节点相关的从节点。
具体地,在预设的第一心跳周期内如果没有接收到第一节点的心跳报文,则表明导致活动主节点接收不到第一节点发送的心跳报文的原因,是第一CAN通道故障导致的,从而为了保证活动主节点可正常接收到第一节点的数据,维持整车的正常运行,切换到备用网络监听第一节点通过第二CAN通道发送的心跳报文。
需要强调的是,此时活动主节点仅从备用网络监听第一节点的心跳报文,针对其他第一CAN通道无故障的节点,仍在主用网络接收心跳报文,从而,节点A需要接收节点B与节点C的数据,节点B第一CAN通道故障且节点C第二CAN通道故障时,按照本公开的数据传输方法,节点A通过主用网络接收节点C的数据,从备用网络接收节点B发送的数据,因此可节点B和节点C的数据,保证了节点A的正常功能,进而保证整车良好运行,冗余效果增强。
在本公开的另一个实施例中,如果在预设周期内接收到第一节点的心跳报文,则表明该节点的数据传输故障时可以通过复位自行修复的,从而继续从主用网络上接收第一节点发送的数据。
S204,如果在预设的第一心跳周期内接收到第一节点通过第二CAN通道发送的心跳报文,则在备用网络上接收第一节点发送的数据,同时,在主用网络上接收其他正常发送心跳报文的从节点发送的数据。
具体地,如果在预设的第一心跳周期内接收到第一节点通过第二CAN通道发送的心跳报文,则表明第二CAN通道功能正常,从而在备用网络上接收第一节点发送的数据。
由此,根据上述对基于CANopen协议的列车网络数据传输方法的描述,同时参考行业规范CIA302-6对于CAN冗余的设计以及轨道行业成熟现场总线冗余机制,要求本公开实施例的网络架构参考附图4,参照图4,从节点A接收从节点B和C发送的数据,从节点B接收从节点A和E发送的数据,从节点C接收从节点B和D发送的数据,网络设立两个活动主节点,一个为活动活动主节点,另一个为备份活动主节点,当活动活动主节点出现故障时,备份活动主节点才会进行替代之前活动活动主节点的功能。
另外所有网络上的节点都采用A、B两对CAN线连接,A线路定义为主用网络,B线路定义为备用网络,所有节点在运行时,会同时往A线与B线上发送信息,但在初始默认情况下只会在A线上接收信息,但节点必须支持同时在A线与B线中接收信息,由此,当一个从节点的第一CAN通道发生故障时,从备用节点接收该节点的数据,针对其余的第一CAN通道没有发生故障的从节点,仍从主用网络接收其发送的数据,由此保证对对相关从节点数据的完整接收,保证了正常的良好运行。
当然,上述对本公开实施例的描述,默认主用网络和备用网络通信没有故障,在实际应用时,主用网络和备用网络均可能出现故障,因而,活动主节点自身进入操作状态后,还执行总线故障判定机制。
具体而言,根据CAN总线特性要求,所有CAN控制器都必须包含一个发送错误计数器与一个接收错误计时器,结合数据链路层所定义的错误检测机制,当检测到总线通信异常时,错误计数器会启用,计数累加到255则节点进入bus off(总线关闭)状态。
现要求活动主节点同时监测主用网络与备用网络总线状态,当活动主节点主用网络总线出现故障(比如,CAN线电压异常、错误帧过多导致busoff等等)时,活动主节点首先会解析备用活动主节点心跳报文,判定是否启用备用活动主节点,如果备用活动主节点可以正常担任活动活动主节点角色,活动主节点停止运行进入静默状态,备用节点启动,担任活动活动主节点,如果备用活动主节点目前处于故障状态,无法担任活动活动主节点角色,那当前活动主节点继续维持运行,并立即转到备用网络处理所有从节点数据,同时活 动主节点会给仪表或其他设备通报主用网络当前处于故障状态,如果当前备用网络也出现了故障,则通信网络进入瘫痪状态,所有节点进入车辆特殊操作状态。
其中,上述错误计数器累计的次数255,仅仅是一种示例,根据具体应用需求的不同,当活动主节点发送错误计时器或者接受错误计时器累加到任意满足要求的预设数值时,获知主用网络故障,切换到备用网络与其他节点进行通信。
举例而言,如图5所示,主用网络总线出现短路故障即主用网络上所有节点都无法正常通信,各个节点的错误计数器都会持续累加,当各个节点判定主用网络通道进入busoff状态后,都会自行切换到备用网络接收各自所需的数据。
需要强调的是,基于以上描述,在实际应用中,有可能CAN通道发生的故障并不是长久故障,比如网速突变导致的运行暂停等,因而,为了避免不必要的切换造成的资源的浪费,在本公开的一个实施例中,向故障的CAN通道发送复位指令,以根据复位后心跳报文的接收情况,判断当前是否确实发生故障。
具体而言,在本公开的一个实施例中,在判断获知在预设的第一心跳周期内没有接收到第一节点的心跳报文之后,并不直接判断第一CAN通道故障,而是从主用网络向第一节点发送复位指令,以使得第一CAN通道进入运行初始状态。
进而,在主用网络上继续监听第一节点发送的心跳报文,如果在预设的第二心跳周期内没有接收到第一节点的心跳报文,则获知第一节点的第一CAN通道故障,并切换到备用网络监听所述第一节点发送的心跳报文。
如果在预设的第二心跳周期内接收到第一节点的心跳报文,则获知第一节点的第一CAN通道故障是暂时的,已经通过复位动作排除,因而在主用网络监听第一节点发送的心跳报文。
基于同样的原理,在切换到第二CAN通道接收第一节点发送的心跳报文时如果在预设的第一心跳周期内接收不到第一节点通过第二CAN通道发送的心跳报文,则并不直接判断第二CAN通道通信故障,而是从备用网络向第一节点发送复位指令,并在备用网络继续监听第一节点发送的心跳报文。
如果在预设的第二心跳周期内接收到第一节点通过第二CAN通道发送的心跳报文,则获知第一节点的第二CAN通道故障是暂时的,已经通过复位动作排除,因而在备用网络上接收第一节点发送的数据,同时,在主用网络上接收其他正常发送心跳报文的从节点发送的数据。
如果在预设的第二心跳周期内没有接收到第一节点通过第二CAN通道发送的心跳报文,则获知第一节点的第二CAN通道故障。
本公开实施例的基于CANopen协议的列车网络数据传输方法,根据预先配置的网络节点列表在主用网络上监听与活动主节点相关的各从节点通过第一CAN通道发送的心跳报文,并根据与各从节点对应设置的心跳计时器的计时情况和心跳报文的接收情况,判断各从节点的第一CAN通道是否故障,从而,若判断获知在预设的第一心跳周期内没有接收到第一节点的心跳报文,则获知第一节点的第一CAN通道故障,并切换到备用网络监听第一节点通过第二CAN通道发送的心跳报文,如果在预设的第一心跳周期内接收到第一节点通过第二CAN通道发送的心跳报文,则在备用网络上接收第一节点发送的数据,同时,在主用网络上接收各从节点中除第一节点外的其他从节点发送的数据。由此,当某个或某些从节点在主用网络掉线时,切换到备用网络接收该部分从节点的数据,其他从节点数据依然在主用网络上接收,保证了对相关从节点数据的完整接收,保证了整车的良好运行,提高了列车网络的冗余效果。
基于以上实施例,为了进一步提高基于CANopen协议的列车网络数据传输方法的稳定性与复用性,根据发送数据的情况实时展示当前列车网络的故障信息,以便于相关操作人员根据故障信息尽快维修等,以提高列车网络数据传输的稳定性。
图6是根据本公开第二个实施例的基于CANopen协议的列车网络数据传输方法的流程图,如图6所示,在上述步骤S204之后还包括:
S301,如果在预设的第二心跳周期内接收不到第一节点通过第二CAN通道发送的心跳报文,则向运行监控节点发送第一节点的第一CAN通道和第二CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
需要强调的是,上述第一心跳周期和第二心跳周期的时长,均可根据因公场景的需要自定标定,第一心跳周期和第二心跳周期可以相同,也可以不同。
另外上述监控节点在具体应用需求不同的情况下,可以为不同的装置,比如可以是仪表显示屏、终端设备的应用界面等,在此不做限制。
具体地,如果在预设的第二心跳周期内接收到不到第一节点通过第二CAN通道发送的心跳报文,则表明第二CAN通道也发生故障,从而,为了便于相关操作人员及时获知故障情况以进行故障处理,向运行监控节点发送第一节点的第一CAN通道和第二CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
举例而言,在本示例中,预设的第二心跳周期是五个心跳周期,运行监控节点是显示屏,则如果在备用网络上连续五个心跳周期依然监听不到第一节点的心跳报文,则活动主节点直接向仪表显示屏通报该第一节点主用网络与备用网络都已出现故障(故障类型为当前故障),提示对该节点主用网络与备用网络进行检修。
S302,在主用网络和备用网络上继续监听第一节点通过第一CAN通道发送的心跳报 文,若在预设的第一心跳周期内从主用网络接收到第一节点的心跳报文,则获知第一节点的第一CAN通道恢复通信,则切换到主用网络上接收第一节点发送的数据,并向运行监控节点发送第一节点的第二CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
具体地,节点双路都出现通信故障时,活动主节点需继续在主用网络与备用网络继续监听该节点心跳报文,如若中途故障节点主用网络与备用网络其中之一恢复通信,则通过恢复的网络进行通信。
举例而言,在主用网络和备用网络上继续监听第一节点通过第一CAN通道发送的心跳报文,如若中途故障节点主用网络与备用网络其中之一恢复通信,即活动主节点在主用网络上连续五个心跳周期可以接收到该第一节点的心跳报文,则活动主节点在恢复的网络上接收处理该第一节点数据,但仍会向运行监控节点(如仪表显示屏等)通报该第一节点该路网络为历史故障且另一路网络为当前故障。
S303,在备用网络上继续监听第一节点通过第二CAN通道发送的心跳报文,若在预设的第一心跳周期内从备用网络接收到第一节点的心跳报文,则向运行监控节点发送第一节点的第一CAN通道和第二CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
为了使得列车网络全面恢复以提高其稳定性,在备用网络上继续监听第一节点通过第二CAN通道发送的心跳报文,举例而言,如若中途故障节点主用网络与备用网络都恢复了通信,则活动主节点只需在主用网络上处理相关从节点数据,但仍会向运行监控节点(如仪表显示屏等)通报该第一节点主用网络与备用网都出现过历史故障,以便于相关操作人员排除安全隐患,提高列车网络的安全稳定性。
S304,在主用网络和备用网络上继续监听第一节点通过第一CAN通道发送的心跳报文,若在预设的第一心跳周期内从备用网络接收到第一节点的心跳报文,则获知第一节点的第二CAN通道恢复通信,则从备用网络上接收第一节点发送的数据,并向运行监控节点发送第一节点的第一CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
具体地,如果第二CAN通道相对于第一CAN通道先恢复通信,则从备用网络上接收第一节点发送的数据,并向运行监控节点发送第一节点的第一CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
S305,在主用网络上继续监听第一节点通过第一CAN通道发送的心跳报文,若在预设的第一心跳周期内从主用网络接收到第一节点的心跳报文,则切换到主用网络上接收第一节点发送的数据,并向运行监控节点发送第一节点的第一CAN通道和第二CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
具体地,在通过备用网络接收第二CAN通道发送的数据时,根据预设的第一心跳周期和接收心跳报文的情况,判断第一节点的第一CAN通道是否恢复通信,如果恢复,则切换 到主用网络上接收第一节点发送的数据,并向运行监控节点发送第一节点的第一CAN通道和第二CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
S306,如果在预设的第二心跳周期内接收到第一节点通过第二CAN通道发送的心跳报文,向运行监控节点发送第一节点的第一CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
具体地,如果在预设的第二心跳周期内接收到第一节点通过第二CAN通道发送的心跳报文,则表明第二CAN通道可正常提供数据服务,从而,活动主节点会在备用网上接收处理该节点相关数据,其他节点的数据仍从主用网络上接收处理,同时活动主节点会向运行监控节点(如仪表显示屏等)通报该节第一点的第一CAN通道出现故障(故障类型为当前故障),提示对该第一节点主用网络进行检修。
S307,在主用网络上继续监听第一节点通过第一CAN通道发送的心跳报文,若在预设的第一心跳周期内接收到第一节点的心跳报文,则获知第一节点的第一CAN通道恢复通信,则切换到主用网络上接收第一节点发送的数据。
S308,向运行监控节点发送第一节点的第一CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
具体地,在提示相关操作人员对第一节点的主用网络进行检修后,在主用网络上继续监听第一节点通过第一CAN通道发送的心跳报文,如若中途故障第一节点主用网络恢复通信,比如,活动主节点在主用网络上连续五个心跳周期可以接收到第一节点的心跳报文,则活动主节点恢复到主用网络上接收该第一节点数据,停止从备用网络的处理,但活动主节点仍会向运行监控节点(如仪表显示屏等)通报第一节点主用网络出现故障(故障类型为历史故障),同样提示对该第一节点主用网络进行检修,确认是否存在故障隐患。
综上所述,本公开实施例的基于CANopen协议的列车网络数据传输方法,根据列车网络的实时情况,进行主用网络和备用网络的选择,并在监控节点向相关操作人员进行相应的显示,提高了列车网络数据传输方法的稳定性与复用性。
第二种场景:
在该场景下,比较获知与网络节点相关节点的掉线时长小于等于心跳报文发送周期,启用基于PDO报文的生产禁止时间机制进行掉线判断,并根据掉线时长和相关节点的PDO报文的生产禁止时间在相关节点对应的PDO生产计数器中设置阈值,其中,阈值是节点会自动根据预设的掉线计时器的值与部分节点的PDO生产禁止时间计算出一个合适的值赋予PDO生产计数器的值。
进而,当一个生产禁止时间内未接收到PDO报文,则PDO生产计数器开始计数,当PDO生产计数器累加到阈值时,则会判定相关节点掉线。
图7是根据本公开第三个实施例的基于CANopen协议的列车网络数据传输方法的流程图,如图7所示,该方法包括:
S401,根据预先配置的网络节点列表在主用网络上监听与活动主节点相关的各从节点通过第一CAN通道发送的PDO报文。
其中,PD0(Process Data Object,过程数据对象)是用来传输实时数据的,提供对设备应用对象的直接访问通道,它用来传输实时短帧数据,具有较高的优先权。
在PDO报文监测机制中,利用PDO对象字典中关于通信参数索引的生产禁止时间来作为界定一个节点有无掉线的关键判定条件。PDO通信参数结构如下表1所示。
表1
Figure PCTCN2018092047-appb-000001
可以理解,本公开要求主节点根据拓扑图建立一个所有网络节点列表(可配置的),其中,网络节点列表包括:与活动主节点相关的各从节点标识和对应的心跳计时器,其中,各从节点对应的心跳计时器根据PDO报文中的生产禁止时间设置,从主用网络和备用网络同时向所有从节点发送网络控制指令,控制从节点的第一CAN通道和第二CAN通道进入PDO报文操作模式,并启动与所述活动主节点相关的各从节点对应的心跳计时器。
即在CANopen对象字典关于RPDO对象索引(1400h to 15FFh)中根据实际掉线时限判定需求分别给各个节点选取其中一个代表性的PDO,再根据这些PDO索引里的生产禁止时间参数分别为每个节点都设置一个心跳计数器。
进而,主节点在进入操作状态后,主节点会持续检测各节点PDO发送情况,由于默认主用网络工作,因而,根据预先配置的网络节点列表在主用网络上监听与活动主节点相关的各从节点通过第一CAN通道发送的PDO报文,以便于根据报文接收情况,判断各从节点是否掉线。
S402,根据对各从节点发送的PDO报文的接收情况,以及根据PDO报文中的生产禁止时间为各从节点对应设置的心跳计时器的计时情况,判断各从节点的第一CAN通道是否故障。
应当理解的是,继续参照上表1,在PDO报文发送机制中,子索引03h生产禁止时间表示预设时间内接收处理一个PDO数据,如果在预设时间内未接收到对应PDO数据,则节点会记录该PDO报文丢帧,当一个生产禁止时间内未接收到PDO数据,则心跳计数器开始计数,当心跳计数器累加到一个预设值时,主节点会判定该节点掉线。因此,在本公开实施例中,针对生产禁止时间设置心跳计时器的计时情况,从而,根据对各从节点发送的PDO报文的接收情况,以及根据PDO报文中的生产禁止时间为各从节点对应设置的心跳计时器的计时情况,判断各从节点的第一CAN通道是否故障。
其中,如果从节点的第一CAN通道通信良好,则在一定的时间内,主节点可以正常接收从节点发送的PDO报文,否则,从节点的第一CAN通道通信故障。
S403,若在预设的与第一节点对应的第一心跳周期内没有在主用网络接收到第一节点的PDO报文,则获知第一节点的第一CAN通道故障,并切换到备用网络监听第一节点通过第二CAN通道发送的PDO报文。
其中,第一节点为任意一个与活动主节点相关的从节点。
具体地,在预设的与第一节点对应的第一心跳周期内,如果在主用网络上没有接收到第一节点的PDO报文,则表明导致活动主节点接收不到第一节点发送的PDO报文的原因,是第一CAN通道故障导致的,从而为了保证活动主节点可正常接收到第一节点的PDO报文,维持整车的正常运行,切换到备用网络监听第一节点通过第二CAN通道发送的PDO报文。
需要强调的是,此时活动主节点可仅从备用网络监听第一节点的PDO报文,针对其他第一CAN通道无故障的从节点,仍在主用网络接收PDO报文,从而,节点A需要接收节点B与节点C的数据,节点B第一CAN通道故障且节点C第二CAN通道故障时,按照本公开的数据传输方法,节点A通过主用网络接收节点C的数据,从备用网络接收节点B发送的数据,因此可节点B和节点C的数据,保证了节点A的正常功能,进而保证整车良好运行,冗余效果增强。
在本公开的另一个实施例中,如果在预设的第一心跳周期内接收到第一节点的PDO报文,则表明该从节点的数据传输故障时可以通过复位自行修复的,从而继续从主用网络上接收第一节点发送的数据。
S404,若在预设的与第一节点对应的第一心跳周期内在备用网络接收到第一节点通过第二CAN通道发送的PDO报文,则在备用网络上接收第一节点发送的数据,同时,在主 用网络上接收其他正常发送PDO报文的从节点发送的数据。
具体地,如果在与第一节点对应的第一心跳周期内接收到第一节点通过第二CAN通道发送的PDO报文,则表明第二CAN通道功能正常,从而在备用网络上接收第一节点发送的数据,同时,在主用网络上接收其他正常发送PDO报文的从节点发送的数据。
由此,根据上述对基于CANopen协议的列车网络数据传输方法的描述,同时参考行业规范CIA302-6对于CAN冗余的设计以及轨道行业成熟现场总线冗余机制,要求本公开实施例的网络架构参考附图4,网络设立两个主节点,一个为活动主节点,另一个为备份主节点,当活动主节点出现故障时,备份主节点才会进行替代之前活动主节点的功能。
也就是说,在本公开的一个实施例中,若检测到活动主节点故障,则切换到备用主节点与其他相关的从节点进行数据交互。
另外所有网络上的节点都采用A、B两对CAN线连接,A线路定义为主用网络,B线路定义为备用网络,所有节点在运行时,会同时往A线与B线上发送信息,但在初始默认情况下只会在A线上接收信息,但节点必须支持同时在A线与B线中接收信息,由此,当一个从节点的第一CAN通道发生故障时,从备用节点接收该节点的数据,针对其余的第一CAN通道没有发生故障的从节点,仍从主用网络接收其发送的数据,由此保证对对相关从节点数据的完整接收,保证了正常的良好运行。
当然,上述对本公开实施例的描述,默认主用网络和备用网络通信没有故障,在实际应用时,主用网络和备用网络均可能出现故障,因而,活动主节点自身进入操作状态后,还执行总线故障判定机制。
具体而言,根据CAN总线特性要求,所有CAN控制器都必须包含一个发送错误计数器与一个接收错误计时器,结合数据链路层所定义的错误检测机制,当检测到总线通信异常时,错误计数器会启用,计数累加到255则节点进入bus off(总线关闭)状态。即若活动主节点内的发送错误计数器或者接收错误计数器累加到预设数值,则获知主用网络故障,切换到备用网络与其他节点进行通信。
现要求活动主节点同时监测主用网络与备用网络总线状态,当活动主节点主用网络总线出现故障(比如,CAN线电压异常、错误帧过多导致busoff等等)时,活动主节点首先会解析备用主节点报文,判定是否启用备用主节点,如果备用主节点可以正常担任活动活动主节点角色,活动主节点停止运行进入静默状态,备用主节点启动,担任活动主节点,如果备用主节点目前处于故障状态,无法担任活动主节点角色,那当前活动主节点继续维持运行,并立即转到备用网络处理所有从节点数据,同时活动主节点会给仪表或其他设备通报主用网络当前处于故障状态,如果当前备用网络也出现了故障,则通信网络进入瘫痪状态,所有节点进入车辆特殊操作状态。
其中,上述错误计数器累计的次数255,仅仅是一种示例,根据具体应用需求的不同,当活动主节点发送错误计时器或者接受错误计时器累加到任意满足要求的预设数值时,获知主用网络故障,切换到备用网络与其他节点进行通信。
举例而言,如图5所示,主用网络总线出现短路故障即主用网络上所有节点都无法正常通信,各个节点的错误计数器都会持续累加,当各个节点判定主用网络通道进入busoff状态后,都会自行切换到备用网络接收各自所需的数据。
需要强调的是,基于以上描述,在实际应用中,有可能CAN通道发生的故障并不是长久故障,比如网速突变导致的运行暂停等,因而,为了避免不必要的切换造成的资源的浪费,在本公开的一个实施例中,向故障CAN通道发送复位指令,以根据复位后PDO报文的接收情况,判断当前是否确实发生故障。
具体而言,在本公开的一个实施例中,在判断获知在预设的第一心跳周期内没有接收到第一节点的PDO报文之后,并不直接判断第一CAN通道故障,而是从主用网络向第一节点发送复位指令,以使得第一CAN通道进入运行初始状态。
进而,在主用网络上继续监听第一节点发送的PDO报文,如果在预设的与第一节点对应的第二心跳周期内没有接收到第一节点的PDO报文,则获知第一节点的第一CAN通道故障,并切换到备用网络监听所述第一节点发送的PDO报文。
如果在预设的第二心跳周期内接收到第一节点的PDO报文,则获知第一节点的第一CAN通道故障是暂时的,已经通过复位动作排除,因而在主用网络监听第一节点发送的PDO报文。
基于同样的原理,在切换到第二CAN通道接收第一节点发送的PDO报文时如果在预设的与第一节点对应的第一心跳周期内接收不到第一节点通过第二CAN通道发送的PDO报文,则并不直接判断第二CAN通道通信故障,而是从备用网络向第一节点发送复位指令,并在备用网络继续监听第一节点发送的PDO报文。
如果在与第一节点对应的第二心跳周期内接收到第一节点通过第二CAN通道发送的PDO报文,则获知第一节点的第二CAN通道故障是暂时的,已经通过复位动作排除,因而在备用网络上接收第一节点发送的数据,同时,在主用网络上接收其他正常发送PDO报文的从节点发送的数据。
如果在与第一节点对应的第二心跳周期内没有接收到第一节点通过第二CAN通道发送的PDO报文,则获知第一节点的第二CAN通道故障。
需要强调的是,上述第一心跳周期和第二心跳周期的时长,均可根据因公场景的需要自定标定,第一心跳周期和第二心跳周期可以相同,也可以不同。
综上所述,本公开实施例的基于CANopen协议的列车网络数据传输方法,根据预先配置的网络节点列表在主用网络上监听与活动主节点相关的各从节点通过第一CAN通道发送的PDO报文,根据对各从节点发送的PDO报文的接收情况,以及根据PDO报文中的生产禁止时间为各从节点对应设置的心跳计时器的计时情况,判断各从节点的第一CAN通道是否故障,若在预设的与第一节点对应的第一心跳周期内没有在主用网络接收到第一节点的PDO报文,则获知第一节点的第一CAN通道故障,并切换到备用网络监听第一节点通过第二CAN通道发送的PDO报文,若在预设的与第一节点对应的第一心跳周期内在备用网络接收到第一节点通过第二CAN通道发送的PDO报文,则在备用网络上接收第一节点发送的数据,同时,在主用网络上接收其他正常发送PDO报文的从节点发送的数据。由此,当某个或某些从节点在主用网络掉线时,切换到备用网络接收该部分从节点的数据,其他从节点数据依然在主用网络上接收,保证了对相关从节点数据的完整接收,保证了整车的良好运行,提高了列车网络的冗余效果。
基于以上实施例,为了进一步提高基于CANopen协议的列车网络数据传输方法的稳定性与复用性,根据发送数据的情况实时展示当前列车网络的故障信息,以便于相关操作人员根据故障信息尽快维修等,以提高列车网络数据传输的稳定性。
图8是根据本公开第四个实施例的基于CANopen协议的列车网络数据传输方法的流程图,如8所示,在上述步骤S404之后还包括:
S501,若在预设的与第一节点对应的第二心跳周期内在备用网络上没有接收到第一节点发送的PDO报文,则向运行监控节点发送第一节点的第一CAN通道和第二CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
其中,在上述第二心跳周期内可接收正常工作的从节点发送的数据,另外上述监控节点在具体应用需求不同的情况下,可以为不同的装置,比如可以是仪表显示屏、终端设备的应用界面等,在此不做限制。
具体地,如果在预设的第二心跳周期内接收到不到第一节点通过第二CAN通道发送的PDO报文,则表明第二CAN通道也发生故障,从而,为了便于相关操作人员及时获知故障情况以进行故障处理,向运行监控节点发送第一节点的第一CAN通道和第二CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
举例而言,在本示例中,预设的第二心跳周期是a个心跳周期,运行监控节点是显示屏,则如果在备用网络上a个心跳周期依然监听不到第一节点的PDO报文,则活动主节点直接向仪表显示屏通报该第一节点主用网络与备用网络都已出现故障(故障类型为当前故障),提示对该节点主用网络与备用网络进行检修。
S502,在主用网络和备用网络上继续监听第一节点发送的PDO报文,若在预设的与第 一节点对应的第一心跳周期内从主用网络接收到第一节点的PDO报文,则获知第一节点的第一CAN通道恢复通信,则切换到主用网络上接收第一节点发送的数据,并向运行监控节点发送第一节点的第二CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
具体地,节点双路都出现通信故障时,活动主节点需继续在主用网络与备用网络继续监听该节点发送的数据,如若中途故障节点主用网络与备用网络其中之一恢复通信,则通过恢复的网络进行通信。
举例而言,在主用网络和备用网络上继续监听第一节点通过第一CAN通道发送的PDO报文,如若中途故障节点主用网络与备用网络其中之一恢复通信,即主节点在主用网络上a个心跳周期可以接收到该第一节点的PDO报文,则主节点在恢复的网络上接收处理该第一节点数据,但仍会向运行监控节点(如仪表显示屏等)通报该第一节点该路网络为历史故障且另一路网络为当前故障。
S503,在备用网络上继续监听第一节点发送的PDO报文,若在预设的与第一节点对应的第一心跳周期内从备用网络接收到第一节点的PDO报文,则向运行监控节点发送第一节点的第一CAN通道和第二CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
为了使得列车网络全面恢复以提高其稳定性,在备用网络上继续监听第一节点通过第二CAN通道发送的PDO报文,举例而言,如若中途故障节点主用网络与备用网络都恢复了通信,则活动主节点只需在主用网络上处理相关从节点数据,但仍会向运行监控节点(如仪表显示屏等)通报该第一节点主用网络与备用网都出现过历史故障,以便于相关操作人员排除安全隐患,提高列车网络的安全稳定性。
S504,在主用网络和备用网络上继续监听第一节点发送的PDO报文,若在预设的与第一节点对应的第一心跳周期内从备用网络接收到第一节点的PDO报文,则获知第一节点的第二CAN通道恢复通信,则从备用网络上接收第一节点发送的数据,并向运行监控节点发送第一节点的第一CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
具体地,如果第二CAN通道相对于第一CAN通道先恢复通信,则从备用网络上接收第一节点发送的数据,并向运行监控节点发送第一节点的第一CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
S505,在主用网络上继续监听第一节点通过第一CAN通道发送的PDO报文,若在预设的与第一节点对应的第一心跳周期内从主用网络接收到第一节点的PDO报文,则切换到主用网络上接收第一节点发送的数据,并向运行监控节点发送第一节点的第一CAN通道和第二CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
具体地,在通过备用网络接收第二CAN通道发送的数据时,根据报文的情况,判断第一节点的第一CAN通道是否恢复通信,如果恢复,则切换到主用网络上接收第一节点发送 的数据,并向运行监控节点发送第一节点的第一CAN通道和第二CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
S506,若在预设的与第一节点对应的第二心跳周期内在备用网络上接收到第一节点发送的PDO报文,向运行监控节点发送第一节点的第一CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
具体地,如果在预设的第二心跳周期内接收到第一节点通过第二CAN通道发送的PDO报文,则表明第二CAN通道可正常提供数据服务,从而,主节点会在备用网上接收处理该节点相关数据,其他节点的数据仍从主用网络上接收处理,同时主节点会向运行监控节点(如仪表显示屏等)通报该节第一点的第一CAN通道出现故障(故障类型为当前故障),提示对该第一节点主用网络进行检修。
S507,在主用网络上继续监听第一节点通过第一CAN通道发送的PDO报文,若在预设的与第一节点对应的第一心跳周期内接收到第一节点的PDO报文,则获知第一节点的第一CAN通道恢复通信,则切换到主用网络上接收第一节点发送的数据。
S508,向运行监控节点发送第一节点的第一CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
具体地,在提示相关操作人员对第一节点的主用网络进行检修后,在主用网络上继续监听第一节点通过第一CAN通道发送的PDO报文,如若中途故障第一节点主用网络恢复通信,比如,主节点在主用网络上a个心跳周期可以接收到第一节点的PDO报文,则主节点恢复到主用网络上接收该第一节点数据,停止从备用网络的处理,但主节点仍会向运行监控节点(如仪表显示屏等)通报第一节点主用网络出现故障(故障类型为历史故障),同样提示对该第一节点主用网络进行检修,确认是否存在故障隐患。
综上所述,本公开实施例的基于CANopen协议的列车网络数据传输方法,根据列车网络的实时情况,进行主用网络和备用网络的选择,并在监控节点向相关操作人员进行相应的显示,提高了列车网络数据传输方法的稳定性与复用性。
为了进一步提高本公开实施例的基于CANopen协议的列车网络节点监测方法的灵活性,在本公开的一个实施例中,各节点根据拓扑图建立一个所有网络节点列表是可配置的,且为所有相关节点再设立的描述对于某个节点掉线判定的实际时长的掉线计时器,也可由用户自行根据各节点特点改变数值。当列车网络上新增或减少一个节点时,重新配置与变化节点相关的网络节点列表及其对应掉线计时器,实现启用或停用对变化节点的掉线监测。
为了使得本领域的技术人员,对本公开基于CANopen协议的列车网络节点监测方法更加清楚,下面结合该方法在具体应用场景中的的实施过程进行举例说明。
在本示例中,网络中有五个节点,一个活动主节点与四个从节点A、B、C、D,现定 义主节点需要实时监测四个从节点的运行状态,即需要了解四个从节点是否掉线。
根据网络通信数据量决定,包括主节点在内所有节点的心跳报文发送周期为500ms。对于各节点掉线界定条件的设定,主节点与从节点A、B、C的掉线时长均为5s,即5s接收不到该节点数据时视其已掉线,而从节点D较为特殊,如果300ms接收不到从节点D数据,主节点等相关节点则会判定从节点D掉线。
主节点发送PDO报文周期为100ms,从节点A发送PDO报文周期为1000ms、从节点B发送PDO报文周期为50ms、从节点C发送PDO报文周期为100ms,从节点D发送PDO报文周期为50ms。
按以上设定,主节点上电初始化完成后,依次把网络节点列表中的从节点A、B、C、D的掉线计时器与其心跳计时器时间对比,其中从节点A、B、C所属的掉线计时器的值为5s,从节点D所属的掉线计时器的值为300ms,从节点A、B、C、D各自的心跳计时器所设定的值都为500ms,由于从节点A、B、C所属的掉线计时器的值都比其心跳计时器的值大,因此主节点对这三个从节点采用心跳报文监测机制,而从节点所属的掉线计时器的值比其心跳计时器的值小,则主节点对从节点D采用PDO生产禁止时间机制,从节点D发送PDO报文周期为50ms,同时主节点也需要50ms接收处理从节点D的数据,即主节点对于从节点D的PDO生产禁止时间设定为50ms,通过掉线计时器的值与生产禁止时间的值进行计算,推出生产计数器的值为6,即当一个生产禁止时间内未接收到PDO数据,则PDO生产计数器开始计数,PDO生产计数器累加到6时,则会判定从节点D掉线。
由此,本公开实施例中,结合现有基于节点心跳报文与基于PDO生产禁止时间两种掉线监测机制的特点,提供一套把两种掉线机制融合使用的算法。解决了现有技术中节点掉线监测机制因过于局限导致给网络通信带来负面影响的技术问题,在现有的两种掉线监测机制基础上,提供一种列车网络节点掉线监测设计方案,把基于节点心跳报文与基于PDO生产禁止时间两种掉线监测机制融合使用,针对不同节点不同的监测需求,网络节点根据一套校验算法自行决定对与其相关节点的监测是采用基于节点心跳报文机制还是采用基于PDO生产禁止时间机制,可有效避免单纯使用某一种掉线监测机制无法满足实际需求的问题,同时也从侧面提升了冗余设计的实际效果,提高列车网络安全性。
综上所述,本公开实施例的基于CANopen协议的列车网络节点监测方法,列车网络节点根据预先配置的网络节点列表获取与网络节点相关的各节点对应的掉线计时器设置的掉线时长,以及心跳计时器设置的心跳报文发送周期,将各节点对应的掉线计时器设置的掉线时长以及心跳计时器设置的心跳报文发送周期进行比对,根据比对结果确定各节点的掉线监测方式。由此,实现了节点上电自动为与其相关节点采用合适的节点掉线监测,提高了对节点检测判断结果的准确度,便于提高列车网络的冗余效果,保证整车的良好运行。
为了实现上述实施例,本公开还提出了一种列车网络节点,图9是根据本公开第一个实施例的列车网络主节点的结构示意图,如图9所示,该节点包括:获取模块100、比对模块200和确定模块300。
其中,获取模块100,用于根据预先配置的网络节点列表获取与网络节点相关的各节点对应的掉线计时器设置的掉线时长,以及心跳计时器设置的心跳报文发送周期。
图10是根据本公开第二个实施例的列车网络主节点的结构示意图,如图10所示,在如图9所示的基础上,该节点还包括设置模块400和保存模块500。
其中,设置模块400,用于设置与网络节点相关的各节点对应的掉线计时器的掉线时长。
保存模块500,用于将掉线时长保存在网络节点的对象字典对应的存储空间内。
比对模块200,用于将各节点对应的掉线计时器设置的掉线时长以及心跳计时器设置的心跳报文发送周期进行比对。
确定模块300,用于根据比对结果确定各节点的掉线监测方式。
图11是根据本公开第三个实施例的列车网络主节点的结构示意图,如图11所示,在如图9所示的基础上,确定模块300包括第一启动单元310、第一设置单元320。
其中,第一启动单元310,用于在比较获知与网络节点相关节点的掉线时长大于心跳报文发送周期时,启用心跳报文监测机制对相关节点进行故障掉线判断。
第一设置单元320,用于将相关节点对应的PDO生产计数器设置为0。
图12是根据本公开第四个实施例的列车网络主节点的结构示意图,如图12所示,在如图11所示的基础上,第一启动单元310包括第一监听子单元311、第一判断子单元312、第一切换子单元313和第一接收子单元314。
其中,第一监听子单元311,用于根据预先配置的网络节点列表在主用网络上监听与活动主节点相关的各从节点通过第一CAN通道发送的心跳报文。
第一判断子单元312,用于根据与各从节点对应设置的心跳计时器的计时情况和心跳报文的接收情况,判断各从节点的第一CAN通道是否故障。
第一切换子单元313,用于在判断获知在预设的第一心跳周期内没有接收到第一节点的心跳报文时,获知第一节点的第一CAN通道故障,并切换到备用网络监听第一节点发送的心跳报文,其中,第一节点为任意一个与活动主节点相关的从节点。
第一接收子单元314,用于在预设的第一心跳周期内接收到第一节点通过第二CAN通道发送的心跳报文时,在备用网络上接收第一节点发送的数据,同时,在主用网络上接收其他正常发送心跳报文的从节点发送的数据。
图13是根据本公开第五个实施例的列车网络主节点的结构示意图,如图13所示,在如图9所示的基础上,确定模块300包括第二启用单元330、第二设置单元340。
其中,第二启用单元330,用于在比较获知与网络节点相关节点的掉线时长小于等于心跳报文发送周期时,启用基于PDO报文的生产禁止时间机制对相关节点进行掉线故障判断。
第二设置单元340,用于根据掉线时长和相关节点的PDO报文的生产禁止时间在相关节点对应的PDO生产计数器中设置阈值。
图14是根据本公开第六个实施例的列车网络主节点的结构示意图,如图14所示,在如图9所示的基础上,该节点还包括:配置模块600。
其中,配置模块600,用于在列车网络上新增或减少一个节点时,重新配置与变化节点相关的网络节点列表及其对应掉线计时器,实现启用或停用对变化节点的掉线监测。
图15是根据本公开第七个实施例的列车网络主节点的结构示意图,如图15所示,在如图13所示的基础上,第二启用单元330包括第二监听子单元331、第二判断子单元332、第二切换子单元333和第二接收子单元334。
其中,第二监听子单元331,用于根据预先配置的网络节点列表在主用网络上监听与活动主节点相关的各从节点通过第一CAN通道发送的PDO报文。
第二判断子单元332,用于根据对各从节点发送的PDO报文的接收情况,以及根据PDO报文中的生产禁止时间为各从节点对应设置的心跳计时器的计时情况,判断各从节点的第一CAN通道是否故障。
第二切换子单元333,用于在预设的与第一节点对应的第一心跳周期内没有在主用网络接收到第一节点的PDO报文时,获知第一节点的第一CAN通道故障,并切换到备用网络监听第一节点通过第二CAN通道发送的PDO报文,其中,第一节点为任意一个与活动主节点相关的从节点。
第二接收子单元334,用于若在预设的与第一节点对应的第一心跳周期内在备用网络接收到第一节点通过第二CAN通道发送的PDO报文时,在备用网络上接收第一节点发送的数据,同时,在主用网络上接收其他正常发送PDO报文的从节点发送的数据。
需要说明的是,前述对基于CANopen协议的列车网络节点监测方法的解释说明,也适用于本公开实施例的列车网络节点,本公开列车网络节点实施例中未公布的细节,在此不再赘述。
综上所述,本公开实施例的列车网络节点,列车网络节点根据预先配置的网络节点列表获取与网络节点相关的各节点对应的掉线计时器设置的掉线时长,以及心跳计时器设置的心跳报文发送周期,将各节点对应的掉线计时器设置的掉线时长以及心跳计时器设置的心跳报文发送周期进行比对,根据比对结果确定各节点的掉线监测方式。由此,实现了节点上电自动为与其相关节点采用合适的节点掉线监测,提高了对节点检测判断结果的准确 度,便于提高列车网络的冗余效果,保证整车的良好运行。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本公开的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
尽管上面已经示出和描述了本公开的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本公开的限制,本领域的普通技术人员在本公开的范围内可以对上述实施例进行变化、修改、替换和变型。

Claims (20)

  1. 一种基于CANopen协议的列车网络节点监测方法,其特征在于,包括以下步骤:
    列车网络节点根据预先配置的网络节点列表获取与所述网络节点相关的各节点对应的掉线计时器设置的掉线时长,以及心跳计时器设置的心跳报文发送周期;
    将所述各节点对应的掉线计时器设置的掉线时长以及心跳计时器设置的心跳报文发送周期进行比对,根据比对结果确定所述各节点的掉线监测方式。
  2. 如权利要求1所述的方法,其特征在于,所述根据比对结果确定所述各节点的掉线监测方式,包括:
    比较获知与所述网络节点相关节点的掉线时长大于心跳报文发送周期;
    若比较获知与所述网络节点相关节点的掉线时长大于心跳报文发送周期,则启用心跳报文监测机制对所述相关节点进行掉线故障判断,并将所述相关节点对应的PDO生产计数器设置为0。
  3. 如权利要求2所述的方法,其特征在于,所述启用心跳报文监测机制对所述相关节点进行掉线故障判断,包括:
    根据预先配置的网络节点列表在主用网络上监听与活动主节点相关的各从节点通过第一CAN通道发送的心跳报文;
    根据与所述各从节点对应设置的心跳计时器的计时情况和所述心跳报文的接收情况,判断所述各从节点的第一CAN通道是否故障;
    若判断获知在预设的第一心跳周期内没有接收到第一节点的心跳报文,则获知所述第一节点的第一CAN通道故障,并切换到所述备用网络监听所述第一节点发送的心跳报文,其中,所述第一节点为任意一个与所述活动主节点相关的从节点;
    如果在预设的第一心跳周期内接收到所述第一节点通过第二CAN通道发送的心跳报文,则在所述备用网络上接收所述第一节点发送的数据,同时,在所述主用网络上接收其他正常发送心跳报文的从节点发送的数据。
  4. 如权利要求3所述的方法,其特征在于,在所述判断获知在预设的第一心跳周期内没有接收到第一节点的心跳报文之后,还包括:
    从所述主用网络向所述第一节点发送复位指令;
    在所述主用网络上继续监听所述第一节点发送的心跳报文,检测在预设的第二心跳周期内是否在所述主用网络接收到所述第一节点的心跳报文;
    所述获知所述第一节点的第一CAN通道故障,包括:
    若在预设的第二心跳周期内没有在所述主用网络接收到所述第一节点的心跳报文,则 获知所述第一节点的第一CAN通道故障。
  5. 如权利要求3或4所述的方法,其特征在于,在所述如果接收到所述第一节点通过第二CAN通道发送的心跳报文之后,还包括:
    向运行监控节点发送所述第一节点的第一CAN通道的当前故障消息,并显示给操作员,提示当前故障检修;
    在所述主用网络上继续监听所述第一节点通过第一CAN通道发送的心跳报文,若在预设的第一心跳周期内接收到所述第一节点的心跳报文,则获知所述第一节点的第一CAN通道恢复通信,则切换到所述主用网络上接收所述第一节点发送的数据。
  6. 如权利要求5所述的方法,其特征在于,在所述切换到所述主用网络上接收所述第一节点发送的数据之后,还包括:
    向所述运行监控节点发送所述第一节点的第一CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
  7. 如权利要求3-6任一所述的方法,其特征在于,在所述切换到所述备用网络监听所述第一节点发送的心跳报文之后,还包括:
    如果在预设的第一心跳周期内接收不到所述第一节点通过第二CAN通道发送的心跳报文,则从所述备用网络向所述第一节点发送复位指令;
    在所述备用网络继续监听所述第一节点发送的心跳报文;
    如果在预设的第二心跳周期内接收到所述第一节点通过第二CAN通道发送的心跳报文,则在所述备用网络上接收所述第一节点发送的数据,同时,在所述主用网络上接收其他正常发送心跳报文的从节点发送的数据。
  8. 如权利要求7所述的方法,其特征在于,还包括:
    如果在预设的第二心跳周期内接收不到所述第一节点通过第二CAN通道发送的心跳报文,则向运行监控节点发送所述第一节点的第一CAN通道和第二CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
  9. 如权利要求8所述的方法,其特征在于,还包括:
    在所述主用网络和所述备用网络上继续监听所述第一节点发送的心跳报文,若在预设的第一心跳周期内从所述主用网络接收到所述第一节点的心跳报文,则获知所述第一节点的第一CAN通道恢复通信,则切换到所述主用网络上接收所述第一节点发送的数据,并向所述运行监控节点发送所述第一节点的第二CAN通道的当前故障消息,并显示给操作员,提示当前故障检修;
    在所述备用网络上继续监听所述第一节点通过第二CAN通道发送的心跳报文,若在预设的第一心跳周期内从所述备用网络接收到所述第一节点的心跳报文,则向所述运行监控 节点发送所述第一节点的第一CAN通道和第二CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
  10. 如权利要求8或9所述的方法,其特征在于,还包括:
    在所述主用网络和所述备用网络上继续监听所述第一节点发送的心跳报文,若在预设的第一心跳周期内从所述备用网络接收到所述第一节点的心跳报文,则获知所述第一节点的第二CAN通道恢复通信,则从所述备用网络上接收所述第一节点发送的数据,并向所述运行监控节点发送所述第一节点的第一CAN通道的当前故障消息,并显示给操作员,提示当前故障检修;
    在所述主用网络上继续监听所述第一节点通过第一CAN通道发送的心跳报文,若在预设的第一心跳周期内从所述主用网络接收到所述第一节点的心跳报文,则切换到所述主用网络上接收所述第一节点发送的数据,并向所述运行监控节点发送所述第一节点的第一CAN通道和第二CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
  11. 如权利要求2-10任一所述的方法,其特征在于,所述根据比对结果确定所述各节点的掉线监测方式,还包括:
    若比较获知与所述网络节点相关节点的掉线时长小于等于心跳报文发送周期,则启用基于PDO报文的生产禁止时间机制对所述相关节点进行掉线故障判断,并根据所述掉线时长和所述相关节点的PDO报文的生产禁止时间在所述相关节点对应的PDO生产计数器中设置阈值。
  12. 如权利要求11所述的方法,其特征在于,所述启用基于PDO报文的生产禁止时间机制进行掉线判断包括:
    根据预先配置的网络节点列表在主用网络上监听与活动主节点相关的各从节点通过第一CAN通道发送的PDO报文;
    根据对所述各从节点发送的PDO报文的接收情况,以及根据PDO报文中的生产禁止时间为所述各从节点对应设置的心跳计时器的计时情况,判断所述各从节点的第一CAN通道是否故障;
    若在预设的与第一节点对应的第一心跳周期内没有在所述主用网络接收到所述第一节点的PDO报文,则获知所述第一节点的第一CAN通道故障,并切换到备用网络监听所述第一节点通过第二CAN通道发送的PDO报文,其中,所述第一节点为任意一个与所述活动主节点相关的从节点;
    若在预设的与第一节点对应的第一心跳周期内在所述备用网络接收到所述第一节点通过第二CAN通道发送的PDO报文,则在所述备用网络上接收所述第一节点发送的数据,同时,在所述主用网络上接收其他正常发送PDO报文的从节点发送的数据。
  13. 如权利要求12所述的方法,其特征在于,在所述若在预设的与第一节点对应的第一心跳周期内没有在所述主用网络接收到所述第一节点的PDO报文之后,还包括:
    从所述主用网络向所述第一节点发送复位指令;
    在所述主用网络上继续监听所述第一节点发送的PDO报文,检测在预设的与第一节点对应的第二心跳周期内是否在所述主用网络接收到所述第一节点的PDO报文;
    所述获知所述第一节点的第一CAN通道故障,包括:
    若在预设的与第一节点对应的第二心跳周期内没有在所述主用网络接收到所述第一节点的PDO报文,则获知所述第一节点的第一CAN通道故障。
  14. 如权利要求12或13所述的方法,其特征在于,在所述接收到所述第一节点通过第二CAN通道发送的PDO报文之后,还包括:
    向运行监控节点发送所述第一节点的第一CAN通道的当前故障消息,并显示给操作员,提示当前故障检修;
    在所述主用网络上继续监听所述第一节点通过第一CAN通道发送的PDO报文,若在预设的与第一节点对应的第一心跳周期内接收到所述第一节点的PDO报文,则获知所述第一节点的第一CAN通道恢复通信,则切换到所述主用网络上接收所述第一节点发送的数据。
  15. 如权利要求14所述的方法,其特征在于,在所述切换到所述主用网络上接收所述第一节点发送的数据之后,还包括:
    向所述运行监控节点发送所述第一节点的第一CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
  16. 如权利要求12-15任一所述的方法,其特征在于,在所述切换到备用网络监听所述第一节点通过第二CAN通道发送的PDO报文之后,还包括:
    若在预设的与第一节点对应的第一心跳周期内没有在所述备用网络接收到所述第一节点的PDO报文,则从所述备用网络向所述第一节点发送复位指令,并在所述备用网络继续监听所述第一节点发送的PDO报文;
    若在预设的与第一节点对应的第二心跳周期内在所述备用网络上接收到所述第一节点发送的PDO报文,则在所述备用网络上接收所述第一节点发送的数据,同时,在所述主用网络上接收其他正常发送PDO报文的从节点发送的数据。
  17. 如权利要求16所述的方法,其特征在于,还包括:
    若在预设的与第一节点对应的第二心跳周期内在所述备用网络上没有接收到所述第一节点发送的PDO报文,则向运行监控节点发送所述第一节点的第一CAN通道和第二CAN通道的当前故障消息,并显示给操作员,提示当前故障检修。
  18. 如权利要求17所述的方法,其特征在于,还包括:
    在所述主用网络和所述备用网络上继续监听所述第一节点发送的PDO报文,若在预设的与第一节点对应的第一心跳周期内从所述主用网络接收到所述第一节点的PDO报文,则获知所述第一节点的第一CAN通道恢复通信,则切换到所述主用网络上接收所述第一节点发送的数据,并向所述运行监控节点发送所述第一节点的第二CAN通道的当前故障消息,并显示给操作员,提示当前故障检修;
    在所述备用网络上继续监听所述第一节点发送的PDO报文,若在预设的与第一节点对应的第一心跳周期内从所述备用网络接收到所述第一节点的PDO报文,则向所述运行监控节点发送所述第一节点的第一CAN通道和第二CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
  19. 如权利要求17或18所述的方法,其特征在于,还包括:
    在所述主用网络和所述备用网络上继续监听所述第一节点发送的PDO报文,若在预设的与第一节点对应的第一心跳周期内从所述备用网络接收到所述第一节点的PDO报文,则获知所述第一节点的第二CAN通道恢复通信,则从所述备用网络上接收所述第一节点发送的数据,并向所述运行监控节点发送所述第一节点的第一CAN通道的当前故障消息,并显示给操作员,提示当前故障检修;
    在所述主用网络上继续监听所述第一节点通过第一CAN通道发送的PDO报文,若在预设的与第一节点对应的第一心跳周期内从所述主用网络接收到所述第一节点的PDO报文,则切换到所述主用网络上接收所述第一节点发送的数据,并向所述运行监控节点发送所述第一节点的第一CAN通道和第二CAN通道的历史故障消息并显示给操作员,提示故障隐患检修。
  20. 一种列车网络节点,其特征在于,包括:
    获取模块,用于根据预先配置的网络节点列表获取与所述网络节点相关的各节点对应的掉线计时器设置的掉线时长,以及心跳计时器设置的心跳报文发送周期;
    比对模块,用于将所述各节点对应的掉线计时器设置的掉线时长以及心跳计时器设置的心跳报文发送周期进行比对;
    确定模块,用于根据比对结果确定所述各节点的掉线监测方式。
PCT/CN2018/092047 2017-06-21 2018-06-20 列车网络节点和基于CANopen协议的列车网络节点监测方法 WO2018233642A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
BR112019027654-8A BR112019027654A2 (pt) 2017-06-21 2018-06-20 nó de rede de trem e método de monitoramento de nó de rede de trem com base em canopen
US16/625,526 US11146457B2 (en) 2017-06-21 2018-06-20 Train network node and CANopen-based train network node monitoring method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710478215.8A CN109104351B (zh) 2017-06-21 2017-06-21 列车网络节点和基于CANopen协议的列车网络节点监测方法
CN201710478215.8 2017-06-21

Publications (1)

Publication Number Publication Date
WO2018233642A1 true WO2018233642A1 (zh) 2018-12-27

Family

ID=64737533

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/092047 WO2018233642A1 (zh) 2017-06-21 2018-06-20 列车网络节点和基于CANopen协议的列车网络节点监测方法

Country Status (4)

Country Link
US (1) US11146457B2 (zh)
CN (1) CN109104351B (zh)
BR (1) BR112019027654A2 (zh)
WO (1) WO2018233642A1 (zh)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10764115B1 (en) 2018-01-05 2020-09-01 Open Invention Network Llc EMS handling of faults in virtual network function components
CN110287151B (zh) * 2019-05-20 2023-08-22 平安科技(深圳)有限公司 分布式存储系统、数据写入方法、装置和存储介质
EP3761568B1 (en) * 2019-07-01 2023-05-31 Volvo Car Corporation Method of controlling communication over a local interconnect network bus
US11538287B2 (en) 2019-09-20 2022-12-27 Sonatus, Inc. System, method, and apparatus for managing vehicle data collection
US11228496B2 (en) 2019-09-20 2022-01-18 Sonatus, Inc. System, method, and apparatus to extra vehicle communications control
US20240073093A1 (en) 2019-09-20 2024-02-29 Sonatus, Inc. System, method, and apparatus to execute vehicle communications using a zonal architecture
JP7328907B2 (ja) * 2020-01-31 2023-08-17 株式会社日立製作所 制御システム、制御方法
US11409592B2 (en) * 2020-02-13 2022-08-09 Baker Hughes Oilfield Operations Llc Methods of predicting electronic component failures in an earth-boring tool and related systems and apparatus
US12094259B2 (en) 2020-03-06 2024-09-17 Sonatus, Inc. System, method, and apparatus for managing vehicle automation
CN112731901B (zh) * 2020-11-20 2023-01-13 江西五十铃汽车有限公司 一种基于can总线的集成诊断方法
CN112910981B (zh) * 2021-01-27 2022-07-26 联想(北京)有限公司 一种控制方法及装置
CN114978875A (zh) * 2021-02-23 2022-08-30 广州汽车集团股份有限公司 一种车载节点管理方法、装置及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060253859A1 (en) * 2005-04-21 2006-11-09 Microsoft Corporation Protocol for communication with a user-mode device driver
CN101854300A (zh) * 2010-06-02 2010-10-06 北京工业大学 一种实现CANopen从站的方法
CN102088372A (zh) * 2009-12-03 2011-06-08 大唐移动通信设备有限公司 一种心跳检测方法、系统和设备

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8254301B2 (en) * 2005-11-22 2012-08-28 Telcordia Technologies, Inc. Group-header based method to organize local peer group of vehicles for inter-vehicle communication
AU2006345956C1 (en) * 2006-07-07 2018-06-14 Sure Technologies Pty Limited A redundant data path system
CN101123609B (zh) * 2007-09-10 2010-06-30 北京航空航天大学 资源的级别自适应搜索方法
US8634325B2 (en) * 2007-12-31 2014-01-21 Schneide Electric USA, Inc. Tuning of industrial automation system performance based on device operating characteristics
US20110161538A1 (en) * 2009-12-31 2011-06-30 Schneider Electric USA, Inc. Method and System for Implementing Redundant Network Interface Modules in a Distributed I/O System
DE102011107321A1 (de) * 2011-07-06 2013-01-10 Abb Ag System und Verfahren zur Parametrierung von Feldgeräten eines Automatisierungs- oder Steuerungssystems
US9258262B2 (en) * 2012-04-30 2016-02-09 Racemi, Inc. Mailbox-based communications system for management communications spanning multiple data centers and firewalls
CN103458436B (zh) * 2012-05-31 2016-08-03 中兴通讯股份有限公司 Ac与ap之间链路保活的检测方法及装置
KR101596078B1 (ko) * 2012-06-12 2016-02-26 엘에스산전 주식회사 캔오픈 네트워크의 구성 방법, 캔오픈 네트워크의 슬레이브 장치의 동작 방법 및 캔오픈 네트워크를 이용한 피엘씨 장치 제어 시스템
CN103516462B (zh) * 2012-06-15 2016-08-17 华锐风电科技(集团)股份有限公司 一种非标准Canopen从节点的数据帧发送方法及装置
DE102012022299A1 (de) * 2012-11-14 2014-05-15 Bürkert Werke GmbH BUS-System, Verfahren zum Betrieb eines BUS-Systems und fluidisches System mit einem BUS-System
US9241044B2 (en) * 2013-08-28 2016-01-19 Hola Networks, Ltd. System and method for improving internet communication by using intermediate nodes
EP2882233B1 (en) 2013-10-29 2019-09-04 Huawei Device Co., Ltd. Service agent method, modem, and terminal
CN103840992B (zh) * 2014-02-20 2017-02-15 金龙联合汽车工业(苏州)有限公司 整车总线控制系统的can通信协议
CN104993583B (zh) * 2015-05-19 2017-07-25 航天科工深圳(集团)有限公司 配电自动化设备的通信方法
CN106453539B (zh) * 2016-09-28 2019-04-05 广州市百果园网络科技有限公司 一种处理节点注册通知的方法和系统
CN106452870A (zh) * 2016-10-13 2017-02-22 中车株洲电力机车研究所有限公司 一种CANopen网络主设备冗余控制方法
EP3547606B1 (en) * 2016-12-12 2021-02-17 Huawei Technologies Co., Ltd. Permission management method, related device, and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060253859A1 (en) * 2005-04-21 2006-11-09 Microsoft Corporation Protocol for communication with a user-mode device driver
CN102088372A (zh) * 2009-12-03 2011-06-08 大唐移动通信设备有限公司 一种心跳检测方法、系统和设备
CN101854300A (zh) * 2010-06-02 2010-10-06 北京工业大学 一种实现CANopen从站的方法

Also Published As

Publication number Publication date
US11146457B2 (en) 2021-10-12
CN109104351B (zh) 2020-08-25
BR112019027654A2 (pt) 2020-07-21
CN109104351A (zh) 2018-12-28
US20210144068A1 (en) 2021-05-13

Similar Documents

Publication Publication Date Title
WO2018233642A1 (zh) 列车网络节点和基于CANopen协议的列车网络节点监测方法
CN109104349B (zh) 基于CANopen协议的列车网络数据传输方法、系统及其装置
CN110474943B (zh) 基于mvb与以太网的车辆网冗余系统及网关切换方法
CN109104325B (zh) 基于CANopen协议的列车网络数据传输方法、系统及其装置
CN109104346B (zh) 基于CANopen协议的列车网络数据传输方法、系统及其装置
CN103167543A (zh) 一种基于wia网络的冗余网关
WO2017215268A1 (zh) 路由器控制方法、装置及电源适配器、路由器
EP3624296B1 (en) Battery management system and communication method thereof
CN105790825B (zh) 一种分布式保护中控制器热备份的方法和装置
CN103227725A (zh) 一种防火墙双机备份的方法及装置
CN102932183A (zh) 双上行链路故障处理方法及设备
CN109062184A (zh) 双机应急救援设备、故障切换方法和救援系统
US10055322B2 (en) Interpreting signals received from redundant buses
CN113765743B (zh) 智能网关工作状态监控方法
US11646909B2 (en) Method for data transmission in a redundantly operable communications network and coupling communication device
WO2023185214A1 (zh) 网络切换方法、节点、电子设备和可读存储介质
US8965993B2 (en) Entrusted management method for a plurality of rack systems
US9118540B2 (en) Method for monitoring a plurality of rack systems
JP6762032B2 (ja) 受電装置および制御方法
JP6204397B2 (ja) 通信機、通信システム、通信方法およびプログラム
CN105100296B (zh) 控制器地址配置方法以及装置
KR20150059697A (ko) 소프트웨어 정의 네트워크에서의 네트워크 결함 검출 방법 및 시스템
KR20200101117A (ko) 노드장애를 감지할 수 있는 네트워크 시스템 및 노드장애 감지방법
CN114355823B (zh) 基于网络的矿用防爆组合开关控制系统及其控制方法
CN102882735A (zh) 一种mstp切换方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18820266

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112019027654

Country of ref document: BR

REG Reference to national code

Ref country code: BR

Ref legal event code: B01E

Ref document number: 112019027654

Country of ref document: BR

Free format text: APRESENTE A TRADUCAO SIMPLES DA FOLHA DE ROSTO DA CERTIDAO DE DEPOSITO DA PRIORIDADE CN 201710478215.8; OU DECLARACAO DE QUE OS DADOS DO PEDIDO INTERNACIONAL ESTAO FIELMENTE CONTIDOS NA PRIORIDADE REIVINDICADA, CONTENDO TODOS OS DADOS IDENTIFICADORES DESTA (TITULARES, NUMERO DE REGISTRO, DATA E TITULO), CONFORME O PARAGRAFO UNICO DO ART. 25 DA RESOLUCAO 77/2013. CABE SALIENTAR NAO FOI POSSIVEL INDIVIDUALIZAR OS TITULARES DA CITADA PRIORIDADE, INFORMACAO NECESSARIA PARA O EXAME DA CESSAO DO DOCUMENTO DE PRIORIDADE.

ENP Entry into the national phase

Ref document number: 112019027654

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20191223

122 Ep: pct application non-entry in european phase

Ref document number: 18820266

Country of ref document: EP

Kind code of ref document: A1