CN107612800A - A kind of implementation method and control device of the Y type conversion equipments of connection PROFIBUS redundant networks and Monobus network - Google Patents
A kind of implementation method and control device of the Y type conversion equipments of connection PROFIBUS redundant networks and Monobus network Download PDFInfo
- Publication number
- CN107612800A CN107612800A CN201710826655.8A CN201710826655A CN107612800A CN 107612800 A CN107612800 A CN 107612800A CN 201710826655 A CN201710826655 A CN 201710826655A CN 107612800 A CN107612800 A CN 107612800A
- Authority
- CN
- China
- Prior art keywords
- profibus
- bus
- message
- redundant
- fpga chip
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 75
- 238000000034 method Methods 0.000 title claims abstract description 24
- 238000004891 communication Methods 0.000 claims abstract description 48
- 238000012544 monitoring process Methods 0.000 claims abstract description 40
- 230000007246 mechanism Effects 0.000 claims abstract description 33
- 238000004458 analytical method Methods 0.000 claims description 38
- 238000003745 diagnosis Methods 0.000 claims description 5
- 230000002093 peripheral effect Effects 0.000 claims description 5
- 238000012545 processing Methods 0.000 claims description 5
- 230000009977 dual effect Effects 0.000 claims description 4
- 230000005540 biological transmission Effects 0.000 claims description 3
- 230000000694 effects Effects 0.000 claims description 3
- 230000009191 jumping Effects 0.000 claims description 2
- 230000008878 coupling Effects 0.000 abstract 2
- 238000010168 coupling process Methods 0.000 abstract 2
- 238000005859 coupling reaction Methods 0.000 abstract 2
- 230000005611 electricity Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 7
- 238000013507 mapping Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000008092 positive effect Effects 0.000 description 1
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses the implementation method and control device of a kind of connection PROFIBUS redundant networks and the Y type conversion equipments of Monobus network, step:1. in PROFIBUS networks, Y type conversion equipments are connected to redundancy double character coupling, with Monobus network;2. two sets of respective independent packet parsing modules, timing monitoring module, PROFIBUS slave station status mechanisms, with switching control module built in the fpga chip in Y type conversion equipments;3. after upper electricity, all messages and controlling bus time of the fpga chip parsing in two redundancy PROFIBUS buses;4. the PROFIBUS master station communications on Y types conversion equipment itself the PROFIBUS slave stations and two redundant bus independent as two, receive required parameter;5. the fpga chip in Y type conversion equipments judges whether two redundant bus mistake occur by packet parsing and bus time monitoring, by being connected all the way with Monobus network for wherein normal work.The present invention realizes the interconnection technique problem between PROFIBUS redundancies double character coupling and nonredundancy Monobus network.
Description
Technical Field
The invention belongs to a network connection technology. The method is particularly applied to interconnection of a PROFIBUS redundant double-bus network and a PROFIBUS single-bus network, and is a method for connecting PROFIBUS non-redundant slave stations to the PROFIBUS redundant network.
Background
The PROFIBUS redundant double-bus network and the PROFIBUS single-bus network are communication network structures widely applied at present.
In order to reduce system failure time and ensure normal operation of the whole network, the industrial field bus network increasingly selects a redundant network structure, and when redundant equipment and non-redundant equipment exist in one network at the same time, it is necessary to connect the redundant double-path bus network of the PROFIBUS and the single-path bus network of the PROFIBUS with each other.
The Y-type switching equipment is equipment for interconnecting the redundant double-bus network and the single bus, can ensure that one of the redundant buses which runs without faults is switched to the PROFIBUS single bus in the running process of the system, effective communication data from the PROFIBUS redundant master station is forwarded to slave equipment of the PROFIBUS single-bus network, and communication data of the slave equipment in the single bus network can also be uploaded to the PROFIBUS redundant master station.
At present, various mature schemes for connecting a redundant dual bus and a single bus by using Y-type conversion equipment exist, but some Y-type conversion equipment solves the problem of network interconnection by using a communication data area mapping mode, so that bus communication cannot be transmitted transparently. The development difficulties of the Y-type conversion equipment are the transparent transmission of the PROFIBUS bus, the analysis of the bus message, the analysis of the bus fault and the switching of the redundant bus.
Disclosure of Invention
The invention aims to provide a method for realizing Y-type conversion equipment for connecting a PROFIBUS redundant network and a single bus network and a control device, which solve the technical problems that a non-redundant slave station cannot work in the redundant network, cannot determine which path of a redundant two-path bus is in a fault-free working state, and bus messages are transmitted transparently.
In order to achieve the above object, a method according to the present invention includes: FPGA chip and three sets of peripheral 485 drive circuit independent each other, include the following steps:
the Y-type conversion equipment is connected with a PROFIBUS redundant double-bus network and a PROFIBUS single-bus network, and is used as a slave station to communicate with a PROFIBUS redundant master station on a redundant bus;
implementing two independent message analysis modules, a timing monitoring module, a PROFIBUS slave station state mechanism module and a switching control module in an FPGA chip arranged in the Y-type conversion equipment;
after power-on, the FPGA chip analyzes all messages from the two redundant PROFIBUS buses and monitors bus time, and judges whether the redundant messages are received on the redundant buses or not and whether the bus time on the PROFIBUS buses meets the standard requirements or not;
the Y-type conversion equipment is used as two independent PROFIBUS slave stations to communicate with the PROFIBUS master stations on the two redundant buses, and receives required parameters;
a switching control module in the FPGA chip connects one of the redundant buses which are not in fault and can normally run with a single bus according to the working conditions of the two redundant buses;
in the first step, Y-type conversion equipment is connected with a PROFIBUS redundant double-bus network and a PROFIBUS single-bus network;
the Y-type conversion equipment is used as two independent slave stations and is respectively connected to the two PROFIBUS redundant double buses, the two redundant buses are connected to the FPGA chip through two sets of independent peripheral 485 driving circuits, so that messages sent by the two PROFIBUS redundant master stations can be received by the FPGA chip, and messages returned by the FPGA chip can be sent to the PROFIBUS master stations;
the FPGA chip is also connected with the PROFIBUS single bus through a peripheral 485 drive circuit, when the FPGA chip connects a certain PROFIBUS redundant bus with the PROFIBUS single bus, a message sent by a PROFIBUS master station on the PROFIBUS redundant bus can be transferred to the PROFIBUS single bus through the FPGA chip, and a message replied by a slave station on the PROFIBUS single bus can be transferred to the connected redundant bus;
in step ②, all the functional modules are realized by an FPGA chip arranged in the Y-type conversion equipment;
the message analysis module is responsible for analyzing the bus messages received on the two PROFIBUS redundant buses, analyzing whether the type of the received messages is a standard PROFIBUS message, whether the message length is correct, whether the message checksum is correct and the like, judging whether error messages exist on the buses, and analyzing a target address in the correct messages to judge whether the messages are sent to Y-type conversion equipment serving as slave stations;
the timing monitoring module is responsible for monitoring various bus times including message character interval time and bus silent time and judging whether errors occur on the bus according to a monitoring result;
the PROFIBUS slave station state mechanism module is responsible for processing all state jumps which the built-in Y-type conversion equipment should have on two redundant PROFIBUS buses, receiving messages sent to the Y-type conversion equipment by the PROFIBUS redundant master station, acting according to a communication standard, and simultaneously analyzing setting parameters in parameterized messages from the master station, wherein the setting parameters comprise the maximum value of bus silence time and the maximum value of error message number;
and the switching control module is responsible for judging which one of the two redundant PROFIBUS buses is in a normal working state according to the message analysis and timing monitoring results, and connecting the bus with the PROFIBUS single bus. And if the current connection bus is normal in communication and has no fault, keeping the current connection state and not switching. If a fault is monitored on the current connection bus, the switching control module cuts off the bus, so that the other redundant bus is connected with the PROFIBUS single bus;
in step ③, after the Y-type conversion equipment is powered on, a message analysis module in the FPGA chip analyzes all messages received from the two PROFIBUS redundant buses;
meanwhile, the timing monitoring module monitors various bus times, including message character interval time and bus silent time;
judging whether the received message is correct or not according to the fact that whether the message type is a PROFIBUS standard communication message or not, whether the message length and the message check are correct or not and whether the message character interval meets the PROFIBUS standard or not;
according to the target address information in the message, the message analysis module distinguishes the message sent to the Y-type conversion equipment from all the received bus messages and further analyzes the message.
in the fourth step, a slave station state mechanism in the FPGA chip is responsible for receiving and processing messages sent to the Y-type conversion equipment, wherein the messages comprise PROFIBUS communication diagnosis messages, parameterization messages, configuration messages, data exchange output messages and the like;
in a parameterized message received from a PROFIBUS master station, the FPGA chip obtains various required setting parameters which are used by a switching control module in the FPGA chip as a criterion of bus failure, wherein the parameters comprise the maximum value of bus silence time and the maximum value of the number of allowed error messages;
after receiving the diagnosis message, the parameterization message and the configuration message and passing through the correct initialization process of PROFIBUS communication, the state mechanism of a PROFIBUS slave station in the FPGA chip jumps to a data exchange state, receives output data from a PROFIBUS master station, and uploads the working state and the bus connection condition of the slave station to the PROFIBUS master station through input data;
if the bus message sent to the Y-type conversion equipment is wrong, the state mechanism of the PROFIBUS slave station in the FPGA chip cannot enter a data exchange state.
in step ⑤, the switching control module determines which redundant bus is connected with the single bus according to the working states of the two redundant buses, the criterion that a fault exists in a certain redundant bus comprises the number of error messages received on the bus, the number of the error messages exceeds the maximum value of the number of the allowed error messages, the Y-type conversion equipment is not in a data exchange state as a PROFIBUS slave station, and the time that no message is monitored on the bus exceeds the bus silence time;
the maximum value of the number of the allowed error messages and the maximum value of the bus silence time are obtained in a received parameterized message from a PROFIBUS master station;
if the current connection redundant bus works in a normal state and no fault exists on the bus, the switching control module keeps the current connection state and does not perform any switching;
if the current connection redundant bus has a fault, the switching control module tries to switch, and connects the other redundant bus with the single bus;
if the other redundant bus is detected to have faults, the switching can not be realized;
a Y type conversion equipment controlling means who connects PROFIBUS redundant network and single bus network, the function of Y type conversion equipment all is realized by the FPGA chip, realizes the module of a plurality of functions in the FPGA chip, includes: the system comprises a message analysis module, a timing monitoring module, a PROFIBUS slave station state mechanism module and a switching control module.
The Y-type conversion equipment which needs to analyze the communication conditions of two mutually independent buses is connected to the two redundant buses, wherein the message analysis module, the timing monitoring module and the PROFIBUS slave station state mechanism module are two mutually independent sets;
the two message analysis modules judge whether error messages exist on the two buses or not and transmit the judgment result to the switching control module; according to whether characters from the bus are received or not, the message analysis module transmits the activity condition of the bus to the timing monitoring module;
the two timing monitoring modules judge whether bus time errors exist on the two buses or not and transmit the judgment result to the switching control module;
the two PROFIBUS slave station state mechanism modules are used for realizing communication state jumping of the Y-shaped conversion equipment as a slave station on the two PROFIBUS buses and transmitting the real-time communication state of the Y-shaped conversion equipment to the switching control module;
the Y-type conversion equipment is internally provided with only one switching control module, and the switching control module integrates bus fault information and communication states provided by the message analysis module, the timing monitoring module and the PROFIBUS slave station state mechanism module, and decides whether to switch between two redundant buses or not, so that one normally working bus is connected to a single bus network.
The two PROFIBUS slave station state mechanism modules have the same slave station address and initialization configuration information, namely, the parameterization message and the configuration message which need to be received from the PROFIBUS master station are completely consistent, and the length of input and output data exchanged with the PROFIBUS master station is also completely consistent after the PROFIBUS slave station state mechanism modules enter a data exchange state.
The invention has the following positive and beneficial effects:
the method realizes the analysis of the message on the redundant bus through the FPGA chip, and after the bus is monitored in a timing mode and the communication state of the Y-type conversion equipment is judged, the Y-type conversion equipment can judge which redundant bus works in a fault-free state currently. Therefore, when the currently connected working redundant bus fails, the Y-type conversion equipment can connect the other working redundant bus to the PROFIBUS single bus. The message on the PROFIBUS bus is transparently transmitted between the redundant network and the non-redundant network, so that communication delay caused by non-transparent transmission is avoided, and the use difficulty caused by a data area mapping mode is avoided.
Drawings
Fig. 1 is a network connection diagram of the present invention.
Fig. 2 is a hardware configuration diagram of the present invention.
FIG. 3 is an abstract modular block diagram of the present invention.
Fig. 4 is a schematic diagram of the implementation of the message parsing module in the FPGA chip of the present invention.
FIG. 5 is a schematic diagram of the implementation of the timing monitoring module in the FPGA chip of the present invention.
FIG. 6 is a schematic diagram of the implementation of the slave station status mechanism module of the PROFIBUS in the FPGA chip of the present invention.
FIG. 7 is a schematic diagram of the determination performed by the switching control module in the FPGA chip according to the present invention.
Detailed Description
Referring to fig. 1, in the present invention, a Y-type switching device is connected to a PROFIBUS redundant dual bus network and a PROFIBUS single bus network.
In a PROFIBUS redundant double-bus network, Y-type conversion equipment serving as two independent slave stations with the same communication address are respectively connected to two PROFIBUS buses, and the Y-type conversion equipment is respectively and independently communicated with two redundant master stations through standard PROFIBUS communication; in the PROFIBUS single bus network, the Y-type conversion equipment does not exist as a PROFIBUS communication station, and master-slave communication does not exist between the Y-type conversion equipment and a slave station in the PROFIBUS single bus network; the Y-type switching device is a device that connects two networks so that bus messages can be transparently transmitted between a redundant dual-bus network and a single-bus network.
When the system is used as a standard PROFIBUS slave station, the Y-type conversion equipment receives a diagnosis message, a parameterization message and a configuration message from a PROFIBUS redundant master station, and obtains setting parameters from the PROFIBUS master station from the parameterization message. After the correct PROFIBUS communication initialization process is completed, the Y-type conversion equipment can enter a data exchange state and report the working condition of the Y-type conversion equipment to the PROFIBUS master station.
Through the parameterization message, the Y-type conversion equipment can obtain the setting parameters from the PROFIBUS master station, wherein the setting parameters comprise the maximum value of the bus silence time and the maximum value of the number of the allowed error messages.
Through the output message, the Y-type conversion equipment can switch the currently connected redundant bus according to an output instruction put in the output message by the PROFIBUS master station, and switch the other redundant bus to be connected with the single bus network.
Through inputting the message, the Y-type switching device can notify the PROFIBUS master station of its real-time operating status, including which redundant bus is currently connected to the single bus, the error type appearing on the faulty bus, the switching times, and other information.
The Y-switching device does not switch the messages on the two redundant buses to the single bus network at the same time, and only one bus that can operate normally without failure is connected to the single bus network at a time.
Referring to fig. 2, in the present invention, the hardware of the Y-type conversion device mainly includes an FPGA chip and three sets of independent RS485 driving circuits for connecting the PROFIBUS redundant dual bus and the PROFIBUS single bus.
In the design of the invention, the model of the used FPGA chip is XC7A50T, the model of the RS485 driver chip is ADM2486, and the FPGA chip and the three RS485 driver chips are connected by three groups of mutually independent PROFIBUS _ TXD, PROFIBUS _ RXD and PROFIBUS _ RTS signal lines. The A, B signal line of PROFIBUS bus connection on 9-pin D type plug links to each other through A _ P, A _ N, RTS signal line with RS485 driver chip.
The differential signals of the messages from the two redundant PROFIBUS master stations on the PROFIBUS bus pass through a 9-pin D-type plug, pass through an A1/2_ P signal line, an A1/2_ N signal line and an RTS _1/2 signal line and enter an RS485 driver chip, and after the messages are processed by the RS485 chip, the messages pass through a PROFIBUS _ TXD _1/2 signal line and a PROFIBUS _ RXD _1/2 signal line and enter an FPGA chip and are analyzed by the FPGA chip.
The Y-type conversion equipment transmits messages from the redundant PROFIBUS master station to the PROFIBUS single bus, and the messages are transmitted to the RS485 driver chip through PROFIBUS _ TXD _3, PROFIBUS _ RXD _3 and PROFIBUS _ RTS _3 signal lines and finally transmitted to the PROFIBUS single bus network through A3_ P, A3_ N and RTS _3 signal lines through a 9-pin D-type plug.
The Y-type conversion equipment is used as a slave station to send a response message to the PROFIBUS master station, the response message is transmitted to the RS485 driver chip through PROFIBUS _ TXD _1/2, PROFIBUS _ RXD _1/2 and PROFIBUS _ RTS _1/2 signal lines, and finally the response message is sent to the redundant bus network through A1/2_ P, A1/2_ N and RTS _1/2 signal lines through a 9-pin D-type plug.
Response messages from the slave equipment of the PROFIBUS single-bus network enter the RS485 driver chip through the A3_ P, A3_ N and RTS _3 signal lines, and enter the FPGA chip through the PROFIBUS _ TXD _3, PROFIBUS _ RXD _3 and PROFIBUS _ RTS _3 signal lines. The FPGA chip transmits the messages, the messages are transmitted to the RS485 driver chip through PROFIBUS _ TXD _1/2, PROFIBUS _ RXD _1/2 and PROFIBUS _ RTS _1/2 signal lines, and finally the messages are transmitted to a redundant bus network through A1/2_ P, A1/2_ N and RTS _1/2 signal lines through a 9-pin D-type plug.
Referring to fig. 3, in the present invention, the functions of the Y-type conversion device are all implemented by an FPGA chip, and a plurality of functional modules are implemented in the FPGA chip, including: the system comprises a message analysis module, a timing monitoring module, a PROFIBUS slave station state mechanism module and a switching control module.
Because the Y-type switching device is connected to the two redundant buses, it is necessary to analyze the communication status of the two buses independently, wherein the message analyzing module, the timing monitoring module and the slave station status mechanism module of the PROFIBUS are two sets independent of each other.
The two message analysis modules judge whether error messages exist on the two buses or not and transmit the judgment result to the switching control module. And according to whether the characters from the bus are received or not, the message analysis module transmits the activity condition of the bus to the timing monitoring module.
The two timing monitoring modules judge whether bus time errors exist on the two buses or not and transmit the judgment result to the switching control module.
And the two PROFIBUS slave station state mechanism modules are used for realizing the communication state jump of the Y-shaped conversion equipment as a slave station on the two PROFIBUS buses and transmitting the real-time communication state of the Y-shaped conversion equipment to the switching control module.
The Y-type conversion equipment is internally provided with only one switching control module which integrates bus fault information and communication states provided by the message analysis module, the timing monitoring module and the PROFIBUS slave station state mechanism module, and decides whether to switch between two redundant buses or not, so that one path of normally working bus is connected to the single bus network.
Referring to fig. 4, in the present invention, the message parsing function of the Y-type conversion device is implemented by a message parsing module in the FPGA chip.
In the FPGA chip, two independent message analysis modules are used for analyzing all messages received on two redundant double buses. The PROFIBUS messages on the bus have various formats, and the specific message format is shown in table 1:
wherein,
SD: the starting delimiter is the starting character of the PROFIBUS bus message and is used for distinguishing the types of the received bus messages.
LE: the message length is information on the message length in bytes, and the calculation range of the length thereof includes … ….
LEr: the message length repeat information, the byte should take the same value as LE, as the length redundancy information to judge the message correctness.
DA: the address of the target station, and the communication address of the target station sent by the bus message.
And SA: the source address, the communication address of the source station sending the bus message.
FC: the function code, the attribute information of the message, the priority level marking the message and the basic function information.
DSAP: and the target service access point is used for distinguishing the service for which the bus message is used according to the target service request type of the bus message.
SSAP: the source service access point, the source service request type of the bus message, is also used to distinguish which service the bus message is used for.
DU: and the data unit is a specific data part of the PROFIBUS bus message.
FCS: message checking, and the checksum of the message data, which is used to determine whether the message is correct.
ED: the end delimiter, the last byte of the PROFIBUS bus message, indicates that the message is terminated.
When a PROFIBUS bus message is received, a message analysis module of the FPGA chip is started, and each received message is analyzed. The flow of the module for parsing the message is shown in fig. 4.
Through the SD byte, the message analysis module can determine whether the message is in one of SD1, SD2, SD3, SD4 and SC message structures. Wherein,
the SD1 message is a fixed-length message, the length of the message is fixed to 6 bytes, the message analysis module judges whether the length of the message is correct after receiving the SD1 initial delimiter, and if the complete message is not 6 bytes, the message is considered to be wrong; calculating and judging whether the message FCS is correct or not, and if the FCS is not correct, considering that the message is wrong; and judging whether the last byte ending delimiter is 16H or not, and if the byte value is incorrect, considering that the message is wrong.
The SD2 message is a non-fixed-length message, the message length is not fixed, and the message analysis module continues to receive LE and LEr length information bytes after receiving the SD2 initial delimiter. If the LE and the LEr have different length information, the message is considered to be wrong; after the LE length information is determined to be correct, receiving a complete SD2 message according to the length, and if the actual length of the received message does not accord with the LE length information, considering that the message is wrong; calculating and judging whether the message FCS is correct or not, and if the FCS is not correct, considering that the message is wrong; and judging whether the last byte ending delimiter is 16H or not, and if the byte value is incorrect, considering that the message is wrong.
The SD3 message is a fixed-length message, the DU part of the fixed-length message is usually 8 bytes, the message length is 14 bytes, the message analysis module judges whether the message length is correct after receiving the SD3 initial delimiter, and if the complete message is not 14 bytes, the message is considered to be wrong; calculating and judging whether the message FCS is correct or not, and if the FCS is not correct, considering that the message is wrong; and judging whether the last byte ending delimiter is 16H or not, and if the byte value is incorrect, considering that the message is wrong.
The SD4 message is a fixed-length message, the message length is 3 bytes, the message analysis module judges whether the message length is correct after receiving the SD1 initial delimiter, and if the complete message is not 3 bytes, the message is considered to be wrong.
The SC message is a fixed-length message and only has one byte, and the message analysis module judges whether the message is a single-byte message with the value of E5H when receiving the SC message, or else, the message is wrong.
Through the destination address DA, the message parsing module can distinguish which messages are sent to the Y-type conversion device itself and which messages are sent to other devices in the bus network.
Referring to fig. 5, in the present invention, the bus time monitoring function of the Y-type conversion device is implemented by a timing monitoring module in the FPGA chip.
In an FPGA chip, two independent timing monitoring modules are used for monitoring various times on two redundant buses, and each module comprises two timers, a character interval timer and a bus silent timer.
Starting from the first character of the received message on the redundant bus, the timing monitoring module starts a byte interval timer to monitor each interval between the characters of the message. The timing monitor module resets the character interval timer each time a message character is received from the bus. If, after receiving a complete message character, the Y-conversion device no longer receives a new character within the time specified by the communication standard, the character interval timer times out. According to the specification of the PROFIBUS communication standard, PROFIBUS bus messages are continuous without intervals, and if the message character intervals are monitored to exceed the specification of the communication standard, the message is judged to have errors.
Starting from the last character of the received message on the redundant bus, the timing monitoring module starts a bus silent timer to monitor the silent time on the redundant bus, namely the time when no message appears on the bus. And resetting the bus silence timer by any message appearing on the bus, and if the timer is overtime, judging that the bus has a fault when the silence time on the bus exceeds the maximum allowable value of the bus silence time of the set parameter received by the Y-type conversion equipment serving as a slave station from the parameterized message.
Referring to fig. 6, in the present invention, the communication functions that the Y-type switching device should have as a standard PROFIBUS slave are all realized by the PROFIBUS slave state mechanism module in the FPGA chip.
In the FPGA chip, two independent PROFIBUS slave station state mechanism modules are realized, and the module makes Y-type conversion equipment possible to work as a standard PROFIBUS slave station on a redundant two-way bus. The module realizes a standard PROFIBUS slave station state mechanism, when the FPGA chip receives a message sent to the Y-type conversion equipment from the redundant master station, the PROFIBUS slave station state mechanism module can process the received message and jump to a corresponding communication state, the state jump process conforms to the PROFIBUS communication standard specification, and the specific state jump is shown in figure 6.
The two slave station state mechanism modules of the PROFIBUS have the same slave station address and initialization configuration information, namely, the parameterized messages and the configuration messages which need to be received from the PROFIBUS master station are completely consistent, and the lengths of the input and output data which are exchanged with the PROFIBUS master station are also completely consistent after the data exchange state is entered.
Referring to fig. 7, in the present invention, whether the Y-type switching device switches the currently connected redundant bus or not is determined by the switching control module in the FPGA chip by connecting another redundant bus to the single bus.
In the FPGA chip, a switching control module is realized, and the module is responsible for ensuring that one path of redundant bus which can normally work at present is connected with a single bus network when bus faults are found.
The switching control module considers that the bus can be regarded as a fault and normal communication between devices in the network cannot be maintained, and the following conditions are included: the message analysis module continuously receives a plurality of error messages on a certain bus, and the number of the continuous error messages exceeds the maximum value of the number of the allowed error messages; the timing monitoring module finds out the long-time bus silence, and the silence time exceeds the maximum value of the allowed bus silence time; the Y-type conversion equipment can not maintain normal communication with the master station equipment on the redundant bus as a slave station and quits the data exchange state.
In the operation process, the switching control module switches according to the following rules.
When a fault of a certain redundant bus is found, the switching control module judges whether the bus is connected to the single bus network currently. If the two redundant buses are not connected to the single bus network, keeping the current connection state of the two redundant buses unchanged; if the failing bus is a redundant bus currently connected to the single bus network, an attempt is made to switch to another redundant bus.
Before switching to another redundant bus, the current working state of the other redundant bus is inquired whether a communication fault exists. If the other redundant bus works normally, the switching control module switches the connecting bus to the normally working redundant bus; if the other redundant bus has faults, the switching control module keeps the current connection state unchanged and does not switch between the two redundant buses.
When two redundant buses have faults, the message analysis module and the timing monitoring module continuously work to analyze the bus communication condition, and when any one of the buses is out of the fault state, the switching control module switches the PROFIBUS single bus to be connected with the bus.
Table 1:
Claims (7)
1. A method for realizing Y-type switching equipment for connecting a PROFIBUS redundant network and a single bus network analyzes bus messages and carries out logic judgment through an FPGA chip, and hardware equipment mainly comprises the following steps: the FPGA chip is responsible for PROFIBUS communication protocol, message analysis and logic judgment;
the method comprises the following specific steps:
in a network simultaneously comprising a PROFIBUS redundant double bus and a single bus, Y-type conversion equipment is connected with two redundant buses and a single bus, and the Y-type conversion equipment exists as a slave station on the two redundant buses, so that transparent transmission between a redundant double-bus network and a single-bus network is realized;
secondly, a message analysis module, a timing monitoring module, a PROFIBUS slave station state mechanism module and a switching control module are realized in the FPGA chip;
the message analysis module is responsible for analyzing the bus messages received on the two PROFIBUS redundant double buses, analyzing the types, target addresses and message check of the received messages, distinguishing the communication messages sent to the Y-type conversion equipment from the received messages, and judging whether error messages exist on the buses or not;
the timing monitoring module is responsible for monitoring the bus time and judging whether an error occurs on the bus according to a monitoring result;
the PROFIBUS slave station state mechanism module is responsible for processing all state jumps which the Y-type conversion equipment should have on the two redundant PROFIBUS buses as the PROFIBUS slave station; acquiring a setting parameter required by the Y-type conversion equipment from a parameter message issued by the redundant master station;
the switching control module is responsible for judging which one of the two redundant PROFIBUS buses is in a normal working state according to the message analysis and timing monitoring results, and connecting the bus with the PROFIBUS single bus; if a fault is monitored on the current connection bus, the switching control module cuts off the bus, so that the other redundant bus is connected with the PROFIBUS single bus;
after the Y-type conversion equipment is powered on, the FPGA chip analyzes whether the messages received from the two redundant PROFIBUS buses are correct or not by using the message analysis module and the timing monitoring module, and judges whether the two redundant buses work in a normal state or not;
the FPGA chip analyzes and sends the message to the slave station from all the correct bus messages, processes the message, and analyzes whether the redundant bus receives an error message;
the FPGA chip monitors bus time and is used for judging whether a fault occurs on a redundant bus;
starting a PROFIBUS slave station state mechanism by the FPGA chip, receiving and processing a message sent to the FPGA chip, enabling the Y-type conversion equipment to be used as a slave station to communicate with a PROFIBUS master station, and acquiring required setting parameters from a parameterized message in the PROFIBUS communication initialization process;
and step ⑤, the FPGA starts the switching control module, and one of the current fault-free and normal-running redundant buses is connected with the single bus according to the working conditions of the two redundant buses.
2. the method for implementing a Y-conversion device for connecting a PROFIBUS redundant network to a single bus network according to claim 1, wherein in step ①, the Y-conversion device is connected to a PROFIBUS redundant dual bus network and a PROFIBUS single bus network;
the Y-type conversion equipment is used as two independent slave stations and is respectively connected to the two PROFIBUS redundant double buses, the two redundant buses are connected to the FPGA chip through two sets of independent peripheral 485 driving circuits, so that messages sent by the two PROFIBUS redundant master stations can be received by the FPGA chip, and messages returned by the FPGA chip can be sent to the PROFIBUS master stations;
the FPGA chip is also connected with the PROFIBUS single bus through a peripheral 485 drive circuit, when the FPGA chip connects a certain PROFIBUS redundant bus with the PROFIBUS single bus, messages sent by a PROFIBUS main station on the PROFIBUS redundant bus can be transferred to the PROFIBUS single bus through the FPGA chip, and messages replied by slave stations on the PROFIBUS single bus can also be transferred to the communicated redundant bus.
3. the method for implementing a Y-type switching device for connecting a PROFIBUS redundant network to a single bus network according to claim 1, wherein in step ③, after the Y-type switching device is powered on, a message parsing module inside the FPGA chip parses all messages received from two PROFIBUS redundant buses;
meanwhile, the timing monitoring module monitors message character interval time and bus silence time;
judging whether the received message is correct or not according to the message structure, the message length, whether the message check is correct or not and whether the message character interval accords with the PROFIBUS communication standard or not;
and under the condition that the message is correct, according to the target address information in the message, the message analysis module distinguishes the message sent to the Y-type conversion equipment from all the received bus messages and further analyzes the message.
4. the method for implementing the Y-type switching device connecting the PROFIBUS redundant network and the single bus network according to claim 1, wherein in the step (iv), the PROFIBUS slave station status mechanism in the FPGA chip is responsible for receiving and processing the messages sent to the Y-type switching device, wherein the messages include PROFIBUS communication diagnosis messages, parameterization messages, configuration messages, and data exchange output messages;
in a parameterized message received from a PROFIBUS master station, the FPGA chip obtains various required setting parameters which are used by a switching control module in the FPGA chip as a criterion of bus failure, wherein the parameters comprise the maximum value of bus silence time and the maximum value of the number of allowed error messages;
after receiving the diagnosis message, the parameterization message and the configuration message and passing through the correct initialization process of PROFIBUS communication, the state mechanism of a PROFIBUS slave station in the FPGA chip jumps to a data exchange state, receives output data from a PROFIBUS master station, and uploads the working state and the bus connection condition of the slave station to the PROFIBUS master station through input data;
if the bus message sent to the Y-type conversion equipment is wrong, the state mechanism of the PROFIBUS slave station in the FPGA chip cannot enter a data exchange state.
5. the method for implementing a Y-switch device for connecting a PROFIBUS redundant network to a single bus network as claimed in claim 1, wherein in step ⑤, a switching control module in the FPGA chip connects one of the redundant buses that is currently faultless and can normally operate with the single bus according to the operating conditions of the two redundant buses;
the criterion for judging the fault of a certain redundant bus by the switching control module comprises that the number of error messages exceeding the maximum value of the number of allowed error messages is received on the bus, the PROFIBUS slave station state of the Y-type conversion equipment serving as the slave station is not in a data exchange state, and the time for the timing monitoring module not to monitor any message on the bus exceeds the maximum value of the bus silence time.
6. The apparatus of claim 1, wherein the Y-switching device is implemented by an FPGA chip, and the FPGA chip is a module for implementing multiple functions, and the Y-switching device comprises: the system comprises a message analysis module, a timing monitoring module, a PROFIBUS slave station state mechanism module and a switching control module.
The Y-type conversion equipment which needs to analyze the communication conditions of two mutually independent buses is connected to the two redundant buses, wherein the message analysis module, the timing monitoring module and the PROFIBUS slave station state mechanism module are two mutually independent sets;
the two message analysis modules judge whether error messages exist on the two buses or not and transmit the judgment result to the switching control module; according to whether characters from the bus are received or not, the message analysis module transmits the activity condition of the bus to the timing monitoring module;
the two timing monitoring modules judge whether bus time errors exist on the two buses or not and transmit the judgment result to the switching control module;
the two PROFIBUS slave station state mechanism modules are used for realizing communication state jumping of the Y-shaped conversion equipment as a slave station on the two PROFIBUS buses and transmitting the real-time communication state of the Y-shaped conversion equipment to the switching control module;
the Y-type conversion equipment is internally provided with only one switching control module, and the switching control module integrates bus fault information and communication states provided by the message analysis module, the timing monitoring module and the PROFIBUS slave station state mechanism module, and decides whether to switch between two redundant buses or not, so that one normally working bus is connected to a single bus network.
7. The Y-type switching device control apparatus of claim 1, wherein the two PROFIBUS slave station status mechanism modules have the same slave station address and initialization configuration information, that is, the parameterization message and the configuration message received from the PROFIBUS master station are completely consistent, and the length of the input and output data exchanged with the PROFIBUS master station is also completely consistent after entering the data exchange state.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710826655.8A CN107612800B (en) | 2017-09-14 | 2017-09-14 | Implementation method and control device of Y-type conversion equipment for connecting PROFIBUS redundant double-bus network and PROFIBUS single-bus network |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710826655.8A CN107612800B (en) | 2017-09-14 | 2017-09-14 | Implementation method and control device of Y-type conversion equipment for connecting PROFIBUS redundant double-bus network and PROFIBUS single-bus network |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107612800A true CN107612800A (en) | 2018-01-19 |
| CN107612800B CN107612800B (en) | 2021-05-25 |
Family
ID=61063574
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710826655.8A Active CN107612800B (en) | 2017-09-14 | 2017-09-14 | Implementation method and control device of Y-type conversion equipment for connecting PROFIBUS redundant double-bus network and PROFIBUS single-bus network |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107612800B (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108809784A (en) * | 2018-06-07 | 2018-11-13 | 杭州和利时自动化有限公司 | A kind of bus apparatus interception system and method |
| CN109240075A (en) * | 2018-08-15 | 2019-01-18 | 南宁学院 | A kind of thermal power plant bus redundancy control system |
| CN112904814A (en) * | 2021-01-16 | 2021-06-04 | 京能十堰热电有限公司 | PROFIBUS equipment online communication state monitoring method based on NT6000 platform |
| CN114563962A (en) * | 2021-12-31 | 2022-05-31 | 浙江中控技术股份有限公司 | Foundation field bus redundancy method and device |
| CN114726674A (en) * | 2022-04-06 | 2022-07-08 | 北京鼎实创新科技股份有限公司 | FPGA-based PROFIBUS bus process data extraction method |
| CN115442218A (en) * | 2022-09-05 | 2022-12-06 | 成都夸克光电技术有限公司 | FPGA-based Ethercat annular dual-redundancy link switching method and system |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101296065A (en) * | 2008-06-19 | 2008-10-29 | 浙江中控技术股份有限公司 | Method and system for improving reliability of redundant master station |
| CN101770239A (en) * | 2009-12-29 | 2010-07-07 | 上海自动化仪表股份有限公司 | Intelligent electric actuating mechanism based on Profibus DP superfluous communication technology |
| CN101807076A (en) * | 2010-05-26 | 2010-08-18 | 哈尔滨工业大学 | Duplication redundancy fault-tolerant high-reliability control system having cooperative warm standby function based on PROFIBUS field bus |
| CN101841542A (en) * | 2010-05-07 | 2010-09-22 | 北京鼎实创新科技有限公司 | Method for realizing PROFIBUS master station communication protocol based on FPGA (Field Programmable Gate Array) technology |
| CN102193543A (en) * | 2011-03-25 | 2011-09-21 | 上海磁浮交通发展有限公司 | Control system based on profibus redundant network topological structure and switching method of control system |
| CN102724092A (en) * | 2012-06-25 | 2012-10-10 | 西安热工研究院有限公司 | Profibus-DP communication protocol redundancy master station |
| CN102736617A (en) * | 2012-06-18 | 2012-10-17 | 北京首钢自动化信息技术有限公司 | Method for diagnosing PROFIBUS-DP bus |
| WO2016119956A1 (en) * | 2015-01-26 | 2016-08-04 | Endress+Hauser Process Solutions Ag | Device access by means of a generic communication driver |
| CN106878131A (en) * | 2017-03-24 | 2017-06-20 | 浙江中控技术股份有限公司 | A kind of data transmission method of PROFIBUS couplers and PROFIBUS |
-
2017
- 2017-09-14 CN CN201710826655.8A patent/CN107612800B/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101296065A (en) * | 2008-06-19 | 2008-10-29 | 浙江中控技术股份有限公司 | Method and system for improving reliability of redundant master station |
| CN101770239A (en) * | 2009-12-29 | 2010-07-07 | 上海自动化仪表股份有限公司 | Intelligent electric actuating mechanism based on Profibus DP superfluous communication technology |
| CN101841542A (en) * | 2010-05-07 | 2010-09-22 | 北京鼎实创新科技有限公司 | Method for realizing PROFIBUS master station communication protocol based on FPGA (Field Programmable Gate Array) technology |
| CN101807076A (en) * | 2010-05-26 | 2010-08-18 | 哈尔滨工业大学 | Duplication redundancy fault-tolerant high-reliability control system having cooperative warm standby function based on PROFIBUS field bus |
| CN102193543A (en) * | 2011-03-25 | 2011-09-21 | 上海磁浮交通发展有限公司 | Control system based on profibus redundant network topological structure and switching method of control system |
| CN102736617A (en) * | 2012-06-18 | 2012-10-17 | 北京首钢自动化信息技术有限公司 | Method for diagnosing PROFIBUS-DP bus |
| CN102724092A (en) * | 2012-06-25 | 2012-10-10 | 西安热工研究院有限公司 | Profibus-DP communication protocol redundancy master station |
| WO2016119956A1 (en) * | 2015-01-26 | 2016-08-04 | Endress+Hauser Process Solutions Ag | Device access by means of a generic communication driver |
| CN106878131A (en) * | 2017-03-24 | 2017-06-20 | 浙江中控技术股份有限公司 | A kind of data transmission method of PROFIBUS couplers and PROFIBUS |
Non-Patent Citations (1)
| Title |
|---|
| 深圳市讯记科技有限公司: "PROFIBUS DP总线冗余链路模块操作手册", 《百度文库,HTTPS://WENKU.BAIDU.COM/VIEW/21EDAA1F10A6F524CCBF850A.HTML》 * |
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108809784A (en) * | 2018-06-07 | 2018-11-13 | 杭州和利时自动化有限公司 | A kind of bus apparatus interception system and method |
| CN109240075A (en) * | 2018-08-15 | 2019-01-18 | 南宁学院 | A kind of thermal power plant bus redundancy control system |
| CN112904814A (en) * | 2021-01-16 | 2021-06-04 | 京能十堰热电有限公司 | PROFIBUS equipment online communication state monitoring method based on NT6000 platform |
| CN112904814B (en) * | 2021-01-16 | 2023-11-14 | 京能十堰热电有限公司 | PROFIBUS equipment on-line communication state monitoring method based on NT6000 platform |
| CN114563962A (en) * | 2021-12-31 | 2022-05-31 | 浙江中控技术股份有限公司 | Foundation field bus redundancy method and device |
| WO2023125994A1 (en) * | 2021-12-31 | 2023-07-06 | 浙江中控技术股份有限公司 | Foundation fieldbus redundancy method and apparatus |
| CN114563962B (en) * | 2021-12-31 | 2025-04-18 | 中控技术股份有限公司 | A FOUNDATION fieldbus redundancy method and device |
| CN114726674A (en) * | 2022-04-06 | 2022-07-08 | 北京鼎实创新科技股份有限公司 | FPGA-based PROFIBUS bus process data extraction method |
| CN114726674B (en) * | 2022-04-06 | 2023-12-29 | 北京鼎实创新科技股份有限公司 | PROFIBUS bus process data extraction method based on FPGA |
| CN115442218A (en) * | 2022-09-05 | 2022-12-06 | 成都夸克光电技术有限公司 | FPGA-based Ethercat annular dual-redundancy link switching method and system |
| CN115442218B (en) * | 2022-09-05 | 2024-04-09 | 成都夸克光电技术有限公司 | Ethercat annular dual-redundancy link switching method and system based on FPGA |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107612800B (en) | 2021-05-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107612800B (en) | Implementation method and control device of Y-type conversion equipment for connecting PROFIBUS redundant double-bus network and PROFIBUS single-bus network | |
| US8531942B2 (en) | Communication system having a master/slave structure | |
| JP2510606B2 (en) | Local Area Data Distribution System | |
| CN102857397B (en) | The how main asynchronous duplex differential bus of one and the means of communication | |
| CN101692178B (en) | Apparatus for interconnecting modules | |
| US8812759B2 (en) | Bus subscriber device for connection to a line-redundant data bus, and method for controlling the communication of a bus subscriber with a line-redundant serial data bus | |
| CN101296065B (en) | Method and system for improving reliability of redundancy main station | |
| CN112887152B (en) | Train communication network architecture and method based on Ethernet and rail train | |
| EP2290878A1 (en) | Fault-tolerant ethernet network | |
| CN214384911U (en) | Train network communication device and system | |
| WO2011150717A1 (en) | Implementation method and device for eliminating a communication chip fault | |
| CN205179046U (en) | Unmanned aerial vehicle observes and controls signal distribution ware | |
| CN114422737A (en) | Video data distribution system, method and camera data processing system | |
| US7468949B2 (en) | Method and device for medium-redundant operation of a terminal in a network | |
| CN109245950A (en) | A kind of method and relevant apparatus that link failure position is determining | |
| CN112260916A (en) | Communication circuit, communication network, and communication abnormality processing method | |
| CN204463106U (en) | UM-BUS bus channel fault detection controller | |
| KR100617306B1 (en) | Apparatus and method for controlling redundancy via base interface in ATCA platform | |
| CN217767435U (en) | Profibus bus double-channel redundant communication module | |
| CN104135411A (en) | Device and method of implementing multi-node communication based on RS232 interface | |
| CN114338265B (en) | Program downloading system and method based on TTP/C bus | |
| CN119071104B (en) | Communication networks for semiconductor devices | |
| RU180923U1 (en) | DISCRETE SIGNAL INPUT MODULE | |
| CN116795062B (en) | Ring network control method and control system applied to control system | |
| CN116192555B (en) | Architecture for remote terminals |
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 |