CN107612800B - Implementation method and control device of Y-type conversion equipment for connecting PROFIBUS redundant double-bus network and PROFIBUS single-bus network - Google Patents

Implementation method and control device of Y-type conversion equipment for connecting PROFIBUS redundant double-bus network and PROFIBUS single-bus network Download PDF

Info

Publication number
CN107612800B
CN107612800B CN201710826655.8A CN201710826655A CN107612800B CN 107612800 B CN107612800 B CN 107612800B CN 201710826655 A CN201710826655 A CN 201710826655A CN 107612800 B CN107612800 B CN 107612800B
Authority
CN
China
Prior art keywords
profibus
bus
redundant
message
messages
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
CN201710826655.8A
Other languages
Chinese (zh)
Other versions
CN107612800A (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.)
Beijing D&s Fieldbus Technology Co ltd
Original Assignee
Beijing D&s Fieldbus Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing D&s Fieldbus Technology Co ltd filed Critical Beijing D&s Fieldbus Technology Co ltd
Priority to CN201710826655.8A priority Critical patent/CN107612800B/en
Publication of CN107612800A publication Critical patent/CN107612800A/en
Application granted granted Critical
Publication of CN107612800B publication Critical patent/CN107612800B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method for realizing Y-type conversion equipment for connecting a PROFIBUS redundant double-bus network and a single-bus network and a control device, comprising the following steps: in the PROFIBUS network, Y-type conversion equipment is connected with a redundant double-bus network and a single-bus network; two sets of independent message analysis modules, a timing monitoring module, a PROFIBUS slave station state mechanism module and a switching control module are arranged in an FPGA chip in the Y-type conversion equipment; after the power is on, the FPGA chip analyzes all messages from the two redundant PROFIBUS buses and monitors the bus time; the Y-type conversion equipment is used as two independent PROFIBUS slave stations to communicate with the PROFIBUS redundant master stations on the two redundant buses, and receives required parameters; and fifthly, judging whether the two redundant buses have errors or not by the FPGA chip in the Y-type conversion equipment through message analysis and bus time monitoring, and connecting one path which normally works with the single bus network. The invention realizes the technical problem of connection between the PROFIBUS redundant double-bus network and the non-redundant single-bus network.

Description

Implementation method and control device of Y-type conversion equipment for connecting PROFIBUS redundant double-bus network and PROFIBUS single-bus network
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 double-bus network and a PROFIBUS single-bus network and a control device, which solve the technical problems that a non-redundant slave station cannot work in a redundant network, cannot determine which path of a redundant double-path bus is in a fault-free working state, and bus messages are transmitted transparently and the like.
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 method comprises the following steps: the Y-type conversion equipment is connected with the PROFIBUS redundant double-bus network and the PROFIBUS single-bus network, and is used as a slave station to communicate with the PROFIBUS redundant master station on the redundant bus;
step two: an FPGA chip arranged in the Y-type conversion equipment realizes two mutually independent message analysis modules, a timing monitoring module, a PROFIBUS slave station state mechanism module and a switching control module;
step three: after the power is on, the FPGA chip analyzes all messages from the two redundant PROFIBUS buses and monitors the bus time, and judges whether the redundant messages are received on the redundant buses or not and whether each bus time on the PROFIBUS buses meets the standard requirement or not;
step IV: the Y-type conversion equipment is used as two independent PROFIBUS slave stations to communicate with PROFIBUS redundant master stations on two redundant buses, and receives required parameters;
step five: 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 redundant 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 redundant 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 the second 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 as the PROFIBUS slave station, receiving messages sent to the Y-type conversion equipment by the PROFIBUS redundant master station and acting according to a communication standard, and simultaneously analyzing setting parameters in parameterized messages from the PROFIBUS redundant 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 the third 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 PROFIBUS slave station state mechanism module 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 redundant master station, an 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 the PROFIBUS communication, the PROFIBUS slave station state mechanism module in the FPGA chip jumps to a data exchange state, receives output data from the PROFIBUS redundant 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 the fifth 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 the received parameterized messages from the PROFIBUS redundant 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;
the utility model provides a connect the redundant double bus network of PROFIBUS and the Y type conversion equipment controlling means of 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 parameterized messages and the configuration messages which need to be received from the PROFIBUS redundant master station are completely consistent, and the lengths of input and output data which are exchanged with the PROFIBUS redundant master station are also completely consistent after the data exchange state is entered.
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 the 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 PROFIBUS redundant master stations to carry out 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 the PROFIBUS redundant master station, and obtains setting parameters from the PROFIBUS redundant 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 the working condition of the Y-type conversion equipment is reported to the PROFIBUS redundant master station.
Through the parameterization message, the Y-type conversion equipment can obtain the setting parameters from the PROFIBUS redundant 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 which is put into the output message by the PROFIBUS redundant 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 inform the PROFIBUS redundant master station of the real-time working state of the Y-type switching device, wherein the real-time working state comprises information such as which redundant bus is connected to the single bus currently, the error type appearing on the fault bus, the switching times and the like.
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 signal of the message from the two redundant main stations of the PROFIBUS on the PROFIBUS bus passes through a 9-pin D-type plug, passes through A1/2_ P, A1/2_ N and RTS _1/2 signal lines and enters an RS485 driver chip, and after the message is processed by the RS485 chip, the differential signal enters an FPGA chip through PROFIBUS _ TXD _1/2, PROFIBUS _ RXD _1/2 and PROFIBUS _ RTS _1/2 signal lines and is analyzed by the FPGA chip.
The Y-type conversion equipment transmits messages from the redundant main station of the PROFIBUS 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 redundant 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 forwards 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 the content of the first and second substances,
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 content of the first and second substances,
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 PROFIBUS 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 regulation, 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 redundant master station are completely consistent, and the lengths of the input and output data which are exchanged with the PROFIBUS redundant 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:
SD1 DA SA FC FCS ED
10H xx xx xx xx 16H
SD2 LE LEr SD DA SA FC DSAP SSAP DU FCS ED
68H xx xx 68H xx xx xx xx xx …… xx 16H
SD3 DA SA FC DU FCS ED
A2H xx xx xx …… xx 16H
SD4 DA SA
DCH xx xx
SC
E5H

