CN103346943A - Method and system of data transmission - Google Patents

Method and system of data transmission Download PDF

Info

Publication number
CN103346943A
CN103346943A CN2013103085295A CN201310308529A CN103346943A CN 103346943 A CN103346943 A CN 103346943A CN 2013103085295 A CN2013103085295 A CN 2013103085295A CN 201310308529 A CN201310308529 A CN 201310308529A CN 103346943 A CN103346943 A CN 103346943A
Authority
CN
China
Prior art keywords
data
slave station
profibus
module
target
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
Application number
CN2013103085295A
Other languages
Chinese (zh)
Other versions
CN103346943B (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.)
Hangzhou Hollysys Automation Co Ltd
Hollysys Automation Technologies Ltd
Original Assignee
Hangzhou Hollysys Automation Co Ltd
Hollysys Automation Technologies 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 Hangzhou Hollysys Automation Co Ltd, Hollysys Automation Technologies Ltd filed Critical Hangzhou Hollysys Automation Co Ltd
Priority to CN201310308529.5A priority Critical patent/CN103346943B/en
Publication of CN103346943A publication Critical patent/CN103346943A/en
Application granted granted Critical
Publication of CN103346943B publication Critical patent/CN103346943B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Communication Control (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a method and system of data transmission. The method is applied to a data transmission system. The system comprises a main control module, a conversion module and at least one single module, wherein profibus-dp slave stations of a preset number are included in each single module, and the preset number is N, namely, each single module comprises N profibus-dp slave stations. The main control module is in data transmission with the N profibus-dp slave stations respectively, 244*N bytes data can be transmitted at most, and therefore the large data volume transmission of 244*N bytes can be carried out between the main control module and the single modules. The invention further provides a method of data transmission. The method of data transmission is adopted in the system of the data transmission, therefore, the purpose of carrying out large data volume transmission between the single modules and the main control module is achieved, and the demands of carrying out large data volume profibus-dp protocol data interaction between the main control module and the single modules are further met.

Description

Data transmission method and system
Technical field
The present invention relates to automation control area, be specifically related to a kind of data transmission method and system.
Background technology
Profibus is a kind of internationalization, open, the standard for Fieldbus that do not rely on the device fabrication merchant, be mainly used in the field bus technique of the monitoring of factory automation workshop level and scene equipment level data communication and control, be widely used in automated manufacturing, process industry automation and other field automations such as building, traffic electric power.It is by profibus-dp(decentralized periphery), profibus-pa(process automation), the compatible part of three of profibus-fms (fieldbus message specification) forms.
Wherein profibus-dp is the low-cost communication standard of a kind of high speed, the communications that are used for apparatus control system distributing I/O more, apparatus control system mainly comprises main control module and single module, the main MS master-slave mode of using is carried out communication between main control module and the single module, and main control module periodically carries out data interaction with single module usually.In actual applications, a main control module connects several single modules, and the principle of the agreement of profibus-dp when carrying out exchanges data is: in one-period, main control module successively with single module 1, single module 2 ... carry out data interaction to last single module N, enter the continuation of following one-period then and carry out data interaction with each single module successively.
Comprise the profibus-dp slave station in the single module, when main control module carries out data interaction according to profibus-dp agreement and single module, the profibus-dp slave station that is actually in main control module and the single module carries out data interaction, regulation according to the profibus-dp agreement, when main control module and each profibus-dp slave station carry out a data interaction, maximum that can transmitted data amount is 244 bytes, foreign corporation such as Siemens provides because existing single module mostly is, has only a profibus-dp slave station in its each single module, therefore when main control module and single module carried out a data interaction, maximum that can data quantity transmitted was 244 bytes.
But along with the complexity variation of The field environment and the continuous progress of prior art, need to carry out the transmission of big data quantity between main control module and the single module, the data volume of 244 bytes can not meet the demands far away, but regulation and this body structure of single module of being limited to the profibus-dp agreement, main control module only can carry out the transmission of 244 bytes with single module in one-period, therefore main control module and single module need repeatedly carry out data interaction in a plurality of cycles, this causes realizing between single module and the main control module that once the time of data interaction needs then can be very long completely, and this has had a strong impact on transmission time and the follow-up use of data of data between main control module and the single module.
Therefore be badly in need of a kind of single module of independent research now, make single module can and master control between carry out the transmission of big data quantity, can satisfy the profibus-dp consensus standard again, thereby satisfy the demand of carrying out the big data quantity data interaction between the main control module and single module in the prior art.
Summary of the invention
The invention provides a kind of data transmission method and system, after data transmission system is used this data transmission method, can realize single module can and master control between carry out the purpose of the transmission of big data quantity, carry out the mutual demand of big data quantity profibus-dp protocol data thereby satisfy in the prior art between the main control module and single module.
To achieve these goals, the invention provides following technological means:
A kind of data transmission method, be applied to data transmission system, described data transmission system comprises: main control module, the modular converter that links to each other with described main control module and at least one single module that links to each other with described modular converter, each single module inside comprises the profibus-dp slave station of predetermined number, described profibus-dp slave station comprises UART module, receiver module, sending module, control module, memory module and bus interactive interface module, comprising:
In described at least one single module, choose a single module as the target single module;
In internal memory, search with described target single module and carry out the target data of transfer of data and the data volume of described target data, and obtain the predetermined number of profibus-dp slave station in the described target single module and the tributary address of each profibus-dp slave station;
According to the data volume of described target data, described target data and the predetermined number of described profibus-dp slave station, determine to carry out with interior each the profibus-dp slave station of described target single module the slave station data of transfer of data;
First visit data that will comprise first tributary address and first slave station data corresponding with described first tributary address adopts the profibus-dp agreement to be sent to described target single module by described modular converter;
Behind first reply data that receives described target single module feedback, next visit data that will comprise next tributary address and next slave station data corresponding with described next tributary address, adopt the profibus-dp agreement to be sent to described target single module by described modular converter, and the like each the profibus-dp slave station in the described target single module of traversal.
A kind of data transmission method, be applied to data transmission system, described data transmission system comprises: main control module, the modular converter that links to each other with described main control module and at least one single module that links to each other with described modular converter, each single module inside comprises the profibus-dp slave station of predetermined number, described profibus-dp slave station comprises UART module, receiver module, sending module, control module, memory module and bus interactive interface module, comprising:
After the described UART module of each profibus-dp slave station determines that main control module sends the baud rate of described visit data, lock described baud rate and receive visit data, and after verification is correct, be sent to the described receiver module in this profibus-dp slave station;
The described receiver module of each profibus-dp slave station carries out protocol analysis according to the profibus-dp agreement to described visit data and obtains target tributary address in the described visit data, if the tributary address of a profibus-dp slave station is consistent with described target tributary address, determine that then this profibus-dp slave station is target profibus-dp slave station, described target profibus-dp slave station continues that according to the profibus-dp agreement described visit data is carried out protocol analysis and obtains target slave station data;
Described control module in the described target profibus-dp slave station is stored to described target slave station data in the memory module in the described target profibus-dp slave station;
Bus interactive interface module in the described target profibus-dp slave station is carried out data interaction acquisition reply data according to described target slave station data and extraneous man-machine interface, and described reply data is fed back to UART module in the described target profibus-dp slave station;
UART module in the described target profibus-dp slave station is sent to sending module in the described target profibus-dp slave station with described reply data, feeds back described reply data to described main control module by sending module;
Re-execute above-mentioned steps, each the profibus-dp slave station in the described target single module of traversal.
A kind of data transmission system comprises:
Main control module, be used for choosing a single module as the target single module at described at least one single module, in internal memory, search with described target single module and carry out the target data of transfer of data and the data volume of described target data, and obtain the predetermined number of profibus-dp slave station in the described target single module and the tributary address of each profibus-dp slave station, according to described target data, the predetermined number of the data volume of described target data and described profibus-dp slave station, determine to carry out with interior each the profibus-dp slave station of described target single module the slave station data of transfer of data, first visit data that will comprise first tributary address and first slave station data corresponding with described first tributary address, adopt the profibus-dp agreement to be sent to described target single module by described modular converter, behind first reply data that receives described target single module feedback, next visit data that will comprise next tributary address and next slave station data corresponding with described next tributary address, adopt the profibus-dp agreement to be sent to described target single module by described modular converter, and the like each the profibus-dp slave station in the described target single module of traversal;
The modular converter that links to each other with described main control module;
At least one single module, each single module inside comprises the profibus-dp slave station of predetermined number, described profibus-dp slave station comprises the UART module, receiver module, sending module, control module, memory module and bus interactive interface module, described at least one single module, after the described UART module that is used for each profibus-dp slave station determines that main control module sends the baud rate of described visit data, lock described baud rate and receive visit data, and after verification is correct, be sent to described receiver module in this profibus-dp slave station, the described receiver module of each profibus-dp slave station carries out protocol analysis according to the profibus-dp agreement to described visit data and obtains target tributary address in the described visit data, if the tributary address of a profibus-dp slave station is consistent with described target tributary address, then this profibus-dp slave station is target profibus-dp slave station, described target profibus-dp slave station continues that according to the profibus-dp agreement described visit data is carried out protocol analysis and obtains target slave station data, described control module in the described target profibus-dp slave station is stored to described target slave station data in the memory module in the described target profibus-dp slave station, bus interactive interface module in the described target profibus-dp slave station is carried out data interaction according to described target slave station data and extraneous man-machine interface and is obtained reply data, and described reply data fed back to UART module in the described target profibus-dp slave station, UART module in the described target profibus-dp slave station is sent to sending module in the described target profibus-dp slave station with described reply data, feed back described reply data to described main control module by sending module, re-execute above-mentioned steps, each the profibus-dp slave station in the described target single module of traversal.
The invention discloses a kind of data transmission method, this method is applied to data transmission system, comprise in this system that main control module, modular converter and at least one single module and each single module inside comprise the profibus-dp slave station of predetermined number, establishing predetermined number is N.
When carrying out transfer of data between main control module and the single module among the present invention, still carry out transfer of data successively according to profibus-dp agreement and profibus-dp slave station, by background technology as can be known, it is 244 bytes that profibus-dp slave station and main control module carry out the maximum amount of data that a data interaction can transmit, but comprise N profibus-dp slave station in a single module among the present invention, main control module carries out transfer of data with N profibus-dp slave station respectively, can transmit 244 * N byte at most, because N profibus-dp slave station all belongs to single module, so can carry out the transmission of 244 * N byte big data quantity between main control module and the single module.
The predetermined number N of profibus-dp slave station can set in the single module among the present invention in the data transmission system, and predetermined number N is more big, and is can data quantity transmitted more big, thereby realizes the purpose of carrying out the transmission of big data quantity between single module and the main control module.
Because of main control module and the single module that the comprises a plurality of profibus-dp slave stations method of carrying out data interaction not in the prior art, therefore the present invention also provides a kind of data transmission method, in data transmission system, adopt data transmission method provided by the invention, thereby realize carrying out the purpose of the transmission of big data quantity between single module and the main control module, and then satisfy and carry out the mutual demand of big data quantity profibus-dp protocol data between main control module and the single module.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the structural representation of the disclosed data transmission system of the embodiment of the invention;
Fig. 2 is the flow chart of the present count method for determination of amount of the profibus-dp slave station in the single module in the disclosed data transmission system of the embodiment of the invention;
Fig. 3 is the flow chart of the disclosed data transmission method of the embodiment of the invention;
Fig. 4 is the flow chart of the disclosed another data transmission method of the embodiment of the invention;
Fig. 5 is the structural representation of memory module in the disclosed data transmission system of the embodiment of the invention;
Fig. 6 is the structural representation in RAM district in the disclosed memory module of the embodiment of the invention;
Fig. 7 is stored to the flow chart in RAM district for target slave station data in the disclosed data transmission method of the embodiment of the invention;
Fig. 8 is the structural representation of the disclosed another data transmission system of the embodiment of the invention;
Fig. 9 is the flow chart of the disclosed another data transmission method of the embodiment of the invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
As shown in Figure 1, the invention provides a kind of data transmission system, described data transmission system comprises:
Main control module 100, the modular converter 200 that links to each other with described main control module 100 and at least one single module 300 that links to each other with described modular converter 200; For the clear relation of describing each single module and modular converter, present embodiment is M in the quantity of the single module that Fig. 1 shows, M is natural number, and 1<M<127.
Each single module 300 inside comprises the profibus-dp slave station 400 of predetermined number, described profibus-dp slave station comprises universal asynchronous receiving-transmitting transmitter (Universal Asynchronous Receiver/Transmitter, UART) module 401, receiver module 402, sending module 403, control module 404, memory module 405 and bus interactive interface module 406.In order clearly to show the profibus-dp slave station in Fig. 1, predetermined number adopts N to represent that N is natural number and N>1 in the present embodiment.
Wherein main control module is used for choosing a single module as the target single module at described at least one single module, in internal memory, search with described target single module and carry out the target data of transfer of data and the data volume of described target data, and obtain the predetermined number of profibus-dp slave station in the described target single module and the tributary address of each profibus-dp slave station, according to described target data, the predetermined number of the data volume of described target data and described profibus-dp slave station, determine to carry out with interior each the profibus-dp slave station of described target single module the slave station data of transfer of data, first visit data that will comprise first tributary address and first slave station data corresponding with described first tributary address, adopt the profibus-dp agreement to be sent to described target single module by described modular converter, behind first reply data that receives described target single module feedback, next visit data that will comprise next tributary address and next slave station data corresponding with described next tributary address, adopt the profibus-dp agreement to be sent to described target single module by described modular converter, and the like each the profibus-dp slave station in the described target single module of traversal;
At least one single module, after the described UART module that is used for each profibus-dp slave station determines that main control module sends the baud rate of described visit data, lock described baud rate and receive visit data, and after verification is correct, be sent to described receiver module in this profibus-dp slave station, the described receiver module of each profibus-dp slave station carries out protocol analysis according to the profibus-dp agreement to described visit data and obtains target tributary address in the described visit data, if the tributary address of a profibus-dp slave station is consistent with described target tributary address, determine that then this profibus-dp slave station is target profibus-dp slave station, described target profibus-dp slave station continues that according to the profibus-dp agreement described visit data is carried out protocol analysis and obtains target slave station data, described control module in the described target profibus-dp slave station is stored to described target slave station data in the memory module in the described target profibus-dp slave station, bus interactive interface module in the described target profibus-dp slave station is carried out data interaction according to described target slave station data and extraneous man-machine interface and is obtained reply data, and described reply data fed back to UART module in the described target profibus-dp slave station, UART module in the described target profibus-dp slave station is sent to sending module in the described target profibus-dp slave station with described reply data, feed back described reply data to described main control module by sending module, re-execute above-mentioned steps, each the profibus-dp slave station in the described target single module of traversal.
Below each part of data transmission system is carried out detailed presentations, comprise main control module 100 in this system, be used for choosing a single module as the target single module at described at least one single module, in internal memory, search with described target single module and carry out the target data of transfer of data and the data volume of described target data, and obtain the predetermined number of profibus-dp slave station in the described target single module and the tributary address of each profibus-dp slave station, according to described target data, the predetermined number of the data volume of described target data and described profibus-dp slave station, determine to carry out with interior each the profibus-dp slave station of described target single module the slave station data of transfer of data, first visit data that will comprise first tributary address and first slave station data corresponding with described first tributary address, adopt the profibus-dp agreement to be sent to described target single module by described modular converter, behind first reply data that receives described target single module feedback, next visit data that will comprise next tributary address and next slave station data corresponding with described next tributary address, adopt the profibus-dp agreement to be sent to described target single module by described modular converter, and the like each the profibus-dp slave station in the described target single module of traversal; The application program that single module structure changes main control module 100 inside, back also changes thereupon, will carry out detailed presentations to main control module 100 in the subsequent embodiment.
The modular converter 200 that links to each other by the DP interface with main control module 100;
Modular converter 200 comprises the MAX485 level transferring chip, be used for that the differential signal that main control module 100 sends is converted to single-ended signal and be sent to single module, or the single-ended signal that single module sends is converted to differential signal is sent to main control module, because when main control module transmits visit data to single module, adopt differential level to transmit in order to strengthen anti-interference, single module among the present invention only can receive single-ended signal, so access data signals needed to be converted into single-ended signal before entering single module, so that single module can receive.
The invention discloses a kind of single module 300, single module of the prior art mostly is the profibus-dp slave station chip of standard, for example: the SPC3 of Siemens, the profibus-dp slave station chip internal of standard only has a profibus-dp slave station, can't satisfy and main control module between carry out the big data quantity transmission requirements, and the sealing of the technology of the profibus-dp slave station chip internal of standard, other people can't obtain its inner technology.
Therefore the present inventor adopts field programmable gate array chip (Field Programmable Gate Array, FPGA) adopt the mode of software program programming to develop a kind of single module 300 according to disclosed profibus-dp agreement, these single module 300 inside comprise the profibus-dp slave station 400 of predetermined number, the size of predetermined number can be decided according to main control module and single module needs data quantity transmitted, concrete, as shown in Figure 2, definite process of predetermined number comprises:
Step S101: obtain the maximum amount of data that main control module and a single module carry out transfer of data;
Main control module and single module periodically carry out data interaction, main control module and single module need carry out the data interaction of certain data volume in each cycle, the data volume that needs in each cycle to carry out data interaction does not wait, finish for target data in each cycle can both be transmitted in one-period, therefore determine the predetermined number of profibus-dp slave station choosing the maximum amount of data that carries out data interaction in a plurality of cycles.
Step S102: byte number and 244 bytes of maximum amount of data are divided by, obtain quotient and remainder;
According to the profibus-dp agreement in one-period, can transmit the data volume of 244 bytes between each profibus-dp slave station and the main control module at most, the maximum amount of data that obtains in the above-mentioned steps and 244 bytes are done the merchant obtain quotient and remainder, obtain the quantity of the profibus-dp slave station of needs according to quotient and remainder.
Step S103: the quantity that obtains the profibus-dp slave station according to quotient and remainder, comprise: be at least quotient if described remainder is the numerical value of predetermined number in zero single module, if in the non-vanishing then single module of described remainder the numerical value of predetermined number be at least quotient add after one and value;
Step S104: S101-S103 travels through each single module in the described data transmission system set by step.
Provided the scope bottom line of profibus-dp slave station preset data amount in the single module in the above-mentioned steps, the predetermined number of profibus-dp slave station maximum in the present embodiment is fixed according to the resource of fpga chip in each module, the fpga chip resource is more big, and the quantity of the profibus-dp slave station that can make up is more big.
When being zero as if remainder certainly, the predetermined number of profibus-dp slave station equals quotient, if remainder is non-vanishing, the predetermined number of profibus-dp slave station equal quotient add one and value, meet most the industry needs like this, neither waste the burden of resource, increase system, can satisfy again in one-period, to transmit and finish target data.
Thereby obtain the predetermined number of the profibus-dp slave station in each single module by each single module of above-mentioned steps ergodic data transmission system, so that the profibus-dp slave station that the engineer according to predetermined number, adopts the mode of software programming to obtain presetting in the single module that fpga chip makes up.Separate between each slave station, and each profibus-dp slave station makes up according to the profibus-dp agreement fully, and the transfer of data between the main control module is carried out according to the profibus-dp agreement fully.Each profibus-dp slave station comprises UART module 401, receiver module 402, sending module 403, control module 404, memory module 405 and bus interactive interface module 406, annexation between each module is the connection on the data, can be described in detail the module that comprises in the profibus-dp slave station among the following embodiment, not give unnecessary details at this.
The invention discloses a kind of data transmission system, comprise in this system that main control module, modular converter and at least one single module and each single module inside comprise the profibus-dp slave station of predetermined number, establishing predetermined number is N.
When carrying out transfer of data between main control module and the single module among the present invention, still carry out transfer of data successively according to profibus-dp agreement and profibus-dp slave station, by background technology as can be known, it is 244 bytes that profibus-dp slave station and main control module carry out the maximum amount of data that a data interaction can transmit, but comprise N profibus-dp slave station in a single module among the present invention, main control module carries out transfer of data with N profibus-dp slave station respectively, can transmit 244 * N byte at most, because N profibus-dp slave station all belongs to single module, therefore can carry out the transmission of 244 * N byte big data quantity between main control module and the single module, the predetermined number N of profibus-dp slave station can set in the single module among the present invention in the data transmission system, predetermined number N is more big, can data quantity transmitted more big, thus realize carrying out between single module and the main control module purpose of big data quantity profibus-dp protocol data transmission.
As shown in Figure 3, the embodiment of the invention provides a kind of data transmission method, is applied to data transmission system, comprising:
Step S201: at least one single module, choose a single module as the target single module;
Comprise in the data transmission system that at least one single module mostly is 128 most, before carrying out this method, main control module need storage in advance carry out the target data of transfer of data and the data volume of described target data with each single module in internal memory, and the predetermined number of the interior profibus-dp slave station of described each single module and the tributary address of each profibus-dp slave station.
The data volume of Cun Chu target data and target data is that the engineer is according to actual conditions and fixed in advance, the engineer prepares main control module and each single module in advance needs a plurality of target datas of transmitting and the data volume of a plurality of target datas in a plurality of cycles, and the target data in a plurality of cycles and the data volume of target data are stored in the internal memory one to one.The engineer is according to the structure of the single module inside in the data transmission system, obtain the predetermined number of profibus-dp slave station in each single module, and by external microprocessor profibus-dp slave station in each single module is set tributary address, and the tributary address of profibus-dp slave station in each single module is stored in the internal memory of main control module one to one.
Step S202: obtain the content relevant with the target single module, comprise: in internal memory, search with described target single module and carry out the target data of transfer of data and the data volume of described target data, and obtain the predetermined number of profibus-dp slave station in the described target single module and the tributary address of each profibus-dp slave station;
In this cycle, according to the target single module of choosing in the above-mentioned steps, the content that basis is stored in advance in internal memory, search the quantity of profibus-dp slave station in the data volume of the target data corresponding with the target single module, target data and the described target single module, and the address of each slave station, so that each profibus-dp slave station in main control module and the target single module carries out data interaction.
Step S203: the slave station data of determining to carry out with interior each the profibus-dp slave station of target single module transfer of data, according to the data volume of described target data, described target data and the predetermined number of described profibus-dp slave station, determine to carry out with interior each the profibus-dp slave station of described target single module the slave station data of transfer of data;
According to definite process of relevant predetermined number among the step S101-S103 as can be known, the predetermined number of profibus-dp slave station is to carry out the maximum amount of data of transfer of data and fixed according to main control module in a plurality of cycles and single module, the data volume of carrying out transfer of data in this cycle is maximum amount of data not necessarily, therefore needs to calculate the slave station data of carrying out transfer of data between main control module and each the profibus-dp slave station.
If the predetermined number of profibus-dp slave station is A in the target single module, the data volume of target data is the B byte in this cycle, B byte and 244 bytes are divided by, obtain quotient C and remainder D, if remainder D is zero, then target data is divided into C part slave station data successively, every part of 244 bytes, if remainder D is non-vanishing, then target data is divided into (C+1) part slave station data successively, preceding every part of 244 bytes of C part, last a D byte, part slave station data are corresponding with A pofibus-dp slave station in the target single module successively with C part slave station data or (C+1), if predetermined number A greater than C or predetermined number A greater than (C+1), then the slave station data of remaining pofibus-dp slave station correspondence are sky.Main control module does not need to carry out with it data interaction.
Step S204: send visit data to the target single module;
Step S205: judge whether to be sent completely after receiving reply data, then obtain next visit data if not, go to step S204, if then withdraw from.
Concrete comprises: will comprise first visit data of first tributary address and first slave station data corresponding with described first tributary address, and adopt the profibus-dp agreement to be sent to described target single module by described modular converter; Behind first reply data that receives described target single module feedback, next visit data that will comprise next tributary address and next slave station data corresponding with described next tributary address, adopt the profibus-dp agreement to be sent to described target single module by described modular converter, and the like each the profibus-dp slave station in the described target single module of traversal.
Wherein, visit data is to form according to the slave station data corresponding with each tributary address that obtain among each tributary address of step S202 acquisition and the step S203, concrete, first tributary address and the first slave station data corresponding with first tributary address are formed first visit data, second tributary address and the second slave station data corresponding with second tributary address are formed second visit data, and the like finish the visit data of each slave station up to establishment.Be example with first visit data, after first visit data is converted to single-ended signal by modular converter, be sent to a profibus-dp slave station corresponding with first tributary address, bus interactive interface module in the one profibus-dp slave station carries out forming first reply data after the data interaction according to the Man Machine Interface of first visit data with the external world, and first reply data fed back to main control module, concrete step will be described in detail at following embodiment, not repeat them here.
After main control module is received first reply data of first slave station transmission, proof data interaction between main control module and first slave station in this cycle is finished, below will with the data interaction of carrying out of second slave station, at first second tributary address according to second slave station obtains second visit data corresponding with second tributary address, and second visit data is sent to the 2nd profibus-dp slave station through modular converter, carry out data interaction by the bus interactive interface module of the 2nd profibus-dp slave station and extraneous Man Machine Interface then and obtain second reply data, and second reply data fed back to main control module, master control sends the 3rd visit data to the 3rd profibus-dp slave station after receiving again, and the like all the profibus-dp slave stations in traversal target single module, when being transferred to last profibus-dp slave station, when the slave station data are empty, main control module can be skipped this slave station, continues to carry out data interaction with next slave station.
The present embodiment detailed presentations process of the main execution of main control module inside in data transmission system, on the basis of notebook data transmission system, send the process of visit data by main control module circulation to the slave station in the target single module, will describe the target single module below for the processing procedure of the visit data of main control module transmission.
As shown in Figure 4, the invention provides a kind of data transmission method, be applied to data transmission system, comprising:
Step 301: each profibus-dp slave station receives visit data, and be sent to receiver module, concrete: after the described UART module of each profibus-dp slave station determines that main control module sends the baud rate of described visit data, lock described baud rate and receive visit data, and after verification is correct, be sent to the receiver module of this profibus-dp slave station;
After main control module sends visit data to the target single module, the UART module of stating of all slave stations in the target single module is all intercepted baud rate, concrete: each UART module compares with 12M, 6M, 3M, 1.5M, 500K, 187.5K, 45.45K, 19200 and 9600 several baud rates (unit is bps) baud rate with visit data successively, general detecting baud rate begins to successively decrease successively to move in circles from 12M, up to the locking baud rate, beginning from the high bit rate is that it is very fast to detect speed like this because the high bit rate needed time in when detecting is shorter.The locking baud rate receives visit data after determining baud rate, then the visit data that receives is carried out even parity check, judges whether correctly, if correct words then are sent to visit data the receiver module of this profibus-dp slave station.
Step 302: determine target profibus-dp slave station, and acquisition target access data, the receiver module of each concrete profibus-dp slave station carries out protocol analysis according to the profibus-dp agreement to described visit data and obtains target tributary address in the described visit data, if the tributary address of a profibus-dp slave station is consistent with described target tributary address, then this profibus-dp slave station is target profibus-dp slave station, and described target profibus-dp slave station continues that according to the profibus-dp agreement described visit data is carried out protocol analysis and obtains target slave station data;
Inconsistent then stopping to be resolved for the tributary address of all the other profibus-dp slave stations and target tributary address, wait for the arrival of visit data next time, if the tributary address of all profibus-dp slave stations is all inconsistent with the target tributary address, prove that then this target tributary address not for the profibus-dp slave station in the target single module, then jumps to the judgement that next single module carries out the target tributary address.
Receiver module in each slave station is resolved visit data according to the profibus-dp agreement, at first obtain the target tributary address in the visit data, each profibus-dp slave station compares the target tributary address, judge whether the target tributary address is consistent with this profibus-dp tributary address, if consistent this profibus-dp slave station is target profibus-dp slave station, need carry out the profibus-dp slave station of data interaction with main control module, target profibus-dp slave station continues that visit data is carried out the data parsing and obtains target slave station data.
Step 303: target profibus-dp slave station store access data, concrete, the control module in the described target profibus-dp slave station is stored to described target slave station data in the memory module in the described target profibus-dp slave station;
As shown in Figure 5, the memory module 405 in each profibus-dp slave station 400 comprises:
Register district 501 and RAM district 502;
The RAM district comprises: a RAM district 5021, the 2nd RAM district 5022, the 3rd RAM district 5023.
The RAM district also is divided into reception area and sending area, and reception area is used for the visit data that the storage main control module is issued to single module, and the sending area is used for the reply data that the storage single module feeds back to main control module.
As shown in Figure 6, be the structure specific embodiment in RAM district.
The RAM district is used for the part of data storage with regard to FPGA inside, be example to comprise 2 profibus-dp slave stations in the single module, the RAM of each slave station divides into sending area and reception area, according to the address it is divided into 3 zones, initial address separately is respectively 0x0000,0x1000 and 0x2000, each profibus-dp slave station has 3 RAM districts, the one RAM district, the 2nd RAM district, the address in the 3rd RAM district all is the basic enterprising line displacement in the base address, because each profibus-dp slave station transmits 244 bytes at most, the data field that therefore is defined as each RAM district is that 256 bytes are FF.
The address in 3 of the reception area of a profibus-dp slave station RAM districts is respectively RAM district a: 0x0000-0x00FF so, the 2nd RAM district: 0x1000-0x10FF, the 3rd RAM district: 0x2000-0x20FF, the address, sending area of the one profibus-dp slave station is divided respectively: RAM district a: 0x0100-0x01FF, the 2nd RAM district: 0x1100-0x11FF, the 3rd RAM district: 0x2100-0x21FF; The address in 3 RAM districts of the reception area of the 2nd profibus-dp slave station is respectively RAM district a: 0x0200-0x02FF, the 2nd RAM district: 0x1200-0x12FF, the 3rd RAM district: 0x2200-0x22FF, the address, sending area of the one profibus-dp slave station is divided respectively: RAM district a: 0x0300-0x03FF, the 2nd RAM district: 0x1300-0x13FF, the 3rd RAM district: 0x2300-0x23FF.
Storage area among the present invention is divided into register district and RAM district, the register district mainly stores each parameter in the slave station data, RAM deposits inputoutput data in the district, profibus-dp slave station data are classified, made things convenient for follow-up use to the inputoutput data in the slave station data, in addition, main control module need send the memory module of visit data to the single module among the present invention, single module need carry out data interaction with extraneous Man Machine Interface, then reply data is fed back to main control module by memory module, because both operations are asynchronous, therefore RAM is divided into sending area and reception area and be divided into three parts, in order to collide when avoiding operation that single module and main control module carry out the RAM district of same slave station, and this RAM distinguishes to satisfy up-to-date data is transferred to use side as soon as possible, and concrete use sees the description in the following step for details.
As shown in Figure 7, the control module in the described target profibus-dp slave station is stored to described target slave station data in the memory module in the described target profibus-dp slave station, and concrete comprises:
Step S401: the data type of judging target slave station data, concrete: the type of byte data in the data field in the control module judgement target slave station data in the target profibus-dp slave station, if parameter type then jumps to S402, if the inputoutput data type then jumps to S403;
The slave station data are divided into parts such as packet header, data field and check digit, the content for the part of the data field in the slave station data that this step is mainly paid close attention to.
Step S402: if parameter type then is stored to byte data the register district;
Step S403: if the inputoutput data type then byte data is stored to a RAM district in;
Step S404: judge whether to finish receiving, if then jump to step S405, if not, then enter next byte data and jump to step S401.
Step S405: generate and receive successful target knowledge signal, and with byte data unloading to the two RAM districts in the RAM district.
After by above-mentioned steps target slave station data being stored to memory module fully, generate and receive successful target knowledge signal, and with byte data unloading to the two RAM districts in the RAM district, the first address that is converted to Direct Transform RAM district in RAM of the present invention district, convenient and swift.
Step 304: target profibus-dp slave station obtains reply data, concrete: bus interactive interface module is carried out data interaction according to described target slave station data and extraneous man-machine interface and is obtained reply data, and described reply data is fed back to described UART module;
Bus interactive interface module need be obtained the target slave station data in the RAM district, as shown in Figure 7, connects after the above-mentioned step S405, and the step of obtaining data comprises:
Step S406: send and read the id signal in RAM district, concrete: the bus interactive interface module in the target profibus-dp slave station sends to described memory module and reads the id signal in RAM district;
The step S407:RAM district just byte data in the 2nd RAM district is sent to the 3rd RAM district, concrete: the memory module in the target profibus-dp slave station is according to reading the id signal in RAM district, the byte data in the 2nd RAM district is sent to the 3rd RAM district confession bus interface module calls.
Bus interactive interface module is obtained the slave station data from the 3rd RAM district, and slave station data and extraneous man-machine interface are carried out data interaction, obtain reply data, and reply data is sent to the 3rd RAM district, be sent completely the back generation and be sent completely id signal, reply data with the 3rd RAM district is sent to the 2nd RAM district then, when the target single module need feed back reply data to main control module, reply data in the 2nd RAM district is sent to a RAM district, and is sent to the UART module by a RAM district.
Step S305: target profibus-dp slave station feeds back to main control module with reply data, concrete: the UART module in the described target profibus-dp slave station is sent to sending module in the described target profibus-dp slave station with described reply data, feeds back described reply data to described main control module by sending module;
Step S306: re-execute step S301-S305, each the profibus-dp slave station in the described target single module of traversal.
Above-mentioned steps S301-S305 is the data interaction between the interior target profibus-dp slave station of main control module and target single module, main control module is by all slave stations in the above-mentioned steps traversal target single module, wherein when if the slave station data of slave station correspondence be sky, then directly skip this slave station, process and above-mentioned steps that other profibus-dp slave stations in master control and the target single module carry out data interaction are consistent, do not repeat them here.
Present embodiment is the target single module carries out transfer of data in data transmission system detailed content, and this embodiment describes the process that target single module and main control module carry out transfer of data in detail.
A kind of data transmission system more than is provided, comprised main control module, modular converter and at least one single module in this system, and each single module inside comprises the profibus-dp slave station of predetermined number that establishing predetermined number is N.The predetermined number N of profibus-dp slave station can set in the single module among the present invention in the data transmission system, and predetermined number N is more big, and is can data quantity transmitted more big, thereby realizes the purpose of carrying out the transmission of big data quantity between single module and the main control module.The present invention also provides a kind of data transmission method for this reason, the implementation that comprises the inner implementation of main control module and single module inside, adopt data transmission method provided by the invention on the data transmission system basis, thereby realize carrying out the purpose of the transmission of big data quantity between single module and the main control module, and then satisfy the demand of carrying out the big data quantity data interaction between main control module and the single module.
As shown in Figure 8, the embodiment of the invention provides a kind of data transmission system to comprise again: main control module 100, the modular converter 200 that links to each other with described main control module and at least one single module 600 that links to each other with described modular converter, each single module 600 inside comprises profibus-dp memory module 605 and the bus interactive interface module 606 of UART module 601, receiver module 602, sending module 603, control module 604, predetermined number.Wherein the predetermined number of the profibus-dp slave station in the single module has been determined by engineer's written program that when making up single module by PFGA the size of preset data amount is determined by above-mentioned steps S101-S103 in each single module.
As shown in Figure 8, comprise also in each slave station that a shared end links to each other with the UART module, the other end is netted redundant handover module 607 with the AB that receiver module links to each other, each slave station is the two redundant modes of AB net in the single module, availability is strong, reception pin in the single module has two, these two pins receive the same signal of main control module transmission or the signal (same signal) of redundant link simultaneously, in single module, there are two UART modules all to carry out baud rate detecting and even parity check that this receives signal then, select by AB net redundant module then, at first acquiescence is selected the A net, when the A net goes wrong, AB net redundant module control data receive and switch to the B net, proceed data transmit-receive, can increase the availability of link like this.When A/B net all after the fault, just think link failure.Therefore AB nets redundant handover module and carries out redundancy backup with regard to two receiving port signals of major control and switch.
As shown in Figure 8, also comprise shared watchdog reset functional block 608 in each profibus-dp slave station, be used for monitoring in the process that data receive, guarantee when abnormal conditions, the profibus-dp slave station can in time jump back to initial condition, from new reception data.
Since main control module 100 each constantly can only with single module in a slave station carry out data interaction, similar time-sharing multiplex between each profibus-dp slave station and the main control module, in order to save the application space of FPGA inside, the notebook data transmission system is with the UART module of each profibus-dp slave station, receiver module, sending module, control module, AB nets redundant handover module, watchdog reset functional block and bus interactive interface module share, memory module is equivalent to independent profibus-dp slave station, and each profibus-dp slave station has with it the memory module of correspondence separately.
Because the present invention adopts fpga chip to make up single module, the limited storage space of FPGA inside, therefore the system of present embodiment shares each module, can save the space of PGGA, so that reserved resource offers other design requirement, original profibus-dp chip functions is single, single module provided by the invention not only can be realized the function of profibus-dp slave station, carry out the transmission of big quantity on the basis of single module, but also can realize other design requirement and logical design, the integrated level height is powerful.
Under this system supports, as shown in Figure 9, the invention provides another data transmission method, comprising:
Step S501: in advance main control module and each single module are carried out preparation.
In above-mentioned data transmission system, profibus-dp slave station quantity is determined in each single module, but the profibus-dp slave station does not have corresponding identification information with it in each single module, therefore adopt tributary address as the identification information of each profibus-dp slave station, in order to handle in the subsequent process, be example with the target single module, the engineer adopts the tributary address of each profibus-dp slave station in the ppu target setting single module, so that each slave station has independent tributary address, and the tributary address of each profibus-dp slave station is stored in the internal memory of target single module, the engineer also carries out same operation to other single modules.
The engineer is that unit is stored in the internal memory of main control module according to the tributary address with each profibus-dp slave station in the predetermined number of profibus-dp slave station in each single module and each single module with the single module.In addition, the engineer also needs main control module and each single module carries out the target data of transfer of data and the data volume of target data is that unit is stored in the internal memory of main control module with the single module.
Step S502: choose a single module as the target single module;
In real transfer of data, be that main control module is according to the single module order, carry out transfer of data with single module successively, in order to represent the arbitrariness of the single module in the arbitrariness of the present invention, with a single module in each single module as the target single module, with the target single module as an example, all the other single modules are similar consistent with data transmission procedure between the master control.
Step S503: main control module obtains desired data in internal memory;
In internal memory, search with the target single module and carry out the target data of transfer of data and the data volume of target data, and obtain the predetermined number of profibus-dp slave station in the target single module and the tributary address of each profibus-dp slave station;
Step S504: main control module determines to carry out with each profibus-dp slave station the slave station data of transfer of data;
Main control module determines to carry out with interior each the profibus-dp slave station of described target single module the slave station data of transfer of data according to the data volume of target data, target data and the predetermined number of profibus-dp slave station;
Step S505: main control module sends visit data to the target single module,
The visit data that main control module will comprise a tributary address and slave station data corresponding with this tributary address is sent to the target single module;
Step 506: the UART module locking baud rate in the target single module also receives visit data;
After UART module in the target single module determines that main control module sends the baud rate of visit data, lock described baud rate and receive visit data, and after verification is correct, be sent to described receiver module;
Step 507: the receiver module in the target single module is resolved visit data and is obtained target slave station data.
According to the profibus-dp agreement described visit data is carried out protocol analysis and obtain target tributary address in the described visit data, if described target tributary address is the profibus-dp slave station in the target single module, then continues that according to the profibus-dp agreement described visit data is carried out protocol analysis and obtain target slave station data;
Step S508: the control module in the target single module is stored to target slave station data in the memory module;
Step S509: the bus interactive interface module in the target single module obtains reply data, and feeds back to the UART module;
Bus interactive interface module is carried out data interaction according to target slave station data and extraneous man-machine interface and is obtained reply data, and reply data is fed back to the UART module;
Step S510: the UART module feedback reply data in the target single module is to main control module;
The UART module is sent to sending module with reply data, feeds back reply data to main control module by sending module;
Step S511: behind the reply data of main control module receiving target single module feedback, go to next tributary address, jump to step S505.
Re-execute above-mentioned steps, each the profibus-dp slave station in the described target single module of traversal.
The present invention discloses a kind of data transmission system again, comprise main control module in this system, modular converter and at least one single module, the UART module 601 of each profibus-dp slave station in the single module among the present invention, receiver module 602, sending module 603, control module 604, AB nets redundant handover module, watchdog reset functional block and bus interactive interface module 606 share, memory module is equivalent to independent profibus-dp slave station, single module provided by the invention not only can be realized the function of profibus-dp slave station, carry out the transmission of big quantity on the basis of single module, but also can realize other design requirement and logical design, the integrated level height is powerful.
Comprise N profibus-dp slave station in a single module among the present invention, main control module carries out transfer of data with N profibus-dp slave station respectively, can transmit 244 * N byte at most, because N profibus-dp slave station all belongs to single module, so can carry out the transmission of 244 * N byte big data quantity between main control module and the single module.The predetermined number N of profibus-dp slave station can set in the single module among the present invention in the data transmission system, predetermined number N is more big, can data quantity transmitted more big, thus realize carrying out between single module and the main control module purpose of big data quantity profibus-dp protocol data transmission.
The present invention provides a kind of data transmission method again for this reason, in data transmission system, adopt data transmission method provided by the invention, thereby realize carrying out the purpose of the transmission of big data quantity between single module and the main control module, and then satisfy and carry out the mutual demand of big data quantity profibus-dp protocol data between main control module and the single module.
If the described function of present embodiment method realizes with the form of SFU software functional unit and during as independently production marketing or use, can be stored in the computing equipment read/write memory medium.Based on such understanding, the part that the embodiment of the invention contributes to prior art or the part of this technical scheme can embody with the form of software product, this software product is stored in the storage medium, comprise that some instructions are with so that a computing equipment (can be personal computer, server, mobile computing device or the network equipment etc.) carry out all or part of step of the described method of each embodiment of the present invention.And aforesaid storage medium comprises: various media that can be program code stored such as USB flash disk, portable hard drive, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD.
Each embodiment adopts the mode of going forward one by one to describe in this specification, and what each embodiment stressed is and the difference of other embodiment that same or similar part is mutually referring to getting final product between each embodiment.
To the above-mentioned explanation of the disclosed embodiments, make this area professional and technical personnel can realize or use the present invention.Multiple modification to these embodiment will be apparent concerning those skilled in the art, and defined General Principle can realize under the situation that does not break away from the spirit or scope of the present invention in other embodiments herein.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet the wideest scope consistent with principle disclosed herein and features of novelty.

Claims (10)

1. data transmission method, it is characterized in that, be applied to data transmission system, described data transmission system comprises: main control module, the modular converter that links to each other with described main control module and at least one single module that links to each other with described modular converter, each single module inside comprises the profibus-dp slave station of predetermined number, described profibus-dp slave station comprises UART module, receiver module, sending module, control module, memory module and bus interactive interface module, comprising:
In described at least one single module, choose a single module as the target single module;
In internal memory, search with described target single module and carry out the target data of transfer of data and the data volume of described target data, and obtain the predetermined number of profibus-dp slave station in the described target single module and the tributary address of each profibus-dp slave station;
According to the data volume of described target data, described target data and the predetermined number of described profibus-dp slave station, determine to carry out with interior each the profibus-dp slave station of described target single module the slave station data of transfer of data;
First visit data that will comprise first tributary address and first slave station data corresponding with described first tributary address adopts the profibus-dp agreement to be sent to described target single module by described modular converter;
Behind first reply data that receives described target single module feedback, next visit data that will comprise next tributary address and next slave station data corresponding with described next tributary address, adopt the profibus-dp agreement to be sent to described target single module by described modular converter, and the like each the profibus-dp slave station in the described target single module of traversal.
2. the method for claim 1 is characterized in that, described each single module inside comprises that definite process of predetermined number in the profibus-dp slave station of predetermined number comprises:
Obtain the maximum amount of data that described main control module and a single module carry out transfer of data;
Byte number and 244 bytes of described maximum amount of data are divided by, obtain quotient and remainder;
Be at least quotient if described remainder is the numerical value of predetermined number in zero single module, if in the non-vanishing then single module of described remainder the numerical value of predetermined number be at least quotient add after one and value;
Travel through each single module in the described data transmission system by above-mentioned steps.
3. the method for claim 1 is characterized in that, also comprises:
Store described main control module in advance and described each single module carries out the target data of transfer of data and the data volume of described target data, the tributary address of the predetermined number of profibus-dp slave station and each profibus-dp slave station in described each single module.
4. data transmission method, it is characterized in that, be applied to data transmission system, described data transmission system comprises: main control module, the modular converter that links to each other with described main control module and at least one single module that links to each other with described modular converter, each single module inside comprises the profibus-dp slave station of predetermined number, described profibus-dp slave station comprises UART module, receiver module, sending module, control module, memory module and bus interactive interface module, comprising:
After the described UART module of each profibus-dp slave station determines that main control module sends the baud rate of described visit data, lock described baud rate and receive visit data, and after verification is correct, be sent to the described receiver module in this profibus-dp slave station;
The described receiver module of each profibus-dp slave station carries out protocol analysis according to the profibus-dp agreement to described visit data and obtains target tributary address in the described visit data, if the tributary address of a profibus-dp slave station is consistent with described target tributary address, determine that then this profibus-dp slave station is target profibus-dp slave station, described target profibus-dp slave station continues that according to the profibus-dp agreement described visit data is carried out protocol analysis and obtains target slave station data;
Described control module in the described target profibus-dp slave station is stored to described target slave station data in the memory module in the described target profibus-dp slave station;
Bus interactive interface module in the described target profibus-dp slave station is carried out data interaction acquisition reply data according to described target slave station data and extraneous man-machine interface, and described reply data is fed back to UART module in the described target profibus-dp slave station;
UART module in the described target profibus-dp slave station is sent to sending module in the described target profibus-dp slave station with described reply data, feeds back described reply data to described main control module by sending module;
Re-execute above-mentioned steps, each the profibus-dp slave station in the described target single module of traversal.
5. method as claimed in claim 4 is characterized in that, described memory module comprises:
Register district and RAM district;
Described RAM district comprises: a RAM district, the 2nd RAM district, the 3rd RAM district.
6. method as claimed in claim 5 is characterized in that, the described control module in the described target profibus-dp slave station is stored to described target slave station data in the memory module in the described target profibus-dp slave station and comprises:
Control module in the described target profibus-dp slave station is judged in the described target slave station data type of each byte data in the data field;
If parameter type then is stored to byte data the register district in the described target profibus-dp slave station;
If the inputoutput data type then be stored to described target profibus-dp slave station in a RAM district in;
By above-mentioned steps target slave station data are stored to generate after the memory module in the described target profibus-dp slave station fully and receive successful target and know signal, and with byte data unloading to the two RAM districts in the RAM district.
7. method as claimed in claim 6 is characterized in that, when the bus interactive interface module in the described target profibus-dp slave station carries out comprising when data interaction obtains reply data according to described target slave station data and extraneous man-machine interface:
Bus interactive interface module in the described target profibus-dp slave station sends to the memory module in the described target profibus-dp slave station and reads the id signal in RAM district;
Memory module in the described target profibus-dp slave station is according to reading the id signal in RAM district, the byte data in the 2nd RAM district is sent to the 3rd RAM district confession bus interface module calls.
8. method as claimed in claim 4 is characterized in that, the profibus-dp slave station of each single module internal preset quantity is AB net redundant mode.
9. method as claimed in claim 4 is characterized in that, the profibus-dp slave station of each single module internal preset quantity shares UART module, receiver module, sending module, control module and bus interactive interface module.
10. a data transmission system is characterized in that, comprising:
Main control module, be used for choosing a single module as the target single module at described at least one single module, in internal memory, search with described target single module and carry out the target data of transfer of data and the data volume of described target data, and obtain the predetermined number of profibus-dp slave station in the described target single module and the tributary address of each profibus-dp slave station, according to described target data, the predetermined number of the data volume of described target data and described profibus-dp slave station, determine to carry out with interior each the profibus-dp slave station of described target single module the slave station data of transfer of data, first visit data that will comprise first tributary address and first slave station data corresponding with described first tributary address, adopt the profibus-dp agreement to be sent to described target single module by described modular converter, behind first reply data that receives described target single module feedback, next visit data that will comprise next tributary address and next slave station data corresponding with described next tributary address, adopt the profibus-dp agreement to be sent to described target single module by described modular converter, and the like each the profibus-dp slave station in the described target single module of traversal;
The modular converter that links to each other with described main control module;
At least one single module, each single module inside comprises the profibus-dp slave station of predetermined number, described profibus-dp slave station comprises the UART module, receiver module, sending module, control module, memory module and bus interactive interface module, described at least one single module, after the described UART module that is used for each profibus-dp slave station determines that main control module sends the baud rate of described visit data, lock described baud rate and receive visit data, and after verification is correct, be sent to described receiver module in this profibus-dp slave station, the described receiver module of each profibus-dp slave station carries out protocol analysis according to the profibus-dp agreement to described visit data and obtains target tributary address in the described visit data, if the tributary address of a profibus-dp slave station is consistent with described target tributary address, then this profibus-dp slave station is target profibus-dp slave station, described target profibus-dp slave station continues that according to the profibus-dp agreement described visit data is carried out protocol analysis and obtains target slave station data, described control module in the described target profibus-dp slave station is stored to described target slave station data in the memory module in the described target profibus-dp slave station, bus interactive interface module in the described target profibus-dp slave station is carried out data interaction according to described target slave station data and extraneous man-machine interface and is obtained reply data, and described reply data fed back to UART module in the described target profibus-dp slave station, UART module in the described target profibus-dp slave station is sent to sending module in the described target profibus-dp slave station with described reply data, feed back described reply data to described main control module by sending module, re-execute above-mentioned steps, each the profibus-dp slave station in the described target single module of traversal.
CN201310308529.5A 2013-07-18 2013-07-18 Data transmission method and system Active CN103346943B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310308529.5A CN103346943B (en) 2013-07-18 2013-07-18 Data transmission method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310308529.5A CN103346943B (en) 2013-07-18 2013-07-18 Data transmission method and system

Publications (2)

Publication Number Publication Date
CN103346943A true CN103346943A (en) 2013-10-09
CN103346943B CN103346943B (en) 2016-06-15

Family

ID=49281719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310308529.5A Active CN103346943B (en) 2013-07-18 2013-07-18 Data transmission method and system

Country Status (1)

Country Link
CN (1) CN103346943B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105259853A (en) * 2015-11-09 2016-01-20 无锡华东电站自动化仪表厂 A redundant on-site bus I/O control device
CN110687854A (en) * 2019-11-05 2020-01-14 杭州和利时自动化有限公司 PA bus controller and PA bus control system
CN110941179A (en) * 2019-12-09 2020-03-31 杭州和利时自动化有限公司 Undisturbed downloading method, device and equipment and readable storage medium
CN111464419A (en) * 2020-04-13 2020-07-28 中国人民解放军国防科技大学 Data transmission control method based on bus network communication

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221438A (en) * 2008-01-11 2008-07-16 四川航空工业川西机器厂 Electrical control workstation of macrotype isostatic pressing machine
CN101454731A (en) * 2006-06-01 2009-06-10 索尤若驱动有限及两合公司 Addressing device and method, and converter
CN201673398U (en) * 2010-05-14 2010-12-15 盛云科技有限公司 On site bus cluster curing barn centralized control system
CN202362658U (en) * 2011-11-28 2012-08-01 苏州普思自动化科技有限公司 High-speed field bus control system based on optical fiber

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101454731A (en) * 2006-06-01 2009-06-10 索尤若驱动有限及两合公司 Addressing device and method, and converter
CN101221438A (en) * 2008-01-11 2008-07-16 四川航空工业川西机器厂 Electrical control workstation of macrotype isostatic pressing machine
CN201673398U (en) * 2010-05-14 2010-12-15 盛云科技有限公司 On site bus cluster curing barn centralized control system
CN202362658U (en) * 2011-11-28 2012-08-01 苏州普思自动化科技有限公司 High-speed field bus control system based on optical fiber

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105259853A (en) * 2015-11-09 2016-01-20 无锡华东电站自动化仪表厂 A redundant on-site bus I/O control device
CN110687854A (en) * 2019-11-05 2020-01-14 杭州和利时自动化有限公司 PA bus controller and PA bus control system
CN110687854B (en) * 2019-11-05 2021-07-30 杭州和利时自动化有限公司 PA bus controller and PA bus control system
CN110941179A (en) * 2019-12-09 2020-03-31 杭州和利时自动化有限公司 Undisturbed downloading method, device and equipment and readable storage medium
CN110941179B (en) * 2019-12-09 2023-03-31 杭州和利时自动化有限公司 Undisturbed downloading method, device and equipment and readable storage medium
CN111464419A (en) * 2020-04-13 2020-07-28 中国人民解放军国防科技大学 Data transmission control method based on bus network communication

Also Published As

Publication number Publication date
CN103346943B (en) 2016-06-15

Similar Documents

Publication Publication Date Title
CN102947813B (en) For the method by CANopen bus transfer data
CN100521637C (en) Optical fiber-based high speed serial industrial real-time communication bus system and its control method
CN103095538B (en) Multi-class industrial Ethernet bus integrated master station
CN105119907A (en) FPGA-based BiSS-C communication protocol method
CN104702474A (en) FPGA (Field Programmable Gate Array)-based EtherCAT (Ethernet Control Automation Technology) main station device
CN101374082A (en) Single bus sensor network protocol
CN107819659B (en) Intelligent cascade communication network based on SPI
CN105187283A (en) Industrial control network slave station communication method and device based on EtherCAT protocol
CN105939253A (en) Industrial wireless gateway device and protocol conversion method thereof
CN103346943A (en) Method and system of data transmission
CN212163361U (en) Two main station controller communication systems
CN103827760A (en) Method for transmitting a process map via a gateway device
CN101013315A (en) General numerical control system based on full digital ring bus
CN105391486A (en) Spaceborne data communication method and device
CN103685578B (en) The data transmission method of master-slave equipment
CN101145052B (en) Real-time information interactive system between apparatuses and method
CN103914007A (en) Method and system for reprogramming
CN101895462B (en) Serial communication gateway
CN104866399A (en) UM-BUS bus channel fault detection controller and detection method
CN104767664B (en) Method, apparatus and system of a kind of ring-type communication network increase and decrease from node
CN106814646A (en) Method for controlling manufacturing machine system and apparatus for controlling manufacturing machine system
CN105307282A (en) Method and device for preventing access collision of multiple user terminals
CN204463106U (en) UM-BUS bus run Failure Detection Controller
CN113938351A (en) Data acquisition method, system and computer readable storage medium
CN101415027A (en) Communication module based on HDLC protocol, and control method for data real time forwarding and storage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant