CN109412695B - Optical fiber CAN2.0B bus routing system based on star topology structure - Google Patents

Optical fiber CAN2.0B bus routing system based on star topology structure Download PDF

Info

Publication number
CN109412695B
CN109412695B CN201811619868.4A CN201811619868A CN109412695B CN 109412695 B CN109412695 B CN 109412695B CN 201811619868 A CN201811619868 A CN 201811619868A CN 109412695 B CN109412695 B CN 109412695B
Authority
CN
China
Prior art keywords
switch
routing
communication equipment
type
routing table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811619868.4A
Other languages
Chinese (zh)
Other versions
CN109412695A (en
Inventor
李可维
吴浩伟
孔祥伟
张炜龙
李小谦
邓磊
汪文涛
金翔
李锐
蔡凯
欧阳晖
姜波
周樑
金惠峰
邢贺鹏
徐正喜
陈涛
魏华
罗伟
张鹏程
吴钫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
719th Research Institute of CSIC
Original Assignee
719th Research Institute of CSIC
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 719th Research Institute of CSIC filed Critical 719th Research Institute of CSIC
Priority to CN201811619868.4A priority Critical patent/CN109412695B/en
Publication of CN109412695A publication Critical patent/CN109412695A/en
Application granted granted Critical
Publication of CN109412695B publication Critical patent/CN109412695B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/27Arrangements for networking
    • H04B10/272Star-type networks or tree-type networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0005Switch and router aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q2011/0073Provisions for forwarding or routing, e.g. lookup tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q2011/009Topology aspects
    • H04Q2011/0094Star

Abstract

An optical fiber CAN bus routing system based on a star topology structure comprises a CAN bus, wherein a plurality of CAN communication devices and a plurality of CAN bus switches are arranged on the CAN bus; each CAN switch is provided with at least one cascade CAN interface and a plurality of common CAN interfaces; the CAN switches are connected through a cascade CAN interface, and CAN communication equipment is connected to a common CAN interface; the CAN communication equipment sends a data frame to the CAN bus switch, and the CAN bus switch identifies an A-type routing request frame, a B-type routing request frame and a CAN information frame according to the data frame; the CAN switch establishes and maintains a routing table through interaction of the A-type routing request frame and the B-type routing request frame, and the CAN information frame realizes a routing function in a mode of searching the routing table through the CAN switch. The method is simple, the calculation speed is high, the hardware cost is low, the flexibility is good, the routing under the star topology structure CAN be realized in the optical fiber CAN communication, the arbitrary topology connection between CAN switches is supported, and the requirement of complex networking is met.

Description

Optical fiber CAN2.0B bus routing system based on star topology structure
Technical Field
The invention relates to a CAN bus routing system, in particular to an optical fiber CAN2.0B bus routing system based on a star topology structure.
Background
The CAN bus technology was originally used in 1986 by BOSCH, germany for monitoring systems for automobiles. The basis of the method is a non-destructive arbitration mechanism, when messages conflict, the nodes with lower priority can actively transfer the bus control right to the nodes with higher priority, and therefore the bus conflict arbitration time is greatly reduced. The can2.0b protocol standard only defines specifications of a physical layer and a data link layer, and a user needs to define an application layer protocol according to engineering requirements, and currently, common application layer protocols include CANopen, DeviceNET, TTCAN and the like.
At present, a twisted pair cable CAN transceiver conforming to the ISO11898 standard is becoming mainstream, and the vast majority of the CAN networks in the world use twisted pair cables as transmission media. The twisted-pair cable has the characteristics of easy technical realization, low manufacturing cost and certain electromagnetic radiation inhibition capability. However, as the frequency increases, the attenuation of the twisted pair cable increases rapidly, and the anti-electromagnetic interference capability of the twisted pair CAN in a severe industrial field is still not satisfactory. And the optical fiber medium is used for replacing the twisted pair, so that the anti-electromagnetic interference capability of the CAN network CAN be improved, the transmission distance is increased, and the advantages enable the optical fiber CAN bus to be applied to occasions with high reliability requirements or strong electromagnetic interference.
The optical fiber CAN bus adopts ring or star topology, the star topology generally adopts CAN bus hubs to perform photoelectric logic conversion on a physical layer to complete connection, but the method is difficult to realize interconnection among a plurality of CAN bus hubs. The reason for this is that the CAN standard does not have routing capability among multiple subnets, and bus arbitration CAN be accomplished only by means of electrical connection. Therefore, for a large-scale optical fiber CAN bus with star topology, a bus routing system is needed to complete information interaction among a plurality of subnets.
Disclosure of Invention
The invention aims to design a bus routing system, which CAN establish a proper route between any two communication nodes on a star topology CAN bus, so that an optical fiber CAN bus CAN realize large-scale cascade networking.
More specifically, the invention provides an optical fiber CAN bus routing system based on a star topology structure, and the method introduces special information frames such as A-type routing request frames, B-type routing request frames and the like on the basis of CAN2.0B, and establishes a whole network route through interaction among the routing request frames. The format of a CAN2.0B data frame is shown in FIG. 4.
Specifically, the invention provides an optical fiber CAN bus routing system based on a star structure, which is characterized by comprising a CAN bus, wherein the CAN bus is provided with a plurality of CAN communication devices and a plurality of CAN bus switches; each CAN switch is provided with at least one cascade CAN interface and a plurality of common CAN interfaces; the CAN switches are connected through optical fibers of the cascaded CAN interfaces, and the CAN communication equipment is connected to the common CAN interface through the optical fibers; the CAN communication equipment sends a data frame to the CAN bus switch, and the CAN bus switch identifies an A-type routing request frame, a B-type routing request frame and a CAN information frame according to the data frame; the CAN switch marks the received CAN port according to the received A-type routing request frame and records the CAN port in a routing table in the switch; meanwhile, the CAN switch sends a B-type routing request frame through a cascade CAN interface and sends routing information stored by the CAN switch to other CAN switches; the CAN switch establishes and maintains a routing table through interaction of the A-type routing request frame and the B-type routing request frame, and the CAN information frame realizes a routing function in a mode of searching the routing table through the CAN switch.
The CAN switch sends a B-type routing request frame through the cascade CAN interface, the routing information stored by the CAN switch is sent to other CAN switches, and if the routing information is not changed, the B-type routing request frame is not sent.
Further, the format of the 29-bit identifier (labeled as D0 bit-D28 bit) of the data frame arbitration field of the CAN communication system is:
function code segment ID field of source communication equipment identification ID segment of destination communication equipment identifier Pipeline stage Reserved section
D28-D25 D24-D18 D17-D10 D9-D4 D3-D0
The functional code segments from D25 to D28, the identification ID segments from D18 to D24, the identification ID segments from D10 to D17, the serial numbers from D4 to D9, and the functional code segments from D3 to D0 are reserved and not required, and can be flexibly allocated according to needs. The function code segment is used for distinguishing functions of the data frame, such as an A-type route request frame, a B-type route request frame, a common data frame and the like. The equipment identification number is reserved as 0, other numbers CAN be used for equipment identification, and each CAN communication equipment or CAN switch has a unique equipment identification ID in the whole network.
The source communication equipment identification ID section of the A-type routing request frame is filled in the CAN communication equipment identification for sending the frame, the destination communication equipment identification ID section CAN be filled with 0, and no data field exists, namely the length of the data field is 0. The source communication equipment ID section of the B-type routing request frame is filled in the CAN switch identification for sending the frame, the destination communication equipment ID section CAN be filled with 0, the content of the data field is the equipment identification connected to the switch, and the format is as follows:
The 7 th byte Byte 6 Byte 5 Byte 4 Byte 3 Byte 2 Byte 1 Byte 0
Device identification 8 Device identification 7 Device identification 6 Device identification 5 Device identification 4 Device identification 3 Device identification 2 Device identification 1
If one B-type routing request frame of the CAN switch CAN not send out all the identifiers connected to the equipment, the B-type routing request frame is continuously sent, and the serial number is sequentially added with 1 until all the identifiers connected to the equipment of the CAN switch are sent out.
In addition, the invention also provides an optical fiber CAN2.0B bus routing method based on the star topology structure, which comprises two parts of route establishment and maintenance and data frame routing.
The process of establishing and maintaining the route comprises the following steps:
step 1, after all CAN communication equipment is electrified, sending respective A-type routing request frames at regular time;
step 2, the CAN switch receives an A-type routing request frame of the connected CAN communication equipment from the common CAN interface, records the number of the received common CAN interface, and establishes a corresponding relation according to the source communication equipment identification in the A-type routing request frame and the number of the connected CAN interface to form an A-type routing table of the CAN switch; the content of the routing table is the corresponding relation between the common CAN interface number and the CAN communication equipment identification.
Step 3, after the CAN switch establishes a routing table A, sending a type B routing request frame through a cascade interface, and sending CAN communication equipment identifiers connected to the CAN switch to other CAN routing switches;
step 4, if the CAN switch receives the A-type routing request frame of the connected CAN communication equipment, firstly checking whether the routing table is changed with the original routing table, if the routing table is not changed, updating the routing table A, and sending the B-type routing request frame to other switches; if the routing table is changed with the original routing table, updating the routing table A of the local routing table, sending a type B routing request frame through the cascade connection port, and sending the changed equipment identification information to other CAN routing switches;
step 5, after the CAN switch receives the B-type routing request frame from the cascade interface, the CAN switch records the number of the received cascade CAN interface, and establishes a B-type routing table according to the information of the B-type routing request frame, wherein the B-type routing table comprises information of the number of the cascade CAN interface and the CAN equipment identifier communicated with the cascade CAN interface; after receiving a B-type routing request frame, the CAN switch also needs to respectively forward the frame from other cascaded CAN interfaces which do not receive the frame;
the data frame routing process includes the steps of:
step 1, a CAN communication node sends a data frame to a connected CAN switch;
Step 2, the CAN switch receives the data frame from the common CAN interface, and the destination communication equipment identifier of the data frame arbitration domain is searched in the routing table A, if the destination communication equipment identifier is in the routing table A, the destination communication equipment identifier is indicated to be the communication equipment of the same CAN switch, and the data frame is forwarded to the corresponding CAN interface according to the corresponding relation between the CAN interface of the routing table A and the CAN communication equipment identifier; if the destination communication equipment identifier is not in the routing table A, the destination communication equipment identifier is continuously searched in the routing table B, and if the destination communication equipment identifier is found, the data frame is forwarded to other CAN switches from the corresponding cascade CAN interface; if the destination communication equipment identifier is not found in the routing table A and the routing table B, discarding the data frame;
step 3, similar to step 2, the CAN switch receives the data frame from the cascade CAN interface, the destination communication equipment identifier of the arbitration domain of the data frame is searched in the routing table A, and if the destination communication equipment identifier is in the routing table A, the data frame is forwarded to the corresponding CAN interface according to the corresponding relation between the CAN interface of the routing table A and the CAN communication equipment identifier; if the destination communication equipment identifier is not in the routing table A, the destination communication equipment identifier is continuously searched in the routing table B, and if the destination communication equipment identifier is found, the data frame is forwarded to other CAN switches from the corresponding cascade CAN interface; if the destination communication equipment identifier is not found in the routing table A and the routing table B, discarding the data frame;
Compared with the prior art, the invention has the following advantages:
(1) by the routing method, routing under a star topology structure CAN be realized in optical fiber CAN communication without routing capability;
(2) the method is simple, the calculation speed is high, and the hardware cost is low;
(3) the flexibility is good, supports arbitrary topological connection between the CAN switch, satisfies the demand of complicated network deployment.
Drawings
FIG. 1 is a schematic diagram of a single switch star fabric optical fiber CAN2.0B bus.
Fig. 2 is a schematic diagram of a cascade star-structured optical fiber can2.0b bus.
Fig. 3 is a diagram of a CAN switch architecture of the present invention.
Fig. 4 is a schematic diagram of the structure of a can2.0b data frame.
Fig. 5 is a flow chart of a routing algorithm for a fiber can2.0b bus based on a star topology.
Detailed Description
The invention will be further described with reference to the accompanying drawings, which are given by way of illustration only and are not meant to be limiting.
Fig. 1 is a simplified schematic diagram of a typical single switch star fabric optical fiber can2.0b bus. Referring to fig. 2, a schematic diagram of a star-structured optical fiber can2.0b bus formed by cascading a plurality of switches is shown. The invention relates to an optical fiber CAN2.0B routing system based on a star-shaped structure, which comprises a plurality of CAN switches A, B, C, wherein each switch A is provided with 3 CAN communication devices A1, A2 and A3, each switch B is provided with 3 CAN communication devices B1, B2 and B3, and each switch C is provided with 4 CAN communication devices C1, C2, C3 and C4. And each CAN communication device is connected with the CAN switch and the CAN switch are connected through optical fibers. Each CAN switch comprises a processor module, a communication module and a storage module.
More specifically, as shown in fig. 3, each CAN switch of the present invention includes a processor module, a communication module, and a memory module. The processor module can be composed of chips with digital signal processing and control capability such as a Digital Signal Processor (DSP), a single chip microcomputer or a Field Programmable Gate Array (FPGA), wherein a DSP chip TMS28335 of TI company is selected, the operation speed of the chip is as high as 150MHz, and the chip has an optimized calculation module and has sufficient operation capability and control capability. The communication module and the storage module can adopt independent chips or functional units integrated in a controller chip. The processor module of each CAN switch controls the execution of the routing process, the storage module stores the routing table, and the communication module sends and receives CAN data frames.
A typical format of a data frame of the can2.0b bus is shown in fig. 4. Includes an arbitration field of 29 bits and a data field of 0-8 bytes. The 29 bit arbitration domain determines the priority of the data frame, and the data information is stored in 0-8 bytes of the data domain.
Referring to fig. 2, further describing the routing principle of the present invention, in the same star-fiber CAN2.0b network, communication devices a1, a2, A3 periodically send a class a routing request frame to CAN switch a; the communication equipment B1, B2 and B3 regularly send A-type route request frames to the CAN switch B; the communication devices C1, C2, C3, and C4 periodically transmit a class a route request frame to the CAN switch C. When the routing table changes, the CAN switch A, B, C sends a class B routing request frame to each other through the cascaded CAN interfaces. The CAN switch establishes a routing table through two routing request frames of A type and B type, and when receiving the common data frame, the CAN switch forwards the common data frame to a corresponding CAN interface through a lookup routing table. The function code of the type a route request frame is 5, and the function code of the type B route request frame is 6. The ID number of each device identifier is:
Name of the device Device identification ID number Name of the device Device identification ID number
A1 100 A2 101
A3 102 B1 110
B2 111 B3 112
C1 120 C2 121
C3 122 C4 123
CAN switch A 10 CAN switch B 11
CAN switch C 12
(1) Route establishment procedure
The communication equipment A1, A2 and A3 send A-type route request frames to the CAN switch A; the communication equipment B1, B2 and B3 regularly send A-type route request frames to the CAN switch B; the communication devices C1, C2, C3, and C4 periodically transmit a class a route request frame to the CAN switch C. For example, the arbitration field of the CAN communication device a1 for sending the class a route request frame:
function code Source communication equipment identification ID Destination communication equipment identification ID Running water number Retention
5 100 0 0 Arbitrary
The type a route request frame has no data field.
The three CAN switches respectively establish respective A-type routing tables as follows:
Figure BDA0001926614130000061
after the establishment of the A-type routing table is completed, the three CAN switches mutually transmit B-type routing request frames through the cascaded CAN interfaces, and if the CAN switch A transmits the B-type routing request frames through the cascaded CAN interface 4, the arbitration domain is as follows:
Figure BDA0001926614130000062
Figure BDA0001926614130000071
the data fields are:
byte 7 Byte 6 Byte 5 Byte 4 Byte 3 Byte 2 Byte 1 Byte 0
Device identification 8 Device identification 7 Device identification 6 Device identification 5 Device identification 4 Device identification 3 Device identification 2 Device identification 1
0 0 0 0 0 102 101 100
The CAN switch B simultaneously sends a B-type routing request frame of the CAN switch B, establishes or updates a B-type routing table of the CAN switch B after receiving the B-type routing request frame sent by the switch A, C, and forwards the B-type routing request frames of the switches A and C to the switches C and A.
By sending the class B routing request frame, the three CAN switches respectively establish respective class B routing tables as follows:
Figure BDA0001926614130000072
(2) route maintenance procedure
The communication equipment A1, A2 and A3 regularly send A-type route request frames to the CAN switch A; the communication equipment B1, B2 and B3 regularly send A-type routing request frames to the CAN switch B; the communication devices C1, C2, C3, and C4 periodically transmit a class a route request frame to the CAN switch C. The CAN switch maintains the A-type routing table through the A-type routing request frames, and immediately sends the B-type routing request frames to inform other switches of modifying the B-type routing table when the A-type routing table is added, deleted or changed.
For example, the communication device C1 is removed from the switch C and then connected to the CAN interface 5 of the switch a. At this time, the switch C will not receive the type a route request frame periodically transmitted by the communication device C1. After waiting for the communication timeout of the class a route request frame periodically sent by the C1, the switch C removes the C1 related information from the local class a route table, and the following steps are performed:
Figure BDA0001926614130000081
Meanwhile, since C1 is connected to switch a, switch a will receive the type a route request frame periodically sent by C1, and update the type a route table of switch a as follows:
Figure BDA0001926614130000082
then, the switch A, C sends a type B route request frame to the respective switch B due to the change of the type a route table, and the type B route request frame arbitration field of the switch a is:
function code Source communication equipment identification ID Destination communication equipment identification ID Running water number Retention
6 10 0 0 Arbitrary
The data fields are:
byte 7 Byte 6 Byte 5 Byte 4 Byte 3 Byte 2 Byte 1 Byte 0
Device identification 8 Device identification 7 Device identification 6 Device identification 5 Device identification 4 Device identification 3 Device identification 2 Device identification 1
0 0 0 0 120 102 101 100
The arbitration domain of the B-type routing request frame of the switch C is as follows:
function code Source communication equipment identification ID Destination communication equipment identification ID Running water number Retention
6 12 0 0 Arbitrary
The data fields are:
byte 7 Byte 6 Byte 5 Byte 4 Byte 3 Byte 2 Byte 1 Byte 0
Device identification 8 Device identification 7 Device identification 6 Device identification 5 Device identification 4 Device identification 3 Device identification 2 Device identification 1
0 0 0 0 0 102 101 100
After receiving the B-type route request frame from the switch A, C, the switch B updates its B-type information table:
Figure BDA0001926614130000091
And forwarding the class B route request frame of the switch A to the switch C, and forwarding the class B route request frame of the switch C to the switch A at the same time. After receiving the B-type route request frame of the opposite side, the switches A and C update the corresponding B-type route tables as follows:
Figure BDA0001926614130000092
(3) data frame routing procedure
When receiving the common data frame, the CAN switch firstly searches an A-type routing table according to the destination communication equipment identification of the data frame, and if finding that the destination communication equipment is in the A-type routing table, the CAN switch sends the data frame at a corresponding interface according to the routing table; if finding that the target communication equipment is not in the A-type routing table, searching the B-type routing table, and if the target communication equipment is in the B-type routing table, transmitting the data frame at the corresponding cascade interface; if the destination communication device is not in the class A or class B routing table, the frame is discarded.
For example, the arbitration field of the data frame sent by the communication device a1 to the communication device C2 is as follows:
function code Source communication equipment identification ID Destination communication equipment identification ID Running water number Retention
10 100 121 0 Arbitrary
The switch A receives the data frame, searches the destination communication equipment identifier 121 in the local A-type routing table, and further searches in the local B-type routing table after the equipment identifier cannot be searched; after the routing information is found in the class B routing table, forwarding the data frame to the switch B at the cascade interface 4; the switch B receives the data frame, searches the destination communication equipment identifier 121 in the local A-type routing table, and further searches the local B-type routing table after the equipment identifier cannot be searched; after the routing information is found in the class B routing table, forwarding the data frame to the switch C at the cascade interface 5; the switch C receives the data frame, searches the local a-type routing table for the destination communication device identifier 121, and forwards the data frame from the CAN interface 2 to the destination communication device C2 according to the routing table information.
Referring to fig. 5, the optical fiber CAN bus routing algorithm flow based on the star structure of the present invention includes the following steps:
A. route establishment
(1) The CAN switch receives an A-type routing request frame of CAN communication equipment, the A-type routing request frame comprises an identifier of the equipment, and an A-type routing table is established according to a CAN interface number of a received data frame and the identifier of the equipment;
(2) the CAN switch sends a B-type routing request frame of the CAN switch from a cascade port, and the B-type routing request frame contains identification IDs of all devices directly connected with the CAN switch;
(3) the CAN switch receives a B-type routing request frame of other switches from the cascade interface at the same time, the B-type routing request frame contains the identification IDs of the devices of the other switches, and a B-type routing table is established according to the received cascade interface number and the device identification contained in the B-type routing request frame data domain;
(4) after receiving the B-type routing request frame of other switches from the cascade interface, the CAN switch forwards the frame from other cascade interfaces which do not receive the frame;
B. route maintenance
(1) CAN communication equipment regularly sends A-type routing request frame
(2) The CAN switch does not receive the A-type routing request frame of a certain device in the A-type routing table after overtime and deletes the device from the A-type routing table; the CAN switch receives an A-type routing request frame sent by new equipment, and adds the equipment into an A-type routing table;
(3) When the A-type routing table of the local machine is changed, the CAN switch sends a B-type routing request frame to each cascade port;
(4) when the CAN switch receives the B-type routing request frame, updating a local B-type routing table, and forwarding the frame from other cascade interfaces which do not receive the frame;
C. data frame routing
(1) When the CAN switch receives the common data frame, the CAN switch searches an A-type routing table according to the destination communication equipment identifier of the data frame, and if the destination communication equipment is found in the A-type routing table, the CAN switch sends the data frame at a corresponding interface according to the routing table;
(2) if finding that the target communication equipment is not in the A-type routing table, searching the B-type routing table, and if the target communication equipment is in the B-type routing table, forwarding the data frame at the corresponding cascade interface;
(3) if the destination communication device is not in the class A or class B routing table, the frame is discarded.
The present invention is not limited to the above embodiments, and those skilled in the art can implement the present invention in other various embodiments according to the disclosure of the embodiments and the drawings, and therefore, all designs that can be easily changed or modified by using the design structure and thought of the present invention fall within the protection scope of the present invention.

Claims (3)

1. An optical fiber CAN bus routing system based on a star topology structure is characterized by comprising a CAN bus, wherein the CAN bus is provided with a plurality of CAN communication devices and a plurality of CAN bus switches; each CAN switch is provided with at least one cascade CAN interface and a plurality of common CAN interfaces; the CAN switches are connected through optical fibers of the cascaded CAN interfaces, and the CAN communication equipment is connected to the common CAN interface through the optical fibers; the CAN communication equipment sends a data frame to the CAN bus switch, and the CAN bus switch identifies an A-type routing request frame, a B-type routing request frame and a CAN information frame according to the data frame; the CAN switch marks the received CAN port according to the received A-type routing request frame and records the CAN port in a routing table in the switch; meanwhile, the CAN switch sends a B-type routing request frame through a cascade CAN interface and sends routing information stored by the CAN switch to other CAN switches; the CAN switch establishes and maintains a routing table through interaction of the A-type routing request frame and the B-type routing request frame, and the CAN information frame realizes a routing function in a mode of searching the routing table through the CAN switch; the CAN communication equipment fills the CAN communication equipment identification into a source communication equipment identification section of the A-type routing request frame and sends the A-type routing request frame; the CAN bus switch fills the CAN switch equipment identification into a source communication equipment identification section of a B-type routing request frame and sends the B-type routing request frame; if one type B routing request frame of the CAN switch CAN not send out all identifiers of the CAN communication equipment connected to the CAN switch, the type B routing request frame is continuously sent, and the serial number is sequentially added with 1 until all identifiers of the CAN communication equipment connected to the switch are sent; if a CAN communication device is taken down from a first switch and then is connected to a CAN interface of a second switch, at the moment, the first switch CAN not receive a class A routing request frame periodically sent by the CAN communication device; after waiting for the communication timeout of the A-type routing request frame periodically sent by the CAN communication equipment, the first switch removes the relevant information of the CAN communication equipment in the local A-type routing table; the method comprises the steps of setting the format of an identifier of a data frame arbitration domain of a data frame into a function code segment, a source communication equipment identifier ID segment, a destination communication equipment identifier ID segment, a serial number segment and a reserved segment, setting bits D25 to D28 of the identifier of the data frame arbitration domain into the function code segment, setting bits D18 to D24 into the source communication equipment identifier ID segment, setting bits D10 to D17 into the destination communication equipment identifier ID segment, setting bits D4 to D9 into the serial number, setting bits D3 to D0 into the reserved number without requirements, flexibly distributing the reserved number according to requirements, using the function code segment to distinguish the functions of the data frame, namely a type routing request frame, a type B routing request frame and a common data frame, reserving 0 for the equipment identifier ID number, using the rest numbers for equipment identifiers, and enabling each CAN communication equipment or CAN switch to have a unique equipment identifier ID in the whole network.
2. The optical fiber CAN bus routing system based on star topology of claim 1, wherein said CAN switch establishes and maintains routing tables through interaction of class a and class B route request frames, comprising the steps of:
step 1, after all CAN communication equipment is electrified, sending respective data frames including A-type routing request frames at regular time;
step 2, the CAN switch receives and identifies the A-type routing request frame of the connected CAN communication equipment from the common CAN interface, records the number of the received common CAN interface, and establishes a corresponding relation according to the source communication equipment identification ID in the A-type routing request frame and the number of the CAN interface to form an A-type routing table of the CAN switch; the content of the routing table is the corresponding relation between the common CAN interface number and the source communication equipment identification ID;
step 3, after the CAN switch establishes a routing table A, sending the identified B-type routing request frame through a cascade interface, and sending the CAN communication equipment identification ID connected to the local CAN to other CAN routing switches;
step 4, after that, if the CAN switch receives the A-type routing request frame of the connected CAN communication equipment, firstly checking whether the routing table is changed with the original routing table or not, if the routing table is not changed, updating the routing table A, and sending the B-type routing request frame to other switches; if the routing table is changed with the original routing table, updating the routing table A of the local routing table, sending a type B routing request frame through the cascade connection port, and sending the changed CAN equipment identification ID information to other CAN routing switches;
Step 5, after the CAN switch receives the type B routing request frame from the cascade interface, the CAN switch records the number of the received cascade CAN interface, and establishes a type B routing table according to the information of the type B routing request frame, wherein the type B routing table comprises information of the number of the cascade CAN interface and CAN equipment identification ID communicated with the cascade CAN interface; after receiving a class B routing request frame, the CAN switch also needs to forward the frame from other cascaded CAN interfaces which do not receive the frame.
3. The optical fiber CAN bus routing system based on star topology as claimed in claim 2, wherein said data frame routing procedure comprises the steps of:
step 1, CAN communication equipment sends a data frame to a connected CAN switch;
step 2, the CAN switch receives the data frame from the common CAN interface, and the destination communication equipment identification ID of the data frame arbitration domain is searched in the routing table A, if the destination communication equipment identification ID is in the same CAN switch in the routing table A, the data frame is forwarded to the corresponding CAN interface according to the corresponding relation between the CAN interface of the routing table A and the CAN communication equipment identification ID; if the data frame is not in the routing table A, a target communication equipment identification ID is continuously searched in the routing table B, and if the target communication equipment identification ID is found, the data frame is forwarded to other CAN switches from the corresponding cascade CAN interface; if the destination communication equipment identification ID is not found in the routing table A and the routing table B, discarding the data frame;
Step 3, the CAN switch receives a data frame from the cascade CAN interface, the target communication equipment identification ID of the arbitration domain of the data frame is searched in the routing table A, and if the data frame is in the routing table A, the data frame is forwarded to the corresponding CAN interface according to the corresponding relation between the CAN interface of the routing table A and the CAN communication equipment identification ID; if the data frame is not in the routing table A, continuously searching a target communication equipment identification ID in the routing table B, and if the target communication equipment identification ID is found, forwarding the data frame to other CAN switches from the corresponding cascade CAN interface; if the destination communication device ID is not found in the routing table a or B, the data frame is discarded.
CN201811619868.4A 2018-12-28 2018-12-28 Optical fiber CAN2.0B bus routing system based on star topology structure Active CN109412695B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811619868.4A CN109412695B (en) 2018-12-28 2018-12-28 Optical fiber CAN2.0B bus routing system based on star topology structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811619868.4A CN109412695B (en) 2018-12-28 2018-12-28 Optical fiber CAN2.0B bus routing system based on star topology structure

Publications (2)

Publication Number Publication Date
CN109412695A CN109412695A (en) 2019-03-01
CN109412695B true CN109412695B (en) 2022-06-10

Family

ID=65462348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811619868.4A Active CN109412695B (en) 2018-12-28 2018-12-28 Optical fiber CAN2.0B bus routing system based on star topology structure

Country Status (1)

Country Link
CN (1) CN109412695B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110224913A (en) * 2019-07-15 2019-09-10 珠海格力电器股份有限公司 Data transmission method, device, data transmission system and equipment
CN115589272B (en) * 2022-10-13 2024-04-09 中国船舶重工集团公司第七一九研究所 FC-AE-based high-precision pulse synchronization system
CN116800557B (en) * 2023-08-21 2023-12-29 成都炎兴自动化技术有限公司 CAN bus fusion communication system based on CANOpen application protocol

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101022457A (en) * 2007-03-12 2007-08-22 北京交通大学 Radio multi-hopping network audio frequency, data transmission nodal equipment
CN101262355A (en) * 2008-04-18 2008-09-10 北京锐安科技有限公司 A data switch processing board and its corresponding switch processing system
CN101267401A (en) * 2008-04-25 2008-09-17 北京交通大学 A mixed topology control method based on AODV protocol
CN101330405A (en) * 2008-07-02 2008-12-24 北京亿阳信通软件研究院有限公司 Method for discovering network topology and related equipment
JP2014060626A (en) * 2012-09-18 2014-04-03 Oki Electric Ind Co Ltd Optical network and node
CN104184815A (en) * 2014-08-28 2014-12-03 浙江吉利控股集团有限公司 Topology network
CN104734961A (en) * 2013-12-20 2015-06-24 中国航空工业集团公司第六三一研究所 Routing method based on FC switched network
CN105262658A (en) * 2015-10-30 2016-01-20 北京交控科技有限公司 Switching device, field-bus topological structure, and data transmission method
CN105792305A (en) * 2016-02-24 2016-07-20 长春思拓电子科技有限责任公司 Method for designing ultralow-power wireless data transmission network
CN106027397A (en) * 2016-05-16 2016-10-12 中北大学 Network communication method for distributed measuring equipment of star expansion
CN107241249A (en) * 2017-05-19 2017-10-10 闫晓峰 Ether bus switch, ether bus architecture and data communication method
CN107707447A (en) * 2017-09-22 2018-02-16 中科新松有限公司 A kind of slave station system and control method based on EtherCAT

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060059294A1 (en) * 2004-09-16 2006-03-16 Smith Kevin T Expandable bus topology for peripheral devices of straddle vehicles
CN101141210B (en) * 2007-01-15 2010-12-08 中兴通讯股份有限公司 Method of determining the longest member of path time delay in virtual concatenation group
EP2645638A1 (en) * 2012-03-29 2013-10-02 Robert Bosch Gmbh Communication system with chain or ring topology
CN202663432U (en) * 2012-07-13 2013-01-09 安徽安凯汽车股份有限公司 Controller area network (CAN) network router for electric passenger car
CN103078697B (en) * 2012-12-11 2015-09-09 中国船舶重工集团公司第七一九研究所 A kind of distributed clock synchronization method
WO2015023537A2 (en) * 2013-08-16 2015-02-19 Interdigital Patent Holdings, Inc. Methods and apparatus for hash routing in software defined networking
CN104333517A (en) * 2014-09-28 2015-02-04 航天科工深圳(集团)有限公司 Automation equipment communication method based on CAN bus
CN105406982A (en) * 2015-10-20 2016-03-16 北京电子工程总体研究所 CAN bus double redundancy heat backup method
CN106789331B (en) * 2017-01-11 2024-02-20 北京金数信数码科技有限公司 Topology structure generation method and system
CN107508640B (en) * 2017-04-27 2020-04-03 中国人民解放军海军航空工程学院 Double-ring redundant self-healing optical fiber network construction method based on optical fiber channel technology

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101022457A (en) * 2007-03-12 2007-08-22 北京交通大学 Radio multi-hopping network audio frequency, data transmission nodal equipment
CN101262355A (en) * 2008-04-18 2008-09-10 北京锐安科技有限公司 A data switch processing board and its corresponding switch processing system
CN101267401A (en) * 2008-04-25 2008-09-17 北京交通大学 A mixed topology control method based on AODV protocol
CN101330405A (en) * 2008-07-02 2008-12-24 北京亿阳信通软件研究院有限公司 Method for discovering network topology and related equipment
JP2014060626A (en) * 2012-09-18 2014-04-03 Oki Electric Ind Co Ltd Optical network and node
CN104734961A (en) * 2013-12-20 2015-06-24 中国航空工业集团公司第六三一研究所 Routing method based on FC switched network
CN104184815A (en) * 2014-08-28 2014-12-03 浙江吉利控股集团有限公司 Topology network
CN105262658A (en) * 2015-10-30 2016-01-20 北京交控科技有限公司 Switching device, field-bus topological structure, and data transmission method
CN105792305A (en) * 2016-02-24 2016-07-20 长春思拓电子科技有限责任公司 Method for designing ultralow-power wireless data transmission network
CN106027397A (en) * 2016-05-16 2016-10-12 中北大学 Network communication method for distributed measuring equipment of star expansion
CN107241249A (en) * 2017-05-19 2017-10-10 闫晓峰 Ether bus switch, ether bus architecture and data communication method
CN107707447A (en) * 2017-09-22 2018-02-16 中科新松有限公司 A kind of slave station system and control method based on EtherCAT

Also Published As

Publication number Publication date
CN109412695A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
US5684796A (en) Method and apparatus for determining and maintaining agent topology information in a multi-segment network
KR101341272B1 (en) Providing a logical aggregated point-to-point data link incorporating a multi-point link
US6115747A (en) Computer network interface that merges remote data received from other computers with local data before transmitting the merged data to a network
CN109412695B (en) Optical fiber CAN2.0B bus routing system based on star topology structure
CN102957616B (en) In the method and system of ASIC repeating TRILL network message
CN100561970C (en) A kind of method and apparatus of realizing load balancing
US6076117A (en) Packet merging hub system for sequentially merging received data in a network hub into data packets before broadcasting to a plurality of destination computers
US6195349B1 (en) Scalable logical LAN
WO1997036406A1 (en) Method of assigning addresses in nodes of a telecommunication network
US20080279132A1 (en) Wireless Communication Device
US7181534B2 (en) Address resolution protocol to map internet protocol addresses to a node transport identifier
CN110830394B (en) Method for generating routing table based on RapidIO network
CN113196710B (en) Distribution node, automation network and method for transmitting messages
CN111585791B (en) Data synchronization configuration method, system and storage medium
CN109688071B (en) Flexible Ethernet message forwarding method and device
CN106533771B (en) Network equipment and control information transmission method
US6608812B1 (en) Trunk arrangement in a computer network with intra trunk switch connections
CN105681229A (en) Method for extending port serial numbers and switch
CN108462537B (en) Method for realizing one-master multi-slave communication
US5793981A (en) System for communicating data in a network using both a daisy chain link and separate broadcast links
US6061730A (en) Methods and apparatus for communicating data in computer networks with separate packet assembly and packet broadcast channels
CN113810297B (en) Multi-network converged train network system and communication method thereof
CN110891020B (en) Flow table quantity optimization method of SDN in-band control network
Cisco Configuring Source-Route Bridging
Cisco Configuring Source-Route Bridging

Legal Events

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