Claims (2)

1. a method for realizing Y-type conversion equipment for connecting a PROFIBUS redundant double-bus network and a PROFIBUS single-bus network analyzes bus messages and carries out logic judgment through an FPGA chip, and hardware equipment of the Y-type conversion equipment 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 two PROFIBUS redundant buses and a PROFIBUS single bus, Y-type conversion equipment is connected with the two PROFIBUS redundant buses and the PROFIBUS single bus, and the Y-type conversion equipment exists as a slave station on the two PROFIBUS redundant buses, so that transparent transmission between a PROFIBUS redundant double-bus network and the PROFIBUS single-bus network is realized;
the message analysis module is responsible for analyzing the bus messages received on the two PROFIBUS redundant 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 PROFIBUS redundant buses as the PROFIBUS slave station; acquiring a setting parameter required by the Y-type conversion equipment from a parameterized message issued by the PROFIBUS redundant master station;
the switching control module is responsible for judging which one of the two PROFIBUS redundant buses is in a normal working state according to the message analysis and timing monitoring result, and connecting the PROFIBUS redundant bus with the PROFIBUS single bus; if a fault is detected on the currently connected PROFIBUS redundant bus, the switching control module cuts off the PROFIBUS redundant bus, so that the other PROFIBUS 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 PROFIBUS redundant buses are correct or not by using the message analysis module and the timing monitoring module, and judges whether the two PROFIBUS redundant buses work in a normal state or not;
the FPGA chip analyzes and sends self messages serving as slave stations from all correct bus messages, processes the messages and analyzes whether error messages are received on the PROFIBUS redundant bus;
the FPGA chip monitors the bus time and is used for judging whether a fault occurs on the PROFIBUS redundant bus;
starting a PROFIBUS slave station state mechanism module 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 redundant master station, and acquiring required setting parameters from a parameterized message in the PROFIBUS communication initialization process;
the FPGA chip starts a switching control module, and the PROFIBUS redundant bus which is not in fault and can normally run at present is connected with the PROFIBUS single bus according to the working conditions of the two PROFIBUS 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 buses, the two PROFIBUS 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 redundant 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 redundant master 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 connected PROFIBUS redundant bus;
in the third 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 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;
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;
in the fourth step, a PROFIBUS slave station state mechanism module 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 and data exchange output messages;
in a parameterized message received from a PROFIBUS redundant master station, an 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 the PROFIBUS communication, the PROFIBUS slave station state mechanism module in the FPGA chip jumps to a data exchange state, receives output data from the PROFIBUS redundant master station and uploads the working state and the bus connection condition of the slave station to the PROFIBUS redundant master station through input data;
if the bus message sent to the Y-type conversion equipment is wrong, the PROFIBUS slave station state mechanism module in the FPGA chip cannot enter a data exchange state;
in the fifth step, a switching control module in the FPGA chip connects the PROFIBUS redundant bus which is not in fault and can normally run with the PROFIBUS single bus according to the working conditions of the two PROFIBUS redundant buses;
the criterion for judging the fault of a certain PROFIBUS 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 which the timing monitoring module does not monitor any message on the bus exceeds the maximum value of the bus silence time.
2. The Y-type switching device for connecting a PROFIBUS redundant dual-bus network and a PROFIBUS single-bus network, implemented by the implementation method of claim 1, wherein the functions of the Y-type switching device are implemented by an FPGA chip, and multiple 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;
the Y-type conversion equipment which needs to analyze the communication conditions of two PROFIBUS redundant buses which are mutually independent at the same time is connected to the two PROFIBUS 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 PROFIBUS redundant 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 PROFIBUS redundant 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 redundant 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, 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 PROFIBUS redundant buses or not, so that one path of PROFIBUS redundant bus which normally works is connected to the PROFIBUS single-bus network;
the two PROFIBUS slave station state mechanism modules 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 redundant master station are completely consistent, and the lengths of input and output data which are exchanged with the PROFIBUS redundant master station are also completely consistent after the data exchange state is entered.
CN201710826655.8A 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 Active CN107612800B (en)

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 CN107612800A (en) 2018-01-19
CN107612800B true 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)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809784B (en) * 2018-06-07 2021-01-08 杭州和利时自动化有限公司 Bus equipment monitoring system and method
CN109240075A (en) * 2018-08-15 2019-01-18 南宁学院 A kind of thermal power plant bus redundancy control system
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
CN114726674B (en) * 2022-04-06 2023-12-29 北京鼎实创新科技股份有限公司 PROFIBUS bus process data extraction method based on FPGA
CN115442218B (en) * 2022-09-05 2024-04-09 成都夸克光电技术有限公司 Ethercat annular dual-redundancy link switching method and system based on FPGA

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296065A (en) * 2008-06-19 2008-10-29 浙江中控技术股份有限公司 Method and system for improving reliability of redundancy main station

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770239B (en) * 2009-12-29 2013-02-06 上海自动化仪表股份有限公司 Intelligent electric actuating mechanism based on Profibus DP superfluous communication technology
CN101841542B (en) * 2010-05-07 2012-11-07 北京鼎实创新科技有限公司 Method for realizing PROFIBUS master station communication protocol based on FPGA (Field Programmable Gate Array) technology
CN101807076B (en) * 2010-05-26 2011-11-09 哈尔滨工业大学 Duplication redundancy fault-tolerant high-reliability control system having synergistic warm standby function based on PROFIBUS field bus
CN102193543B (en) * 2011-03-25 2013-05-15 上海磁浮交通发展有限公司 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
DE102015101057B4 (en) * 2015-01-26 2017-03-02 Endress + Hauser Process Solutions Ag Device access by means of a generic communication driver
CN106878131B (en) * 2017-03-24 2020-06-05 浙江中控技术股份有限公司 PROFIBUS coupler and data transmission method of PROFIBUS

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296065A (en) * 2008-06-19 2008-10-29 浙江中控技术股份有限公司 Method and system for improving reliability of redundancy main station

