CN110430110A - A kind of field bus gateway and its method for converting protocol - Google Patents
A kind of field bus gateway and its method for converting protocol Download PDFInfo
- Publication number
- CN110430110A CN110430110A CN201910738733.8A CN201910738733A CN110430110A CN 110430110 A CN110430110 A CN 110430110A CN 201910738733 A CN201910738733 A CN 201910738733A CN 110430110 A CN110430110 A CN 110430110A
- Authority
- CN
- China
- Prior art keywords
- slave station
- application layer
- module
- layer module
- main website
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40052—High-speed IEEE 1394 serial bus
- H04L12/40097—Interconnection with other networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
- H04L69/32—Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
- H04L69/322—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
- H04L69/329—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40221—Profibus
Abstract
This application discloses a kind of field bus gateway and its method for converting protocol, master station application layer module and slave station application layer module including being based respectively on CPU realization, and the main website logical transition module and slave station logical transition module realized based on FPGA, wherein: master station application layer module passes through the first shared buffer and main website logical transition module interaction data, by the second shared buffer and slave station application layer module interaction data, for realizing fieldbus master station application layer communication protocol;Slave station application layer module is by third shared buffer and slave station logical transition module interaction data, for realizing fieldbus slave station application layer communication protocol.The application improves protocol stack performance and optimizes the closed-loop control performance of industrial control system by carrying out reasonable Software Architecture Design and function distribution to dual stack itself in large-scale engineering system under the premise of the maximum transmission rate of realization 12Mbps.
Description
Technical field
This application involves but be not limited to technical field of automation in industry more particularly to a kind of field bus gateway and its agreement
Conversion method.
Background technique
With industrial automation from low speed to high speed, from low precision to high-precision, from centerized fusion to distributed AC servo system
Development, to the closed-loop control performance of field bus system, more stringent requirements are proposed.
Program bus network (PROcess FIeld BUS, PROFIBUS) is total as a kind of internationalization, open scene
Line standard is the fieldbus that can uniquely cover factory automation and process automation application comprehensively, in current industrial circle
Leadership is occupied in field application.Use site bus gateway, the scene that can satisfy the application of industrial control field market change
Upgrade requirement is made, closed-loop control performance is promoted and meets the needs of field bus system dilatation.
But existing field bus gateway is all based on operating system substantially, exploitation debugging will have operation system technology
Certain accumulation, and PROFIBUS is that specific integrated circuit (Application is realized or used to pure software
Specific Integrated Circuit, ASIC) chip realization, either performance shortcoming or cost are too high for the two, and limit
Cause entire control system closed-loop characteristic not high in its Software Architecture Design.
Summary of the invention
This application provides a kind of field bus gateway and its method for converting protocol, can optimize closing for industrial control system
Ring control performance.
In a first aspect, the embodiment of the invention provides a kind of field bus gateways, including it is based respectively on a central processing
The master station application layer module and slave station application layer module that device CPU is realized, and realized based on on-site programmable gate array FPGA
Main website logical transition module and slave station logical transition module, in which:
The master station application layer module is led to by the first shared buffer and the main website logical transition module interaction data
The second shared buffer and the slave station application layer module interaction data are crossed, for realizing fieldbus master station application layer communication protocols
View;
The slave station application layer module is used by third shared buffer and the slave station logical transition module interaction data
In realization fieldbus slave station application layer communication protocol;
The main website logical transition module is connected by bus with external slave station, for realizing fieldbus main website object
Manage layer and data link layer communication agreement;
The slave station logical transition module is connected by bus with external main website, for realizing fieldbus slave station object
Manage layer and data link layer communication agreement.
In a kind of exemplary embodiment, the master station application layer module includes for realizing PROFIBUS-DP bus master
It stands the master station protocol application layer unit of application layer protocol, and the main website for realizing PROFIBUS-DP bus master protocol stack
Protocol stacking unit;
The slave station application layer module includes for realizing the slave station protocol of PROFIBUS-DP bus slave station application layer protocol
Using layer unit, and for realizing the slave station protocol stack cell of PROFIBUS-DP bus slave station protocol stack.
In a kind of exemplary embodiment, the master station application layer module is specifically used for: receiving the slave station application layer mould
Parameter configuration collection information that block issues simultaneously is parsed, by the bus parameter parsed and slave station configuration parameter set pointer fill to
In the slave station information list of first shared buffer;Control the slave station application layer module and the main website logical transition module it
Between cycle data and diagnostic data interaction and aperiodic traffic processing;
The slave station application layer module, is specifically used for: issuing parameter configuration collection information to the master station application layer module, connects
Receive and handle the interrupt signal that the slave station logical transition module is sent, analysis request message, filling response message, processing and institute
State the mailbox task between master station application layer module;
The main website logical transition module, is specifically used for: jumping to PROFIBUS master station protocol stack operating status machine
And maintenance, as PROFIBUS main website serial link transceiver, the protocol data of the master station application layer module is parsed
Unpack and organize packet, according to the slave station information list that parsing result maintenance is shared with the master station application layer module, execute it is described from
The copy of cycle data and diagnostic data between application layer module of standing and the main website logical transition module;
The slave station logical transition module, is specifically used for: the link layer state machines of PROFIBUS slave station are jumped and
Maintenance carries out parsing to the protocol data of the slave station application layer module and tears open as PROFIBUS slave station serial link transceiver
Packet and group packet, execute the request data and reply data between the slave station application layer module and the slave station logical transition module
Copy, request data is filled to third shared buffer, interrupt signal is generated and is simultaneously sent to the slave station application layer module.
In a kind of exemplary embodiment, the slave station application layer module includes that application layer task processor, slave station side are matched
Set parametric solution parser, the second data copy device, the second interrupt handler, the second aperiodic task processor, in which:
Application layer task processor, for carrying out the filling of task message to the master station application layer module, and to described
The response message of master station application layer module is handled;
Slave station side configuration parameter resolver, for by PROFIBUS agreement transmit resulting parameter configuration collection information into
Row parsing and management;
Second data copy device, for controlling the data copy between the master station application layer module;
Second interrupt handler, the request task for receiving to the slave station logical transition module are parsed and are located
Reason;
Second aperiodic task processor, the aperiodic task for receiving to the slave station logical transition module carry out
Processing, and trigger progress aperiodic task between the slave station application layer module and the master station application layer module and interact.
In a kind of exemplary embodiment, the slave station side configuration parameter resolver is passed by parsing PROFIBUS parametrization
Customer parameter region during defeated obtains the parameter configuration collection information.
In a kind of exemplary embodiment, the master station application layer module includes task resolver, main website side configuration parameter
Resolver, the first data copy device, the first interrupt handler, the first aperiodic task processor, in which:
Task resolver, for receiving the task requests message of the slave station application layer module and parsing execution, described
Business request message includes parameter configuration collection information and aperiodic task;
Main website side configuration parameter resolver, for the parameter configuration collection information received to be parsed and managed;
Slave station state supervisor, for fieldbus networks slave station state machine to be scheduled and managed;
First data copy device, for controlling the number between the master station application layer module and the slave station application layer module
According to copy;
First interrupt handler, for completing between the master station application layer module and the main website logical transition module
The copy of process data and diagnostic data;
First aperiodic task processor is handed down to the master station application layer mould for executing the slave station application layer module
The aperiodic task of block, and aperiodic task is handed down to the main website logical transition module.
Second aspect, the embodiment of the invention also provides a kind of method for converting protocol of field bus gateway, comprising:
Gateway slave station flanks the parameter configuration collection information that the fieldbus main website outside receiving is sent, and passes through the second shared buffer
The parameter configuration collection information is passed to gateway main website side by area;
The gateway main website, which flanks, to be received the parameter configuration collection information and parses, and sends response message to the gateway slave station
Side;
The gateway slave station flanks the response message for receiving gateway main website side, into protocol stack data interaction mode;
Data interaction is carried out by the second shared buffer between gateway main website side and gateway slave station side.
In a kind of exemplary embodiment, the parameter configuration collection information is that gateway slave station side passes through parsing
What the customer parameter region in PROFIBUS parametrization transmission process obtained.
In a kind of exemplary embodiment, the method for converting protocol further include:
Gateway slave station side configures the PROFIBUS protocol parameter received by slave station side configuration parameter resolver
Collection information is parsed and is managed.
In a kind of exemplary embodiment, gateway main website side is obtained by parsing the parameter configuration collection information
Configuration data collection required for parameter set required for PROFIBUS protocol parameter and configuration service.
In a kind of exemplary embodiment, gateway main website side is by main website side configuration parameter resolver to receiving
The parameter configuration collection information is parsed and is managed.
Compared with the relevant technologies, the field bus gateway and its method for converting protocol of the application, by dual stack sheet
Body carries out reasonable Software Architecture Design and function distribution, and the maximum transmission rate of 12Mbps is realized in large-scale engineering system
Under the premise of, it improves protocol stack performance and optimizes the closed-loop control performance of industrial control system.
Other features and advantage will illustrate in the following description, also, partly become from specification
It obtains it is clear that being understood and implementing the application.Other advantages of the application can be by specification, claims
And scheme described in attached drawing is achieved and obtained.
Detailed description of the invention
Attached drawing is used to provide the understanding to technical scheme, and constitutes part of specification, with the application's
Embodiment is used to explain the technical solution of the application together, does not constitute the limitation to technical scheme.
Fig. 1 is a kind of structural schematic diagram of illustrative field bus gateway of the embodiment of the present invention;
Fig. 2 is the structural schematic diagram of the illustrative field bus gateway of another kind of the embodiment of the present invention;
Fig. 3 is a kind of process signal of the method for converting protocol of illustrative field bus gateway of the embodiment of the present invention
Figure;
Fig. 4 is the process signal of the method for converting protocol of the illustrative field bus gateway of another kind of the embodiment of the present invention
Figure.
Specific embodiment
This application describes multiple embodiments, but the description is exemplary, rather than restrictive, and for this
It is readily apparent that can have more in the range of embodiments described herein includes for the those of ordinary skill in field
More embodiments and implementation.Although many possible feature combinations are shown in the attached drawings, and in a specific embodiment
It is discussed, but many other combinations of disclosed feature are also possible.Unless the feelings specially limited
Other than condition, any feature or element of any embodiment can be with any other features or element knot in any other embodiment
It closes and uses, or any other feature or the element in any other embodiment can be substituted.
The application includes and contemplates the combination with feature known to persons of ordinary skill in the art and element.The application is
It can also combine with any general characteristics or element through disclosed embodiment, feature and element, be defined by the claims with being formed
Unique scheme of the invention.Any feature or element of any embodiment can also be with features or member from other scheme of the invention
Part combination, to form the unique scheme of the invention that another is defined by the claims.It will thus be appreciated that showing in this application
Out and/or any feature of discussion can be realized individually or in any suitable combination.Therefore, in addition to according to appended right
It is required that and its other than the limitation done of equivalent replacement, embodiment is not limited.Furthermore, it is possible in the guarantor of appended claims
It carry out various modifications and changes in shield range.
In addition, method and/or process may be rendered as spy by specification when describing representative embodiment
Fixed step sequence.However, in the degree of this method or process independent of the particular order of step described herein, this method
Or process should not necessarily be limited by the step of particular order.As one of ordinary skill in the art will appreciate, other steps is suitable
Sequence is also possible.Therefore, the particular order of step described in specification is not necessarily to be construed as limitations on claims.This
Outside, the claim for this method and/or process should not necessarily be limited by the step of executing them in the order written, art technology
Personnel are it can be readily appreciated that these can sequentially change, and still remain in the spirit and scope of the embodiment of the present application.
As shown in Figure 1, the embodiment of the present application provides a kind of field bus gateway, including it is based respectively on a central processing
The master station application layer module and slave station application layer module that device (Central Processing Unit, CPU) is realized, and be based on
Field programmable gate array (Field Programmable Gate Array, FPGA) realize main website logical transition module and
Slave station logical transition module, in which:
The master station application layer module is by the first shared buffer and main website logical transition module interaction data, by the
Two shared buffers and slave station application layer module interaction data, for realizing fieldbus master station application layer communication protocol;
The slave station application layer module is by third shared buffer and slave station logical transition module interaction data, for real
Existing fieldbus slave station application layer communication protocol;
The main website logical transition module is connected by bus with external slave station, for realizing fieldbus main website object
Manage layer and data link layer communication agreement;
The slave station logical transition module is connected by bus with external main website, for realizing fieldbus slave station object
Manage layer and data link layer communication agreement.
In a kind of exemplary embodiment, by two cpu chips (for example, model can be the Cortex of ARM company
M4 chip) carry main body hardware of the FPGA as the field bus gateway of the application, PROFIBUS master station application layer module
It is respectively operated on one of cpu chip with PROFIBUS slave station application layer module;At the data link layer of master and slave protocol stack
Reason and the design of physical layer signal conversion logic all make full use of the resource of FPGA to realize.FPGA realizes the data-link of double agreements
The conversion logic of the processing of road floor and physical layer signal designs, meanwhile, FPGA is equipped with the bus line data transceiver that double agreements need
Part (for example, 4 RS485 chips shown in Fig. 2).Between the main website logical transition module and master station application layer module of FPGA,
Between the slave station logical transition module and slave station application layer module of FPGA, between master station application layer module and slave station application layer module
All pass through shared buffer interaction data.
The application is not assisted using any communication protocol chip and any operating system, relies on existing cpu resource completely
And FPGA resource, reasonable Software Architecture Design has been carried out to dual stack itself and function is distributed, has related to output copy
Operation CPU all controlled by FPGA execute, the premise of the flank speed transmission of 12Mbps is realized in the large-scale engineering system
Under, it improves protocol stack performance and optimizes the closed-loop control performance of industrial control system.
In a kind of exemplary embodiment, as shown in Fig. 2, the master station application layer module include for realizing
The master station protocol of PROFIBUS-DP (Decentralized Periphery, distributed peripheral hardware) bus master application layer protocol is answered
With layer unit, and the master station protocol stack cell for realizing PROFIBUS-DP bus master protocol stack;
The slave station application layer module includes for realizing the slave station protocol of PROFIBUS-DP bus slave station application layer protocol
Using layer unit, and for realizing the slave station protocol stack cell of PROFIBUS-DP bus slave station protocol stack.
In a kind of exemplary embodiment, the master station application layer module is specifically used for: receiving the slave station application layer mould
Parameter configuration collection information that block issues simultaneously is parsed, by the bus parameter parsed and slave station configuration parameter set pointer fill to
In the slave station information list of first shared buffer;Control the slave station application layer module and the main website logical transition module it
Between cycle data and diagnostic data interaction and aperiodic traffic processing;
The slave station application layer module, is specifically used for: issuing parameter configuration collection information to the master station application layer module, connects
Receive and handle the interrupt signal that the slave station logical transition module is sent, analysis request message, filling response message, processing and institute
(mailbox task described herein includes parameter configuration collection information, aperiodic to the mailbox task for stating between master station application layer module
Task dispatching does not include periodic duty);
The main website logical transition module, is specifically used for: jumping to PROFIBUS master station protocol stack operating status machine
And maintenance, as PROFIBUS main website serial link transceiver, the protocol data of the master station application layer module is parsed
Unpack and organize packet, according to the slave station information list that parsing result maintenance is shared with the master station application layer module, execute it is described from
The copy of cycle data and diagnostic data between application layer module of standing and the main website logical transition module;
The slave station logical transition module, is specifically used for: the link layer state machines of PROFIBUS slave station are jumped and
Maintenance carries out parsing to the protocol data of the slave station application layer module and tears open as PROFIBUS slave station serial link transceiver
Packet and group packet, execute the request data and reply data between the slave station application layer module and the slave station logical transition module
Copy, request data is filled to third shared buffer and generates interrupt signal the slave station application layer module is notified to handle
The interrupt signal.
The request data is the data for including in the request message;The reply data is to wrap in the response message
The data contained.The application transmits the bus parameter and slave station parameter configuration of PROFIBUS main website side by the first shared buffer
Data set expands system scale.
In a kind of exemplary embodiment, the slave station information list includes: the inputoutput data of slave station station number, slave station
Pointer in sharing data area, inputoutput data length, the state machine of slave station, whether slave station is in is configured activation shape
State, whether there is or not diagnostic data mark, diagnostic data is in the pointer and length of shared data, parameter configuration data in shared buffer
Pointer and length.
In a kind of exemplary embodiment, the master station application layer module includes task resolver, main website side configuration parameter
Resolver, the first data copy device, the first interrupt handler, the first aperiodic task processor, in which:
Task resolver, for receiving the task requests message of the slave station application layer module and parsing execution, described
Business request message includes parameter configuration collection information and aperiodic task;
Main website side configuration parameter resolver, for the parameter configuration collection information received to be parsed and managed;
Slave station state supervisor, for fieldbus networks slave station state machine to be scheduled and managed;
First data copy device, for controlling the number between the master station application layer module and the slave station application layer module
According to copy;
First interrupt handler, for completing between the master station application layer module and the main website logical transition module
The copy of process data and diagnostic data (process data and diagnostic data got by periodic duty);
First aperiodic task processor is handed down to the master station application layer mould for executing the slave station application layer module
The aperiodic task of block, and aperiodic task is handed down to the main website logical transition module.
In a kind of exemplary embodiment, the slave station application layer module includes that application layer task processor, slave station side are matched
Set parametric solution parser, the second data copy device, the second interrupt handler, the second aperiodic task processor, in which:
Application layer task processor, for carrying out task message to the master station application layer module, (task message includes ginseng
Number config set information and aperiodic task namely mailbox messages) filling, and to the response message of the master station application layer module
It is handled;
Slave station side configuration parameter resolver, for by PROFIBUS agreement transmit resulting parameter configuration collection information into
Row parsing and management;
Second data copy device, for controlling the data copy between the master station application layer module;
Second interrupt handler, request task (the request task packet for being received to the slave station logical transition module
Include periodic duty and aperiodic task) it is parsed and is handled;
Second aperiodic task processor, the aperiodic task for receiving to the slave station logical transition module carry out
Processing, and trigger progress aperiodic task between the slave station application layer module and the master station application layer module and interact.
In a kind of exemplary embodiment, slave station side configuration parameter resolver is transmitted across by parsing PROFIBUS parametrization
Customer parameter region in journey obtains the parameter configuration collection information.
In a kind of exemplary embodiment, counted between the master station application layer module and the slave station application layer module
Before interaction, a kind of following operation is at least executed:
The slave station application layer module detects effective input data mark of the master station application layer module;
The master station application layer module detects the output enabler flags of the slave station application layer module.
In a kind of exemplary embodiment, parameter configuration collection information is handed down to the main website by the slave station application layer module
Before application layer module, following operation is executed:
The slave station application layer module issues reset signal to the master station application layer module, and the reset signal is for examining
Survey the master station application layer module whether normal operation;
Believe when the slave station application layer module receives the master station application layer module for the response of the reset signal
Number when, slave station application layer module starting issues the parameter configuration collection information to the operation of the master station application layer module.
As shown in figure 3, the embodiment of the present application also provides a kind of method for converting protocol of field bus gateway, including it is as follows
Step:
Step 301: gateway slave station flanks the parameter configuration collection information that the fieldbus main website outside receiving is sent, and passes through second
The parameter configuration collection information is passed to gateway main website side by shared buffer;
In a kind of exemplary embodiment, the parameter configuration collection information is that gateway slave station side passes through parsing
What the customer parameter region in PROFIBUS parametrization transmission process obtained.
In a kind of exemplary embodiment, gateway slave station side is by slave station side configuration parameter resolver to receiving
PROFIBUS protocol parameter config set information is parsed and is managed.
In a kind of exemplary embodiment, the parameter configuration collection information is passed into the master in slave station application layer module
Before application layer module of standing, the method for converting protocol further include:
The slave station application layer module issues reset signal to the master station application layer module, and the reset signal is for examining
Survey the master station application layer module whether normal operation;
Believe when the slave station application layer module receives the master station application layer module for the response of the reset signal
Number when, the parameter configuration collection information is passed to the behaviour of the master station application layer module by slave station application layer module starting
Make.
Step 302: gateway main website, which flanks, to be received the parameter configuration collection information and parses, and sends response message to the gateway
Slave station side;
In a kind of exemplary embodiment, gateway main website side is obtained by parsing the parameter configuration collection information
Configuration data collection required for parameter set required for PROFIBUS protocol parameter and configuration service.
In a kind of exemplary embodiment, gateway main website side is by main website side configuration parameter resolver to receiving
The parameter configuration collection information is parsed and is managed.
Step 303: gateway slave station flanks the response message for receiving gateway main website side, into protocol stack data interaction shape
State;
Step 304: data interaction being carried out by the second shared buffer between gateway main website side and gateway slave station side.
It is shared by second between master station application layer module and slave station application layer module in a kind of exemplary embodiment
Before buffer area carries out data interaction, the method for converting protocol further include:
Effective input data mark of slave station application layer module detection master station application layer module;
The output enabler flags of master station application layer module detection slave station application layer module.
As shown in figure 4, according to a kind of operational process of the method for converting protocol of field bus gateway of the embodiment of the present application,
Include:
After system electrification, the hardware of gateway main website side and gateway slave station side, which powers on, completes hardware configuration and software initialization;
What gateway main website side needed to complete is the initialization of the first shared buffer and the second shared buffer, and is arranged the
Main website side in two shared buffers prepares running mark notification gateway slave station side, then gateway slave station side is waited to give gateway main website
The reset signal that side issues executes software after receiving reset signal and the reset of protocol stack operates, has then been periodically detected not
Have and receive the parameter configuration collection information that gateway slave station side passes over, after receiving parameter configuration collection information, gateway main website side is carried out
Parsing obtains bus collection and is transmitted to main website logical transition module by the first shared buffer, and the slave station parameter for obtaining configuration is matched
Collection filling is set into the slave station information list of the first shared buffer, starts the agreement of main website logical transition module after filling
State machine and FDL state machine, the foundation of starting gateway main website side and the lower communication process for hanging slave station, it is effectively defeated to receive slave station
Enter to fill after data effective input data mark of the second shared buffer, this effective input data mark represents gateway main website side
There is effective input data to be transferred to gateway slave station side.
The slave station information list include: slave station station number, slave station inputoutput data sharing data area pointer, it is defeated
Enter output data length, whether state machine, the slave station of slave station, which are in, is configured state of activation, whether there is or not diagnostic data mark,
Pointer and length, parameter configuration data pointer and length in shared buffer of the diagnostic data in shared data.
Gateway slave station side needs to complete the initialization of third shared buffer, and gateway slave station side agreement operating parameter is arranged,
And wait gateway main website side whether be ready to receive configuration data, when detect gateway main website side be ready to receive configuration data
After (i.e. it is effective to prepare running mark for main website side), the protocol stack operation of starting slave station side slave station logical transition module section is waited
Configuration of the upper layer main website to this slave station is received to fill the request task after slave station logical transition module receives request task
Into third shared buffer, and generate interrupt signal and give gateway slave station side, gateway slave station flanks receive the interrupt signal after to this
Request task is parsed, and is judged request task type, and handled according to request task type, is completed filling out for response message
It fills, notice slave station logical transition module obtains response message and executes transmission, finally removes interrupt signal.When the request received
When task is parameter configuration collection information, gateway slave station side sends a reset signal to gateway main website side, confirms gateway main website side
In normal operation, if the reset request of slave station side, the starting of gateway slave station side and gateway main website side have been responded in gateway main website side
Parameter configuration collection information can be transmitted to gateway main website side by task interaction, gateway slave station side, and parsing result is returned to by gateway main website side
Gateway slave station side, if the parsing of parameter configuration collection information is incorrect, configuration parameter mistake is set in gateway slave station side in response message
Mark effectively, notify the main website in higher level's PROFIBUS network, the parameter configuration collection information to the slave station be it is wrong, need weight
New configuration;If the parsing of gateway main website side is correct, gateway slave station side pad parameter config set in response message is correct, in this way from
Logical transition of standing module can be successfully set up with the main website in higher level's PROFIBUS network and communicate, carry out process data transmission and
The interaction of aperiodic task, gateway slave station side start the friendship of cycle data and aperiodic task between starting and gateway main website side
Mutually, in the interaction of cycle data, gateway slave station side needs to detect effective input data mark of gateway main website side, gateway main website
Side needs to detect the output enabler flags of gateway slave station side, only effectively just starting input or the interactive operation of output data,
Actual data copy is executed by slave station logical transition module.
Main website logical transition module is mainly completed to build the first shared buffer and slave station information list, PROFIBUS main website
Protocol stack host state machine, fieldbus data link layer (Fieldbus Data Link Layer, FDL) state machine,
PROFIBUS protocol data group packet unpacks, the copy of process data and diagnostic data, serial transceiver etc..
Slave station logical transition module is mainly completed to build the second shared buffer and third shared buffer, realizes
The data link layer state machine of PROFIBUS slave station protocol is jumped and is safeguarded, PROFIBUS protocol data group packet is unpacked and data are received
Signalling logical transition.
Gateway slave station side to the protocol conversion between gateway main website side use PROFIBUS communication process in parameterize when
Customer parameter region, come the bus parameter and slave station parameter configuration data collection of transport gateway main website side.
It will appreciated by the skilled person that whole or certain steps, system, dress in method disclosed hereinabove
Functional module/unit in setting may be implemented as software, firmware, hardware and its combination appropriate.In hardware embodiment,
Division between the functional module/unit referred in the above description not necessarily corresponds to the division of physical assemblies;For example, one
Physical assemblies can have multiple functions or a function or step and can be executed by several physical assemblies cooperations.Certain groups
Part or all components may be implemented as by processor, such as the software that digital signal processor or microprocessor execute, or by
It is embodied as hardware, or is implemented as integrated circuit, such as specific integrated circuit.Such software can be distributed in computer-readable
On medium, computer-readable medium may include computer storage medium (or non-transitory medium) and communication media (or temporarily
Property medium).As known to a person of ordinary skill in the art, term computer storage medium is included in for storing information (such as
Computer readable instructions, data structure, program module or other data) any method or technique in the volatibility implemented and non-
Volatibility, removable and nonremovable medium.Computer storage medium include but is not limited to RAM, ROM, EEPROM, flash memory or its
His memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storages, magnetic holder, tape, disk storage or other
Magnetic memory apparatus or any other medium that can be used for storing desired information and can be accessed by a computer.This
Outside, known to a person of ordinary skill in the art to be, communication media generally comprises computer readable instructions, data structure, program mould
Other data in the modulated data signal of block or such as carrier wave or other transmission mechanisms etc, and may include any information
Delivery media.
Claims (11)
1. a kind of field bus gateway, which is characterized in that the master station application including being based respectively on the realization of a central processor CPU
Layer module and slave station application layer module, and the main website logical transition module realized based on on-site programmable gate array FPGA and from
Logical transition of standing module, in which:
The master station application layer module is by the first shared buffer and the main website logical transition module interaction data, by the
Two shared buffers and the slave station application layer module interaction data, for realizing fieldbus master station application layer communication protocol;
The slave station application layer module is by third shared buffer and the slave station logical transition module interaction data, for real
Existing fieldbus slave station application layer communication protocol;
The main website logical transition module is connected by bus with external slave station, for realizing fieldbus main website physical layer
And data link layer communication agreement;
The slave station logical transition module is connected by bus with external main website, for realizing fieldbus slave station physical layer
And data link layer communication agreement.
2. field bus gateway according to claim 1, which is characterized in that
The master station application layer module includes for realizing the master station protocol application of PROFIBUS-DP bus master application layer protocol
Layer unit, and the master station protocol stack cell for realizing PROFIBUS-DP bus master protocol stack;
The slave station application layer module includes for realizing the slave station protocol application of PROFIBUS-DP bus slave station application layer protocol
Layer unit, and the slave station protocol stack cell for realizing PROFIBUS-DP bus slave station protocol stack.
3. field bus gateway according to claim 1, which is characterized in that
The master station application layer module, is specifically used for: receiving parameter configuration collection information that the slave station application layer module issues simultaneously
It is parsed, the bus parameter parsed and slave station configuration parameter set pointer is filled to the slave station information of the first shared buffer
In list;Control cycle data between the slave station application layer module and the main website logical transition module and diagnostic data
Interactive and aperiodic traffic processing;
The slave station application layer module, is specifically used for: issuing parameter configuration collection information to the master station application layer module, receives simultaneously
Handle the interrupt signal that the slave station logical transition module is sent, analysis request message, filling response message, processing and the master
Mailbox task between application layer module of standing;
The main website logical transition module, is specifically used for: PROFIBUS master station protocol stack operating status machine is jumped and tieed up
Shield carries out parsing to the protocol data of the master station application layer module and unpacks as PROFIBUS main website serial link transceiver
And group packet executes the slave station and answers according to the slave station information list that parsing result maintenance is shared with the master station application layer module
With the copy of cycle data and diagnostic data between layer module and the main website logical transition module;
The slave station logical transition module, is specifically used for: the link layer state machines of PROFIBUS slave station jumped and safeguarded,
As PROFIBUS slave station serial link transceiver, parsing is carried out to the protocol data of the slave station application layer module and is unpacked and group
Packet, executes copying for the request data and reply data between the slave station application layer module and the slave station logical transition module
Shellfish fills request data to third shared buffer, generates interrupt signal and is sent to the slave station application layer module.
4. field bus gateway according to claim 1, which is characterized in that the slave station application layer module includes application layer
Task processor, slave station side configuration parameter resolver, the second data copy device, the second interrupt handler, the second aperiodic task
Processor, in which:
Application layer task processor, for carrying out the filling of task message to the master station application layer module, and to the main website
The response message of application layer module is handled;
Slave station side configuration parameter resolver, for being solved to by the resulting parameter configuration collection information of PROFIBUS agreement transmission
Analysis and management;
Second data copy device, for controlling the data copy between the master station application layer module;
Second interrupt handler, the request task for receiving to the slave station logical transition module are parsed and are handled;
Second aperiodic task processor, at the aperiodic task for being received to the slave station logical transition module
Reason, and trigger progress aperiodic task between the slave station application layer module and the master station application layer module and interact.
5. field bus gateway according to claim 4, which is characterized in that
The slave station side configuration parameter resolver parameterizes the customer parameter region in transmission process by parsing PROFIBUS and obtains
To the parameter configuration collection information.
6. field bus gateway according to claim 1, which is characterized in that the master station application layer module includes task solution
Parser, main website side configuration parameter resolver, the first data copy device, the first interrupt handler, the first aperiodic task processor,
Wherein:
Task resolver, for receiving the task requests message of the slave station application layer module and parsing execution, the task is asked
Seeking message includes parameter configuration collection information and aperiodic task;
Main website side configuration parameter resolver, for the parameter configuration collection information received to be parsed and managed;
Slave station state supervisor, for fieldbus networks slave station state machine to be scheduled and managed;
First data copy device is copied for controlling the data between the master station application layer module and the slave station application layer module
Shellfish;
First interrupt handler, for completing the process between the master station application layer module and the main website logical transition module
The copy of data and diagnostic data;
First aperiodic task processor is handed down to the master station application layer module for executing the slave station application layer module
Aperiodic task, and aperiodic task is handed down to the main website logical transition module.
7. a kind of method for converting protocol of field bus gateway characterized by comprising
Gateway slave station flanks the parameter configuration collection information that the fieldbus main website outside receiving is sent, will by the second shared buffer
The parameter configuration collection information passes to gateway main website side;
The gateway main website, which flanks, to be received the parameter configuration collection information and parses, and sends response message to gateway slave station side;
The gateway slave station flanks the response message for receiving gateway main website side, into protocol stack data interaction mode;
Data interaction is carried out by the second shared buffer between gateway main website side and gateway slave station side.
8. method for converting protocol according to claim 7, which is characterized in that
The parameter configuration collection information is that gateway slave station side passes through the user in parsing PROFIBUS parametrization transmission process
What parameter region obtained.
9. method for converting protocol according to claim 7, which is characterized in that the method for converting protocol further include:
The PROFIBUS protocol parameter config set received is believed by slave station side configuration parameter resolver gateway slave station side
Breath is parsed and is managed.
10. method for converting protocol according to claim 7, which is characterized in that the method for converting protocol further include:
Gateway main website side obtains ginseng required for PROFIBUS protocol parameterization by parsing the parameter configuration collection information
Configuration data collection required for manifold and configuration service.
11. method for converting protocol according to claim 7, which is characterized in that
Gateway main website side solves the parameter configuration collection information received by main website side configuration parameter resolver
Analysis and management.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910738733.8A CN110430110B (en) | 2019-08-12 | 2019-08-12 | On-site bus gateway and protocol conversion method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910738733.8A CN110430110B (en) | 2019-08-12 | 2019-08-12 | On-site bus gateway and protocol conversion method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110430110A true CN110430110A (en) | 2019-11-08 |
CN110430110B CN110430110B (en) | 2021-12-07 |
Family
ID=68415416
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910738733.8A Active CN110430110B (en) | 2019-08-12 | 2019-08-12 | On-site bus gateway and protocol conversion method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110430110B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113726570A (en) * | 2021-08-30 | 2021-11-30 | 北京广利核系统工程有限公司 | Network port configuration method, device and system |
CN114095303A (en) * | 2021-11-23 | 2022-02-25 | 杭州和利时自动化有限公司 | Communication device, data transmission method and electronic device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030004952A1 (en) * | 1999-10-18 | 2003-01-02 | Mark Nixon | Accessing and updating a configuration database from distributed physical locations within a process control system |
WO2007075105A1 (en) * | 2005-12-28 | 2007-07-05 | Siemens Aktiengesellschaft | Automation network, automation device and electronic component, particularly a field device for an automation network, and a method for the transmission of operating data of an automation device between an automation system and a remote computer |
CN101976074A (en) * | 2010-11-03 | 2011-02-16 | 浙江工业大学 | Industrial control system based on field bus and control network |
CN102736617A (en) * | 2012-06-18 | 2012-10-17 | 北京首钢自动化信息技术有限公司 | Method for diagnosing PROFIBUS-DP bus |
CN102789210A (en) * | 2011-05-16 | 2012-11-21 | 上海华建电力设备股份有限公司 | Configurable industrial bus interface supporting protocol |
US20190052539A1 (en) * | 2018-06-28 | 2019-02-14 | Intel Corporation | Programmable tester for master-slave device networks |
CN109347884A (en) * | 2018-12-05 | 2019-02-15 | 北京和利时系统工程有限公司 | A kind of real-time ethernet is to the conversion method and device of fieldbus, storage medium |
CN109901469A (en) * | 2019-03-12 | 2019-06-18 | 北京鼎实创新科技股份有限公司 | A method of PROFIBUS-PA bus communication is realized based on FPGA technology |
-
2019
- 2019-08-12 CN CN201910738733.8A patent/CN110430110B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030004952A1 (en) * | 1999-10-18 | 2003-01-02 | Mark Nixon | Accessing and updating a configuration database from distributed physical locations within a process control system |
WO2007075105A1 (en) * | 2005-12-28 | 2007-07-05 | Siemens Aktiengesellschaft | Automation network, automation device and electronic component, particularly a field device for an automation network, and a method for the transmission of operating data of an automation device between an automation system and a remote computer |
CN101976074A (en) * | 2010-11-03 | 2011-02-16 | 浙江工业大学 | Industrial control system based on field bus and control network |
CN102789210A (en) * | 2011-05-16 | 2012-11-21 | 上海华建电力设备股份有限公司 | Configurable industrial bus interface supporting protocol |
CN102736617A (en) * | 2012-06-18 | 2012-10-17 | 北京首钢自动化信息技术有限公司 | Method for diagnosing PROFIBUS-DP bus |
US20190052539A1 (en) * | 2018-06-28 | 2019-02-14 | Intel Corporation | Programmable tester for master-slave device networks |
CN109347884A (en) * | 2018-12-05 | 2019-02-15 | 北京和利时系统工程有限公司 | A kind of real-time ethernet is to the conversion method and device of fieldbus, storage medium |
CN109901469A (en) * | 2019-03-12 | 2019-06-18 | 北京鼎实创新科技股份有限公司 | A method of PROFIBUS-PA bus communication is realized based on FPGA technology |
Non-Patent Citations (2)
Title |
---|
李丽娜等: ""基于ARM与FPGA的PROFIBUS-DP智能主站设计与实现"", 《中国仪器仪表》 * |
蔡远斌: ""基于FPGA的PROFIBUS-DP从站研究与实现"", 《中国优秀硕士学位论文全文数据库——信息科技辑》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113726570A (en) * | 2021-08-30 | 2021-11-30 | 北京广利核系统工程有限公司 | Network port configuration method, device and system |
CN114095303A (en) * | 2021-11-23 | 2022-02-25 | 杭州和利时自动化有限公司 | Communication device, data transmission method and electronic device |
CN114095303B (en) * | 2021-11-23 | 2023-08-22 | 杭州和利时自动化有限公司 | Communication device, data transmission method and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN110430110B (en) | 2021-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102985889B (en) | Method, system, and apparatus for communicating using multiple controllers | |
CN104702474B (en) | A kind of EtherCAT master station devices based on FPGA | |
CN105656592B (en) | EtherCAT communication systems main website and communication means | |
CN103227806B (en) | For the method and apparatus for the agreement for reconfiguring application program | |
EP1675312A1 (en) | Multi-protocol field device emulator | |
CN105306326B (en) | Driver integrates the implementation method of a variety of industrial bus | |
CN104980525B (en) | A kind of universality mobile computing system based on state middleware | |
CN106302074A (en) | A kind of moving method virtualizing network function VNF and device | |
CN109067597A (en) | A kind of distributed system dynamic and intelligent service administering method | |
CN109347884A (en) | A kind of real-time ethernet is to the conversion method and device of fieldbus, storage medium | |
CA2975242A1 (en) | System, virtualization control apparatus, method for controlling a virtualization control apparatus, and program | |
CN110430110A (en) | A kind of field bus gateway and its method for converting protocol | |
CN101178666A (en) | Coordinating and scheduling method between heterogeneous multi-core | |
CN107608272A (en) | A kind of workshop appliance monitoring system based on Powerlink | |
CN109274603A (en) | Interconnecting method and device between heterogeneous protocol data based on software definition | |
CN110519138A (en) | A kind of realization method and system of Profibus-DP master station protocol | |
CN110838961A (en) | General aviation bus message scheduling system | |
CN103685578B (en) | The data transmission method of master-slave equipment | |
CN204733178U (en) | A kind of EtherCAT master station device based on FPGA | |
CN105786732B (en) | Data access method and device | |
CN103744365B (en) | Bridging module for communication between room control terminal and upper computer and method thereof | |
CN105141489B (en) | A kind of real-time data acquisition system for emulator | |
CN109361653B (en) | POWERLINK main station | |
CN111327447B (en) | Distributed system, arbitration method, node device and storage medium | |
WO2008045890A2 (en) | Service proxy |
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 |