Also Published As

Publication number Publication date
CN107612800A (en) 2018-01-19

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
JP2583023B2 (en) Method and apparatus for fault tolerant connection of a computer system to a local area network
CN102857397B (en) The how main asynchronous duplex differential bus of one and the means of communication
CN105743755B (en) A kind of dual-redundant CAN bus communication system
US7917675B2 (en) Method and apparatus for interconnecting modules
EP2290878B1 (en) Fault-tolerant ethernet network
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
CN112887152B (en) Train communication network architecture and method based on Ethernet and rail train
WO2021073221A1 (en) Train control dmi data redundancy control method and system
CN103139060A (en) High-fault-tolerance controller area network (CAN) bus digital gateway based on double digital signal processors (DSPs)
CN103107940B (en) For the redundant gateway system of device level looped network
CN112887176B (en) Computer interlocking subsystem master-slave switching system based on heartbeat message
CN201335955Y (en) CAN bus intelligent electric device based on CANopen protocol
CN110830276A (en) EtherCAT communication system and method based on cold redundancy mechanism
KR20040044169A (en) Information transmitting system and information transmitting method
KR101179431B1 (en) Network Management System based on a EhterCAT And Managing Method thereof
WO2011150717A1 (en) Implementation method and device for eliminating a communication chip fault
CN108289050B (en) Ring network control system and control method for transmitter
CN112462594B (en) 10M1553B bus controller backup method based on star topology
CN217767435U (en) Profibus bus double-channel redundant communication module
CN115695069B (en) Dual-terminal logic annular CAN bus network system
CN216216897U (en) Service link related state indicating device and CPE device
CN214384911U (en) Train network communication device and system
CN108011791A (en) A kind of airborne dual-redundancy CAN communication system configuration
CN114338265B (en) Program downloading system and method based on TTP/C bus

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