CN110311847A - A kind of bulk data transmission method and device - Google Patents

A kind of bulk data transmission method and device Download PDF

Info

Publication number
CN110311847A
CN110311847A CN201910559877.7A CN201910559877A CN110311847A CN 110311847 A CN110311847 A CN 110311847A CN 201910559877 A CN201910559877 A CN 201910559877A CN 110311847 A CN110311847 A CN 110311847A
Authority
CN
China
Prior art keywords
modbus
message
request message
request
sending
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
CN201910559877.7A
Other languages
Chinese (zh)
Other versions
CN110311847B (en
Inventor
贺学文
智艳利
李元鹏
黄亮
李剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Helishi System Integration Co ltd
Original Assignee
Beijing Hollysys Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Hollysys Co Ltd filed Critical Beijing Hollysys Co Ltd
Priority to CN201910559877.7A priority Critical patent/CN110311847B/en
Publication of CN110311847A publication Critical patent/CN110311847A/en
Application granted granted Critical
Publication of CN110311847B publication Critical patent/CN110311847B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40228Modbus

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

This application discloses a kind of bulk data transmission method and device, the bulk data transmission method includes generating n Modbus request message, and according to n Modbus request message described in preset order Batch sending, n is the integer more than or equal to 1;In preset timeout interval, m Modbus response message of return is received, and Modbus response message determines whether this Batch sending succeeds based on the received, wherein m is 0 to the integer between n.The application receives a plurality of Modbus response message of return by a plurality of Modbus request message of Batch sending and in preset timeout interval, substantially reduces the time of data transmission, brought error when greatly having reduced or remitted delay to slave station school.

Description

A kind of bulk data transmission method and device
Technical field
This application involves but be not limited to field of communication technology more particularly to a kind of bulk data transmission method and device.
Background technique
Modbus agreement is the widely applied response communication protocol of industrial automation, has become universal industrial mark It is quasi-.One feature of response communication protocol is first to ask first obtain, successively reply.Modbus agreement be divided into based on serial ports (RS-232, RS-422, RS-485) Modbus RTU (Remote Terminal Unit, RTU, remote-terminal unit) agreement and based on pass Transport control protocol view/Internet Protocol (Transmission Control Protocol/Internet Protocol, TCP/IP Modbus Transmission Control Protocol).As shown in Figure 1, Modbus communication using main (Master, also referred to as main website)-from (Slave, also referred to as slave station, equipment) technology, (Query is also queries/requests to main website initial transmission, and successively inquiry is known as taking turns Ask), slave station makes respective reaction according to the data that main website inquiry provides.Main website can individually and slave station communication, also can be with broadcaster Formula and all slave station communications.If individually communication, slave station returns to a message and is used as response, if it is what is inquired with broadcast mode, Then slave station does not make any response.
In Modbus agreement, only just there is the right for initiating Query in main website, after slave station only receives Query, just has the right Benefit sends response (Response) message to main website.In other words, in Modbus agreement, main website can only pass through Query/ Response could obtain the data of slave station, and slave station cannot send any message in main website active forever.As shown in Fig. 2, main website The a certain moment sends a request to slave station, after slave station receives request, recognizes to request, and sends response message to main website As the receipt for giving main website, this queued session is successfully completed after main website receives response message.In Fig. 2, we remember once Request/response time is Ts, it may be assumed that since main website sends a request timing, slave station receives request and carries out internal place Reason, then slave station sends response message to main website, and it is that timing terminates corresponding interval time that main website, which receives slave station response,.It is aobvious So, Ts is consisted of three parts, one is receiving the time interval of request, Wo Menji to slave station from main website sends a request For Ta;The second is slave station carries out the time loss of inter-process to the request, we are denoted as Tb;Thirdly when, slave station is sent out to main website Response message is sent, main website receives the time interval of slave station response, we are denoted as Tc.That is Ts=Ta+Tb+Tc.
As shown in figure 3, main website is successively read a request from polling list polling table, as this request to be sent, then basis The request, which generates, sends message, starts overtime timer (assuming that time-out time is TimeOut) after being successfully transmitted message.If main It stands within the TimeOut time, has been successfully received the response message of equipment, main website can handle the response message, then main website meeting Into sending armed state next time;If main website within the TimeOut time, could not be successfully received the response message of equipment, Then think this time to request to fail, main website enters timeout treatment, and (note is primary to send failure, continuously then needs to carry out link when failure Reconnection), then main website, which can enter, sends armed state next time, so in cycles.
Modbus agreement is as typical request/response type communication protocol, conventional process always question-response, i.e. last time Request otherwise time-out or obtain response, can just enter transmission request next time.In the practical application of Modbus agreement In, a certain operation is encountered sometimes need to complete comprising n times request/response, for example, certain containing enabled bit manipulation Remote control operation, temporal information operate when including the school in a plurality of message.When these remote control operations and school, naturally also by asking Ask/response combination completes, so, under old process, when this kind of remote control and school is also the serial synchronous by question-response It operates to complete.
Under conventional method, operation follows strictly the old process of Modbus specification when above-mentioned remote control and school, and process is cumbersome, behaviour It is tediously long to make the time, operates when especially for school, the operating time is longer, and brought time correction error is often bigger.
Summary of the invention
This application provides a kind of bulk data transmission method and devices, can substantially shorten the time of data transmission.
The embodiment of the invention provides a kind of bulk data transmission methods, comprising:
N Modbus request message is generated, and according to n Modbus request message described in preset order Batch sending, In, n is the integer more than or equal to 1;
In preset timeout interval, m Modbus response message of return, and Modbus based on the received are received Response message determines whether this Batch sending succeeds, wherein m is 0 to the integer between n.
In a kind of exemplary embodiment, described according to n Modbus request message described in preset order Batch sending When, the method also includes:
The exclusive mark of setting, during the exclusive mark is for the n Modbus request message described in Batch sending, Forbid the transmission of other messages in addition to the n Modbus request message.
In a kind of exemplary embodiment, the time for sending the n Modbus request message is TAb, completes n times batch The time sent and received is TBb,
TAb=(n-1) * (Ta+T0)+Ta,
TBb=(n-1) * (Ta+T0)+Ts,
Wherein: * is multiplication sign, and Ta is from main website sends a request message, between the time for receiving request message to slave station Every;
T0 is that main website sends interval time;
Ts=Ta+Tb+Tc;
Tb is the time loss that slave station carries out inter-process to the request message;
Tc is that the time interval of slave station response message is received to main website from slave station sends a response message to main website.
In a kind of exemplary embodiment, in n-1 request message before sequence is sent, overtime TimeOut is not started Timer only just starts TimeOut timer after sending nth request message.
In a kind of exemplary embodiment, the n Modbus request message of generation the step of after and it is described according to Described in preset order Batch sending the step of n Modbus request message before, the method also includes:
One or more in the n Modbus request message is configured as crucial request message;
The response message of Modbus based on the received determines whether this Batch sending succeeds, comprising:
If had received in the preset timeout interval and the one-to-one institute of all crucial request messages Modbus response message is stated, then determines the success of this Batch sending;
If be not received by the preset timeout interval one-to-one with all crucial request messages The Modbus response message then determines that this Batch sending fails.
In a kind of exemplary embodiment, the Modbus request message includes Modbus TCP message or Modbus RTU Message;The Modbus response message includes Modbus TCP message or Modbus RTU message.
In a kind of exemplary embodiment, when the Modbus request message and the Modbus response message are Modbus When TCP message, as soon as being often successfully transmitted a request message, which is saved in local first and sends request list AQS, Comprising the effective information of n request message in AQS, in addition, further including RF and the KQ mark of each request message, wherein RF Mark is used to indicate whether to receive response message corresponding with the request message, KQ mark be used to indicate the request message whether be Crucial request message.
In a kind of exemplary embodiment, when the Modbus request message and the Modbus response message are Modbus When RTU message, n request message of generation is stored in local second before sending and sends request list TM, alternatively, being sent out in batch It send and these request messages is successfully sequentially stored into TM afterwards;Comprising the effective information of n request message in TM, in addition, further including The RF and KQ of each request message indicate, wherein RF mark is used to indicate whether to receive response report corresponding with the request message Text, KQ mark are used to indicate whether the request message is crucial request message.
The embodiment of the invention also provides a kind of bulk data transfer devices, including processor and memory, in which: described Processor is for executing the program stored in memory, to realize the step of the bulk data transmission method as described in any of the above item Suddenly.
The embodiment of the invention also provides a kind of bulk data transfer devices, including Batch sending module and batch to receive mould Block, in which:
Batch sending module, for generating n Modbus request message, and according to n item described in preset order Batch sending Modbus request message, wherein n is the integer more than or equal to 1;
Batch receiving module, for receiving m Modbus response message of return in preset timeout interval, And Modbus response message determines whether this Batch sending succeeds based on the received, wherein m is 0 to the integer between n.
Compared with the relevant technologies, the bulk data transmission method and device of the application pass through a plurality of Modbus of Batch sending Request message and in preset timeout interval, receives a plurality of Modbus response message of return, substantially reduces data The time of transmission, brought error when greatly having reduced or remitted delay to slave station school.
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 one of the relevant technologies Modbus master-slave communication network diagram;
Fig. 2 is one of the relevant technologies Modbus agreement master-slave communication routine sequence figure;
Fig. 3 is the flow diagram of one of the relevant technologies Modbus data transmission method;
Fig. 4 is that one of the relevant technologies six step of Modbus is remotely controlled flow diagram;
Flow diagram when Fig. 5 is one of the relevant technologies six step school Modbus;
Fig. 6 is a kind of flow diagram of bulk data transmission method of the embodiment of the present invention;
Fig. 7 is the flow diagram of another bulk data transmission method of the embodiment of the present invention;
Fig. 8 is the Modbus master-slave communication network diagram of the embodiment of the present invention;
Fig. 9 is a kind of mass-produced remote control flow diagram of the embodiment of the present invention;
Flow diagram when Figure 10 is a kind of batch school of the embodiment of the present invention;
Figure 11 is a kind of structural schematic diagram of bulk data transfer device of the embodiment of the present invention.
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.
Modbus rtu protocol is the widely applied response communication protocol of industrial automation, has become fieldbus (Fieldbus) industrial standard.HMS industrial network Co., Ltd, Sweden publication newest industrial network market report show, Modbus rtu protocol is sure to occupy the share in global fieldbus market second.
Modbus rtu protocol can be based on each of RS-232, RS-422, two-wire system RS-485 and four-wire system RS-485 Kind serial ports standard (hereinafter referred to as serial ports) is communicated, and wherein two-wire system RS-485 uses half-duplex operation, i.e., when any Time can only have a little in transmission state, other serial ports standards are all full-duplex modes, i.e. the data receiver of these serial ports It is to separate with sending, can supports data receiver and transmission simultaneously.Therefore, the application layer communication association based on full duplex serial port View, provides application layer Batch sending and received possibility.
The application based on the bulk data transfer scheme works of Modbus rtu protocol in full duplex serial port operating mode.
Modbus TCP message be the protocol Data Unit unrelated with Base communication layer (Protocol Data Unit, PDU) it is embedded into the application layer of Open System Interconnection (Open System Interconnection, OSI) model, and adds preceding Add the header of 6 bytes, while the verification for removing Modbus rtu protocol end and part are (because Transmission Control Protocol itself is containing cyclic redundancy Check (CRC) 32 verification and), and constitute frame.The request of TCP/acknowledgement mechanism can be good with the master/slave mechanism of Modbus itself Cooperating.
Modbus TCP message format composition:
Header Function code Data
Header description:
Each field description is as follows:
1) Transaction Identifier is matched for affairs.Modbus server-side copies the affairs from client request in response Mark.
Request and response are corresponding by Transaction Identifier.Therefore, in the same time, the Transaction Identifier of TCP connection must be Uniquely.Standard committee is recommended, and Transaction Identifier might as well use simple count --- message sequence number (abbreviation serial number), main website Add 1 when request every time.The appearance of Modbus Transmission Control Protocol has had more than ten years so far, and mainstream vendor can use the recommendation of standard, It is exactly serial number that i.e. Transaction Identifier is practical.
2) protocol-identifier, for the polynary mark in system.' 0 ' mark of Modbus agreement.
3) length field is with byte count, including unit marks and data field.
4) unit marks, for routing in system.Its typical case is request and server response message return value at this Field value must be identical.
In some cases, unit marks carry the Modbus slave addresses of remote equipment.But in TCP layer, Modbus clothes Business end is addressed with its IP address, therefore Modbus unit marks are just without practical significance.The field value is 0xFF at this time.
But if slave station has the subnet of oneself, then device address is also possible to 1~247.
The application of serial number:
I) for each information, main website can initialize to slave station and generate serial number;
II) response message of slave station should use the identical serial number issued from main website;
III) main website should confirm that the serial number received from slave station is identical as the serial number for being sent to slave station before;
The principle of main website increase serial number numerical value:
A) serial number is stored with two bytes;
B) range of serial number should be (0-65535) or (0x0000to 0xFFFF);
C) start numbers of serial number should be 0;
D) the message of sending each for main website, including be used for normal poll, failure poll, retry information or control, it is main 1 should all be increased serial number numerical value by standing;
E) if the serial number of the response message of main website discovery slave station is wrong, the information should be ignored, and announce to communicate State is not good enough.
To sum up, Modbus Transmission Control Protocol has following key features:
(1) two bytes of the starting of Modbus Transmission Control Protocol message are known as " Transaction Identifier ", and practical is exactly serial number.
(2) main website determines the value of serial number, and the serial number in the necessary duplicate requests of slave station is as response.
(3) the primary request of the every transmission of main website, serial number can all add one.
Assuming that the application scenarios of following two Modbus agreement (Modbus rtu protocol or Modbus Transmission Control Protocol):
Application scenarios 1 under conventional method: as shown in figure 4, some remote control from station arrangement, needs point 6 steps, be respectively: distant Control enables, remote control executes, the enabled cancellation of remote control, remote control is enabled, remote control executes clearing, remote control enables to cancel.It, should under regular situation The complete procedure of remote control needs a point six wheel responses, is respectively as follows: 1) main website transmission remote control and enables, slave station response remote control is enabled;2) main It after station receives the enabled response of remote control, sends remote control and executes, slave station response remote control executes;3) after main website receives remote control execution response, The enabled cancellation of remote control is sent, slave station response remote control is enabled to be cancelled;4) after main website receives the enabled cancellation of remote control, transmission remote control is enabled, Slave station response remote control is enabled;5) it after main website receives the enabled response of remote control, sends remote control and executes clearing, slave station response remote control executes clear Zero;6) it after main website receives remote control execution clearing response, sends and is remotely controlled enabled cancellation, slave station response is remotely controlled enabled cancellation, and main website is received Epicycle remote control operation is completed after to the enabled cancellation of remote control.
Application scenarios 2 under conventional method: as shown in figure 5, when some is from the school of station arrangement, point 6 steps are needed, main website is successively sent out The message of function code 6 is sent, year, month, day, hour, min in main station time, second are successively carried in message.
When carrying out serial communication using Modbus rtu protocol, Ta and Tc all with message byte number and serial communication Baud rate (hereinafter referred to as baud rate) correlation and baud rate directly proportional with message byte number is inversely proportional, in classics Under 9600bps baud rate, the time-consuming for transmitting a byte is about 1 millisecond.Tb is then related with slave station equipment, depends on device hardware Performance and its software processing capability, general Tb is between 5~20 milliseconds.
For the ease of illustrating, it is 9600bps that we, which might as well take baud rate, then the time-consuming for transmitting a byte is about 1 millisecond. The message length of the example request (function code 1,2,3,4,5,6) of one Modbus RTU is 8 bytes, at this point, Ta=8 milliseconds; The length of the response message of function code 1,2,3,4 depends on corresponding points in request, 6~256 byte of value range, then Tc= 6~256 milliseconds;Function code 5,6 should message be also 8 bytes, at this point, Tc=8 milliseconds.
In Modbus communication, main website leads to before sending next request after receiving the upper slave station response once requested Certain active rest time, abbreviation main website delay time or main website interval time (being denoted as T0) are often needed, purpose has two It is a: first is that control master-slave communication both sides communication flows, second is that if T0 be 0 (indicate main website receive it is upper once request from Stand after response, send next request immediately) when, some slave stations are often handled to come over, and may result in communication abnormality even It interrupts.The value range of T0 is usually 0~100 millisecond.
We remember that the time for completing n times Batch sending is TA, complete n times Batch sending and the received time is TB.
For the ease of difference, we are special to remember TA TAa, TB when communicating using traditional Modbus agreement For TBa;Note using the bulk data transmission scheme of the application when being communicated, TA TAb, TB TBb.
As shown in Fig. 2, under conventional method, transmission next time have to wait for last time send/finish receiving after just will do it, 1st~(n-1) transmission/received time is (Ts+T0), and the sending time of n-th is Ta, transmission/receiving time of n-th For Ts.Ts=Ta+Tb+Tc, therefore,
TAa=(n-1) * (Ts+T0)+Ta------- (1)
TBa=(n-1) * (Ts+T0)+Ts------- (2)
Embodiment batch data transmission method
As shown in fig. 6, including the following steps: the embodiment of the invention provides a kind of bulk data transmission method
Step 601: generating n Modbus request message, and according to n Modbus request described in preset order Batch sending Message, wherein n is the integer more than or equal to 1;
In a kind of exemplary embodiment, the Modbus request message includes Modbus RTU message or Modbus TCP Message.
In a kind of exemplary embodiment, described according to n Modbus request message described in preset order Batch sending When, the method also includes:
The exclusive mark of setting, during the exclusive mark is for the n Modbus request message described in Batch sending, Forbid the transmission of other messages in addition to the n Modbus request message.
In this embodiment, in n Modbus request message of Batch sending, exclusive mark (abbreviation Lock), which is arranged, is True, it is false that batch request, which is sent postposition Lock, to ensure main website in the n Modbus request message phase of Batch sending Between, it is not inserted into any other request.Why other request can be possibly inserted into? because main website sends and receives often Two independent threads, it is possible to after n times batch request is sent to the request of xth (x < n) item, having answered for slave station is just received, At this moment the reception call back function of main website can be triggered, main website can be identified normally, handle reception message, if identified without Lock, Main website may trigger new round request, so as to cause unexpected request is inserted into after xth is requested.There is Lock mark, even if Main website receives slave station response during Batch sending, after main website normally receives processing, is then identified as true checking Lock When, main website will not generate new request, to avoid main website during Batch sending request, be inserted into any other request.
After the bulk transfer scheme of the application, transmission next time only need to wait for last time be sent completely after can be into Row, the time that the 1st~(n-1) is sent is (Ta+T0), and the sending time of n-th is Ta, i.e. and TAb=(n-1) * (Ta+T0)+ Ta.In the following, we calculate TBb, we only need to calculate after n-th of request send, when main website receives its response when TBb can be calculated by carving (being denoted as TimeN), because a feature of response communication protocol is first to ask first obtain, successively reply, As long as illustrating that main website has centainly collected the complete of front (n-1) a request before this so main website receives the response of n-th of request Portion's response.According to agreement, transmission/receiving time of any one request is Ts=Ta+Tb+Tc, therefore, in the application, n-th Transmission/receiving time be also Ts.Therefore:
TAb=(n-1) * (Ta+T0)+Ta;
TBb=(n-1) * (Ta+T0)+Ts.
In a kind of exemplary embodiment, in the step according to n Modbus request message described in preset order Batch sending After rapid, the method also includes:
The Modbus request message deposit of transmission is sent in request queue.
In a kind of exemplary embodiment, after the step of generating n Modbus request message and according to preset order Described in Batch sending the step of n Modbus request message before, the method also includes:
One or more in n Modbus request message is configured as crucial request message.
In a kind of exemplary embodiment, preset transmission interval is set between the Modbus request message of every two transmissions Time, to facilitate slave station to recognize different requests and enable what slave station handled to come.
In a kind of exemplary embodiment, main website does not start time-out in n-1 request message before sequence is sent TimeOut timer only just starts TimeOut timer after sending nth request message.
Step 602: in preset timeout interval, receiving m Modbus response message of return, and according to reception Modbus response message determine whether this Batch sending succeeds, wherein m is 0 to the integer between n.
It should be noted that since Modbus Transmission Control Protocol and Modbus rtu protocol have following difference:
1, physically Ethernet Transmission Control Protocol is full duplex, and communication node over ethernet can send and receive simultaneously;
It 2, include " packet serial number " field (i.e. serial number) in Modbus Transmission Control Protocol message as the application layer protocol of TCP, Principal and subordinate both sides may be by " packet serial number " clearly to recognize the Modbus TCP message for receiving a rule in data flow;
It therefore, can be according to Modbus TCP response report when being parsed to received Modbus TCP response message The particular content of packet sequence number field and message in text is parsed;It is parsed to received Modbus RTU response message When, it can be parsed according to the particular content of Modbus RTU response message.
In a kind of exemplary embodiment, after the step of receiving the m Modbus response message returned, the method Further include:
It determines the corresponding Modbus request message of every Modbus response message, and modifies corresponding in transmission request queue (Response Flag, 0 is initial state to the reception flag RF of Modbus request message, and 1, which indicates that this request has had successfully received, sets The reception flag of n that standby response, RF1, RF2 ... ..., RFn respectively indicate request 1,2 ... ...).
In a kind of exemplary embodiment, whether the response message of Modbus based on the received determines this Batch sending Success, comprising:
It is corresponded if had received in preset timeout interval with the Modbus request message of all transmissions Modbus response message, then determine this Batch sending success;
If be not received by preset timeout interval a pair of with the Modbus request message one of all transmissions The Modbus response message answered then determines that this Batch sending fails.
In another exemplary embodiment, the response message of Modbus based on the received determines that this Batch sending is No success, comprising:
If had received in preset timeout interval and the one-to-one Modbus of all crucial request messages Response message then determines the success of this Batch sending;
If be not received by preset timeout interval one-to-one with all crucial request messages Modbus response message then determines that this Batch sending fails.
In a kind of exemplary embodiment, the method also includes:
If it is determined that this Batch sending success, delete send request queue described in transmission Modbus request message and It indicates;
If it is determined that this Batch sending fails, detect whether to need to retransmit;If necessary to retransmit, according to preset order weight N Modbus request message described in new Batch sending;If you do not need to retransmitting, deletes and send transmission described in request queue Modbus request message and its mark.
In a kind of exemplary embodiment, it will be assumed that some operation needs to complete comprising n times request/response, Corresponding n times request and response are denoted as respectively: Q1/R1, Q2/R2 ... ..., Qn/Rn.
As shown in fig. 7, whether main website first checks for currently needing Batch sending to request, if it is not required, then into principal and subordinate General communication process;If it is required, then requesting process into Batch sending.
Illustratively, in Batch sending request process, if using Modbus Transmission Control Protocol, first it is sequentially generated this Then secondary n request Q1, Q2 ... ..., Qn for needing Batch sending successively sends request Q1, Q2 ... ..., Qn are often successfully transmitted As soon as the request is saved in local first and sends request list (Array of Querys Sent, abbreviation AQS) by request, It further include that (Key Query, 1 indicates the request, and whether key is asked by RF (Response Flag, initial value 0) and KQ in AQS Ask, default value 1, the KQ of all requests is that all requests of 1 expression require to return to school), and using " packet serial number " as the subscript of AQS Index (it is respectively SN1, SN2 ... ..., SNn that we, which remember that this n times requests " packet serial number " corresponding with response).Note that at this n It is typically required for certain transmission interval time (being denoted as T0) between two requests in request, the reason is that facilitating slave station identification different Request and enable what slave station handled to come, T0 defaults 5 milliseconds and adjustable configuration, the minimum usable levels of T0 often take Certainly in slave station equipment, general T0 is directly given by slave station side or is provided according to actual test.It illustrates, T0 is device attribute The special parameter that parameter, absolutely not this patent are specially required or relied on, is no longer further described here.Main website is successively being sent After success all n request Q1, Q2 ... ..., Qn, start overtime timer, (TimeOut is generally time-out time TimeOut It 1000 milliseconds, can configure).Equipment can successively reply R1, R2 ... ..., Rn after receiving request sequence, and main website is from receiving data In stream, " packet serial number " Lai Yici in information is especially sent according to the transmission information in AQS and parses R1, R2 ... ..., Rn, The juxtaposition value RF that returns to school accordingly is 1 to indicate that main website has been successfully received R1, R2 ... ..., Rn.Main website is handled in each reception Afterwards, check the RF value for the request that all KQ are 1 in AQS, if main website within the TimeOut time, request that all KQ are 1 RF is 1, then it represents that the responses of whole crucial requests has been properly received, since the KQ of usual all requests is that 1 (can match Set), therefore usually mean that and have received all request R1, the response of R2 ... ..., Rn, at this point, stop TimeOut timer, And declare that this time batch request sends affairs success, affairs are sent into next round;If reached in TimeOut overtime timer When, as long as the RF for the request that any one KQ is 1 in AQS is not 1, then it represents that fail and receive answering for all crucial requests It answers, then declaration this time batch request sends failure, if necessary to retransmit, then enters retransmission procedure, if do not retransmitted, removes AQS And its mark, then enter next round and sends affairs.
Illustratively, in Batch sending request process, if using Modbus rtu protocol, main website generates n item Sequence sends message (this n item sequence message is successively denoted as Q1, Q2 ..., Qn-1, Qn), and deposit is local before sending for these requests Second transmission request list (is denoted as TM, includes Q1, Q2 ..., Qn-1 in TM, Qn effective information, each request further includes RF and KQ Mark, RF and KQ meaning and usage are same as above) (deposit local second can also be requested to send out these after main website is successively sent successfully Send request list TM).Main website starts overtime timer after successively sending successfully all n request Q1, Q2 ... ..., Qn, surpasses When time TimeOut (TimeOut is generally 1000 milliseconds, can configure).Equipment can be replied successively after receiving request sequence R1, R2 ... ..., Rn, main website transmit information to successively parse R1, R2 ... ..., Rn according in TM from receiving in data flow, The juxtaposition value RF that returns to school accordingly is 1 to indicate that main website has been successfully received R1, R2 ... ..., Rn.Main website is handled in each reception Afterwards, check the RF value for the request that all KQ are 1 in TM, if main website within the TimeOut time, request that all KQ are 1 RF is 1, then it represents that the responses of whole crucial requests has been properly received, since the KQ of usual all requests is that 1 (can match Set), therefore usually mean that and have received all request R1, the response of R2 ... ..., Rn, at this point, stop TimeOut timer, And declare that this time batch request sends affairs success, affairs are sent into next round;If reached in TimeOut overtime timer When, as long as the RF for the request that any one KQ is 1 in TM is not 1, then it represents that it fails and receives the response of all crucial requests, Then declaration this time batch request send failure, if necessary to retransmit, then enter retransmission procedure, if do not retransmitted, remove TM and its Mark, and enter new round answering.Obviously, as n=1, the application and conventional question-response mode are completely the same.
As shown in figure 8, bulk transfer scheme of the main website according to the application, batch persistently sends four requests, and slave station is successively Sequence recognizes this four requests, and successively replys corresponding four response messages to main website, this figure is more vivid to be illustrated originally Application executes asynchronism and concurrency treatment effect when batch is requested.It is asynchronous refer to do not need etc. after a request to be answered to send out Send next request;Concurrently refer within one continuous time, main website persistently send it is multiple request and period without equipment response.
Two bulk data transfer device of embodiment
The embodiment of the invention also provides a kind of bulk data transfer devices, including processor and memory, in which: described Processor is for executing the program stored in memory, to realize the step of the bulk data transmission method as described in any of the above item Suddenly.
Three bulk data transfer device of embodiment
As shown in figure 11, the embodiment of the invention also provides a kind of bulk data transfer devices, including Batch sending module 1101 and batch receiving module 1102, in which:
Batch sending module 1101, for generating n Modbus request message, and according to described in preset order Batch sending N Modbus request message, wherein n is the integer more than or equal to 1;
Batch receiving module 1102, for receiving m Modbus response report of return in preset timeout interval Text, and Modbus response message determines whether this Batch sending succeeds based on the received, wherein m is 0 to the integer between n.
In a kind of exemplary embodiment, the Modbus request message includes Modbus RTU message or Modbus TCP Message;The Modbus response message includes Modbus RTU message or Modbus TCP message.
In a kind of exemplary embodiment, when the Modbus request message and the Modbus response message are Modbus When TCP message, as soon as Batch sending module 1101 is often successfully transmitted a request message, which is saved in local first Request list AQS is sent, includes the effective information of n request message in AQS, in addition, further including the RF of each request message Indicate with KQ, wherein RF mark is used to indicate whether to receive response message corresponding with the request message, and KQ mark is used to indicate Whether the request message is crucial request message.
In a kind of exemplary embodiment, when the Modbus request message and the Modbus response message are Modbus When RTU message, n request message of generation is stored in local second before sending and sends request list by Batch sending module 1101 TM, alternatively, these request messages are sequentially stored into TM after the success of main website Batch sending;It include n request message in TM Effective information, in addition, further including RF and the KQ mark of each request message, wherein RF mark is used to indicate whether to receive and be somebody's turn to do The corresponding response message of request message, KQ mark are used to indicate whether the request message is crucial request message.
In a kind of exemplary embodiment, the Batch sending module 1101 is also used to:
When according to n Modbus request message described in preset order Batch sending, exclusive mark, the exclusive mark are set During knowledge for the n Modbus request message described in Batch sending, forbid in addition to the n Modbus request message Other messages transmission.
In a kind of exemplary embodiment, it is assumed that Batch sending module 1101 sends the n Modbus request message Time is TAb, and batch receiving module 1102 completes n times Batch sending and the received time is TBb, then:
TAb=(n-1) * (Ta+T0)+Ta,
TBb=(n-1) * (Ta+T0)+Ts,
Wherein: * is multiplication sign, and Ta is from main website sends a request message, between the time for receiving request message to slave station Every;
T0 is that main website sends interval time;
Ts=Ta+Tb+Tc;
Tb is the time loss that slave station carries out inter-process to the request message;
Tc is that the time interval of slave station response message is received to main website from slave station sends a response message to main website.
In a kind of exemplary embodiment, Batch sending module 1101 is in n-1 request message before sequence is sent, not Start time-out TimeOut timer, only just starts TimeOut timer after sending nth request message.
In a kind of exemplary embodiment, the Batch sending module 1101 is also used to:
After according to n Modbus request message described in preset order Batch sending, the Modbus of the transmission is asked Message deposit is asked to send in request queue.
In a kind of exemplary embodiment, the Batch sending module 1101 is also used to: configuring the n Modbus request One or more in message is crucial request message.
In a kind of exemplary embodiment, every two Modbus request messages that the Batch sending module 1101 is sent it Between preset transmission interval time is set, to facilitate slave station to recognize different requests and enable what slave station handled to come.
In a kind of exemplary embodiment, the batch receiving module 1102 is also used to:
Determine the corresponding Modbus request message of every Modbus response message, and modify it is right in the transmission request queue The reception flag for the Modbus request message answered.
In a kind of exemplary embodiment, the response message of Modbus based on the received of the batch receiving module 1102 is sentenced Whether this fixed Batch sending succeeds, comprising:
It is corresponded if had received in preset timeout interval with the Modbus request message of all transmissions Modbus response message, then determine this Batch sending success;
If be not received by preset timeout interval a pair of with the Modbus request message one of all transmissions The Modbus response message answered then determines that this Batch sending fails.
In another exemplary embodiment, the Modbus response message based on the received of the batch receiving module 1102 Determine whether this Batch sending succeeds, comprising:
If had received in preset timeout interval and the one-to-one Modbus of all crucial request messages Response message then determines the success of this Batch sending;
If be not received by preset timeout interval one-to-one with all crucial request messages Modbus response message then determines that this Batch sending fails.
In a kind of exemplary embodiment, the batch receiving module 1102 is also used to:
If it is determined that the success of this Batch sending, deletes the Modbus request message for sending transmission described in request queue;
If it is determined that this Batch sending fails, detect whether to need to retransmit;If necessary to retransmit, according to preset order weight N Modbus request message described in new Batch sending;If you do not need to retransmitting, deletes and sent described in the transmission request queue Modbus request message.
After the bulk transfer scheme of the application, transmission next time only need to wait for last time be sent completely after can be into Row, the time that the 1st~(n-1) is sent is (Ta+T0), and the sending time of n-th is Ta, i.e. and TAb=(n-1) * (Ta+T0)+ Ta.In the following, we calculate TBb, we only need to calculate after n-th of request send, when main website receives its response when TBb can be calculated by carving (being denoted as TimeN), because a feature of response communication protocol is first to ask first obtain, successively reply, As long as illustrating that main website has centainly collected the complete of front (n-1) a request before this so main website receives the response of n-th of request Portion's response.According to agreement, transmission/receiving time of any one request is Ts=Ta+Tb+Tc, therefore, in the application, n-th Transmission/receiving time be also Ts.Therefore:
TAb=(n-1) * (Ta+T0)+Ta------- (3)
TBb=(n-1) * (Ta+T0)+Ts------- (4)
It illustrates, in following presentation and calculating, we conceal unit, it is noted that chronomere is millisecond.
For the ease of difference, we are special to remember when using traditional serial communication, TA TAa1, TB TBa1;Note When being communicated using traditional Modbus Transmission Control Protocol, TA TAa2, TB TBa2.
Under serial interface communication mode, generally:
Ta=8, Tb ∈ [5,20], Tc ∈ [6,256], T0 ∈ [0,100]
We take the minimum value of above four parameters, it may be assumed that Ta=8, Tb=5, Tc=6, T0=0 can obtain Ts=19, substitute into Formula (1)~(4), can obtain:
TAa 1=19n-11------- (5)
TBa 1=19n----------- (6)
TAb1=8n------------ (7)
TBb1=8n+11-------- (8)
As n=1, it is clear that TAa1=TAb1=8=Ta;TBa1=TBb1=19=Ts.
As n=6, TAa1=103, TBa1=114;TAb1=48, TBb1=59.
We take the maximum value of above four parameters, it may be assumed that Ta=8, Tb=20, Tc=256, T0=100 can obtain Ts= 284, formula (1)~(4) are substituted into, can be obtained:
TAa1=292n-284------- (9)
TBa 1=292n-8--------- (10)
TAb1=108n-100------ (11)
TBb1=108n+176------ (12)
As n=1, it is clear that TAa1=TAb1=8=Ta;TBa1=TBb1=284=Ts.
As n=6, TAa1=1468, TBa1=1744, TAb1=548, TBb1=824.
It is Typical Representative value that we, which take above four parameters, it may be assumed that Ta=8, Tb=10, Tc=8, T0=5 can obtain Ts= 26, formula (1)~(4) are substituted into, can be obtained:
TAa1=31n-23------- (13)
TBa1=31n-5-------- (14)
TAb1=13n-5-------- (15)
TBb1=13n+13------ (16)
As n=1, it is clear that TAa1=TAb1=8=Ta;TBa1=TBb1=26=Ts.
As n=6, TAa1=163, TBa1=181, TAb1=73, TBb1=91.
When by the bulk transfer scheme of the application be applied to above-mentioned application scenarios 1: remote control scene when, as shown in figure 9, main website Batch persistently sends six requests, and slave station successively sequentially recognizes this six requests, and successively replys corresponding six to main website and answer Answer message.At typical scene (Ta=8, Tb=10, Tc=8, T0=5), when using conventional one-to-one sending method, send All remote control affairs (TAa) needs 163 milliseconds to one wheel;Using the application bulk transfer scheme when, then only need 73 milliseconds, phase When in the 45% of conventional sending time;When using conventional one-to-one sending method, completing a wheel, all remote control affairs (TAb) is needed Want 181 milliseconds;Using the application bulk transfer scheme when, then only need 91 milliseconds, be equivalent to and have been routinely accomplished the 50% of the time;
When the bulk transfer scheme of the application is applied to above-mentioned application scenarios 2: as shown in Figure 10, main when scene when school Batch of standing persistently sends six requests, and slave station successively sequentially recognizes this six requests, and successively replys corresponding six to main website Response message.In this scenario, we should more pay close attention to the time that equipment receives complete order, it is clear that this value is equal to TA.? Under typical scene (Ta=8, Tb=10, Tc=8, T0=5), when using conventional one-to-one sending method, a wheel is sent all It is remotely controlled affairs (TAa) and needs 163 milliseconds;Using the application bulk transfer scheme when, then only need 73 milliseconds, be equivalent to routine The 45% of sending time;When using conventional one-to-one sending method, completing a wheel, all remote control affairs (TAb) needs 181 millis Second;Using the application bulk transfer scheme when, then only need 91 milliseconds, be equivalent to and have been routinely accomplished the 50% of the time.Further Ground, due to TAb=(n-1) * (Ta+T0)+Ta, for main website, n it is known that as previously mentioned, under serial communication, Ta only and Transmit byte it is related to baud rate, therefore T0 it is also known that.We can calculate TAb=(n-1) * (Ta+T0)+Ta's in advance Value, and time bias is carried out by main website, the time in message=main station time+TAb is being used by the time bias of main website When the bulk transfer scheme of the application, in serial ports full-duplex communication, it is entirely avoided brought mistake when delay is to slave station school Difference.And under conventional sending method, TAa=(n-1) X (Ts+T0)+Ta=(n-1) * (Ta+Tb+Tc+T0)+Ta, not due to Tb It is constant, this brings larger difficulty and error for the compensation of main website.
In TCP/IP ethernet communication, in the case where short message (below 1024 bytes) transmission, Ta and Tc are often only Sensitive to network delay to message length is substantially unrelated.Since the maximum message size of Modbus TCP is only 260 bytes, Under local area network, the value range of Ta and Tc are usually 1~10 millisecond.Tb is then related with slave station equipment, depends on device hardware Energy and its software processing capability, general Tb is between 5~20 milliseconds.That is, in industrial local network, generally:
Ta ∈ [1,10], Tb ∈ [5,20], Tc ∈ [1,10], T0 ∈ [0,100]
We take the minimum value of above four parameters, it may be assumed that Ta=1, Tb=5, Tc=1, T0=0 can obtain Ts=7, substitute into Formula (1)~(4), can obtain:
TAa2=7n-6------- (17)
TBa 2=7n--------- (18)
TAb2=n---------- (19)
TBb2=n+6------- (20)
As n=1, it is clear that TAa2=TAb2=1=Ta;TBa2=TBb2=7=Ts.
As n=6, TAa2=36, TBa2=42;TAb2=6, TBb2=12.
We take the maximum value of above four parameters, it may be assumed that Ta=10, Tb=20, Tc=10, T0=100 can obtain Ts= 40, formula (1)~(4) are substituted into, can be obtained:
TAa 2=140n-130------- (21)
TBa 2=140n-100------- (22)
TAb 2=110n-100------- (23)
TBb 2=110n-70-------- (24)
As n=1, it is clear that TAa2=TAb2=10=Ta;TBa2=TBb2=40=Ts.
As n=6, TAa2=710, TBa2=740, TAb2=560, TBb2=590.
It is Typical Representative value that we, which take above four parameters, it may be assumed that Ta=2, Tb=10, Tc=2, T0=5 can obtain Ts= 14, formula (1)~(4) are substituted into, can be obtained:
TAa2=16n-14------- (25)
TBa2=16n-2-------- (26)
TAb2=7n-5--------- (27)
TBb2=7n+7--------- (28)
As n=1, it is clear that TAa2=TAb2=2=Ta;TBa2=TBb2=14=Ts.
As n=6, TAa2=82, TBa2=94, TAb2=37, TBb2=49.
When by the bulk transfer scheme of the application be applied to above-mentioned application scenarios 1: remote control scene when, in typical scene (Ta =2, Tb=10, Tc=2, T0=5) under, when using conventional one-to-one sending method, send a wheel all remote control affairs (TAa2) 82 milliseconds are needed;Using the application bulk transfer scheme when, then only need 37 milliseconds, be equivalent to conventional sending time 45%;When using conventional one-to-one sending method, completing a wheel, all remote control affairs (TAb2) needs 94 milliseconds;Use this When the bulk transfer scheme of application, then 49 milliseconds are only needed, is equivalent to and has been routinely accomplished the 52% of the time;
When by the bulk transfer scheme of the application be applied to above-mentioned application scenarios 2: when scene when school, in this scenario, I Should more pay close attention to the time that equipment receives complete order, it is clear that this value be equal to TA.Typical scene (Ta=2, Tb=10, Tc=2, T0=5) under, when using conventional one-to-one sending method, sending a wheel, all remote control affairs (TAa2) needs 82 millis Second;Using the application bulk transfer scheme when, then only need 37 milliseconds, be equivalent to the 45% of conventional sending time.Further Ground, due to TAb=(n-1) (Ta+T0)+Ta, for main website, n it is known that T0 is it is known that be left unique variable Ta, such as preceding institute It states, under local area network, Ta is only related to network delay, and Ta is to surround a narrow concussion of definite value T0 ' in most cases, I Can calculate TAb '=(n-1) * (Ta+T0 ')+Ta value in advance, and time bias is carried out by main website, the time in message =main station time+TAb ', by the time bias of main website, using the application bulk transfer scheme when, greatly reduced or remitted and prolonged Brought error when late to slave station school.And under conventional one-to-one sending method, TAa=(n-1) * (Ts+T0)+Ta= (n-1) * (Ta+Tb+Tc+T0)+Ta, this brings larger difficulty and error for the compensation of main website.
The application realizes the Batch sending of a kind of pair of Modbus agreement, the received method of batch, asks one for conventional one The synchronous serial mode answered is converted to the lasting transmission of batch, the again lasting received asynchronism and concurrency mode of batch, asynchronous to refer to one It does not need etc. to be answered to send next request after request;Concurrently refer within one continuous time, main website is lasting Send it is multiple request and period without equipment response.
Under multistep remote control mode, the bulk transfer scheme of the application can substantially compress the sending time of remote control and complete The whole execution time;
It is operated under many more manipulations mode of certain time-sensitives, such as when school, the bulk transfer scheme of the application can be with By the time bias of main website, brought error when greatly deduction and exemption delay is to slave station school;
The bulk transfer scheme of the application is succinctly understandable, without relying on high performance software and hardware, is suitable for any software/hard Part platform.
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 (10)

1. a kind of bulk data transmission method characterized by comprising
N Modbus request message is generated, and according to n Modbus request message described in preset order Batch sending, wherein n For the integer more than or equal to 1;
In preset timeout interval, m Modbus response message of return, and Modbus response based on the received are received Message determines whether this Batch sending succeeds, wherein m is 0 to the integer between n.
2. the method according to claim 1, wherein described according to n item described in preset order Batch sending When Modbus request message, the method also includes:
The exclusive mark of setting is forbidden during the exclusive mark is for the n Modbus request message described in Batch sending The transmission of other messages in addition to the n Modbus request message.
3. the method according to claim 1, wherein
The time for sending the n Modbus request message is TAb, completes n times Batch sending and the received time is TBb,
TAb=(n-1) * (Ta+T0)+Ta,
TBb=(n-1) * (Ta+T0)+Ts,
Wherein: * is multiplication sign, and Ta is that the time interval of request message is received to slave station from main website sends a request message;
T0 is that main website sends interval time;
Ts=Ta+Tb+Tc;
Tb is the time loss that slave station carries out inter-process to the request message;
Tc is that the time interval of slave station response message is received to main website from slave station sends a response message to main website.
4. according to the method described in claim 3, it is characterized in that, not starting in n-1 request message before sequence is sent Overtime TimeOut timer only just starts TimeOut timer after sending nth request message.
5. the method according to claim 1, wherein the n Modbus request message of generation the step of it Afterwards and it is described according to described in preset order Batch sending the step of n Modbus request message before, the method also includes:
One or more in the n Modbus request message is configured as crucial request message;
The response message of Modbus based on the received determines whether this Batch sending succeeds, comprising:
If had received in the preset timeout interval described correspondingly with all crucial request messages Modbus response message then determines the success of this Batch sending;
If be not received by the preset timeout interval described correspondingly with all crucial request messages Modbus response message then determines that this Batch sending fails.
6. method according to any one of claims 1 to 5, which is characterized in that the Modbus request message includes Modbus TCP message or Modbus RTU message;The Modbus response message includes Modbus TCP message or Modbus RTU message.
7. according to the method described in claim 6, it is characterized by:
When the Modbus request message and the Modbus response message are Modbus TCP message, it is often successfully transmitted one The request message is just saved in local first and sends request list AQS by request message, includes n request message in AQS Effective information, in addition, further including RF and the KQ mark of each request message, wherein RF mark is used to indicate whether to receive and be somebody's turn to do The corresponding response message of request message, KQ mark are used to indicate whether the request message is crucial request message.
8. according to the method described in claim 6, it is characterized by:
When the Modbus request message and the Modbus response message are Modbus RTU message, the n item of generation is asked It asks message to be stored in local second before sending and sends request list TM, alternatively, by these request messages after Batch sending success It is sequentially stored into TM;Comprising the effective information of n request message in TM, in addition, further including RF and the KQ mark of each request message Will, wherein RF mark is used to indicate whether to receive response message corresponding with the request message, and KQ mark is used to indicate the request Whether message is crucial request message.
9. a kind of bulk data transfer device, which is characterized in that including processor and memory, in which: the processor is used for The program stored in memory is executed, to realize the bulk data transfer as described in any one of claim 1 to claim 8 The step of method.
10. a kind of bulk data transfer device, which is characterized in that including Batch sending module and batch receiving module, in which:
Batch sending module, for generating n Modbus request message, and according to n item described in preset order Batch sending Modbus request message, wherein n is the integer more than or equal to 1;
Batch receiving module, for receiving m Modbus response message of return, and root in preset timeout interval Determine whether this Batch sending succeeds according to received Modbus response message, wherein m is 0 to the integer between n.
CN201910559877.7A 2019-06-26 2019-06-26 Batch data transmission method and device Active CN110311847B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910559877.7A CN110311847B (en) 2019-06-26 2019-06-26 Batch data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910559877.7A CN110311847B (en) 2019-06-26 2019-06-26 Batch data transmission method and device

Publications (2)

Publication Number Publication Date
CN110311847A true CN110311847A (en) 2019-10-08
CN110311847B CN110311847B (en) 2022-08-05

Family

ID=68077594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910559877.7A Active CN110311847B (en) 2019-06-26 2019-06-26 Batch data transmission method and device

Country Status (1)

Country Link
CN (1) CN110311847B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111245687A (en) * 2020-03-20 2020-06-05 北京和利时系统工程有限公司 Communication state updating method and device
CN111294264A (en) * 2020-02-17 2020-06-16 北京和利时系统工程有限公司 Communication method and device based on Modbus TCP protocol
CN111586182A (en) * 2020-05-11 2020-08-25 北京和利时系统工程有限公司 Data sending method and device
CN111813733A (en) * 2020-06-30 2020-10-23 厦门科灿信息技术有限公司 Synchronous communication method and system based on Modbus protocol and terminal equipment
CN113746647A (en) * 2020-05-27 2021-12-03 中国联合网络通信集团有限公司 Data transmission method, node, electronic device and readable storage medium
CN114019834A (en) * 2021-11-03 2022-02-08 深圳市奥拓普科技有限公司 Yacht control method and system, storage medium and intelligent terminal

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090083589A1 (en) * 2007-09-20 2009-03-26 Siemens Energy & Automation, Inc. Systems, devices, and/or methods for managing communications
CN102820959A (en) * 2011-06-10 2012-12-12 哈尔滨工业大学 Method for performing large data volume communication between Modbus master station and Modbus slave station
CN103280814A (en) * 2013-03-26 2013-09-04 南京南瑞集团公司 Wind power plant reactive voltage comprehensive control system and method
US20130294322A1 (en) * 2012-05-04 2013-11-07 Electronics And Telecommunications Research Institute Apparatus and method for sequentially transmitting data
WO2014105893A1 (en) * 2012-12-26 2014-07-03 Ict Research Llc Mobility extensions to industrial-strength wireless sensor networks
CN104205709A (en) * 2012-02-28 2014-12-10 三星电子株式会社 Apparatus and method for transmitting feedback information in wireless communication systems
CN106533639A (en) * 2016-12-06 2017-03-22 迈锐数据(北京)有限公司 Data retransmission method and device
CN106561014A (en) * 2015-11-18 2017-04-12 天地融科技股份有限公司 Data transmission method and system, main communication equipment, and slave communication equipment
CN108762193A (en) * 2018-07-31 2018-11-06 吉林大学 Numerically controlled machine remote data acquire and analysis system
CN109327288A (en) * 2015-12-14 2019-02-12 华为技术有限公司 Data transmission acceleration method, apparatus and system
CN109379355A (en) * 2018-10-11 2019-02-22 无锡威孚力达催化净化器有限责任公司 Adaptive reliable multiwindow data transmission method based on udp protocol

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090083589A1 (en) * 2007-09-20 2009-03-26 Siemens Energy & Automation, Inc. Systems, devices, and/or methods for managing communications
CN102820959A (en) * 2011-06-10 2012-12-12 哈尔滨工业大学 Method for performing large data volume communication between Modbus master station and Modbus slave station
CN104205709A (en) * 2012-02-28 2014-12-10 三星电子株式会社 Apparatus and method for transmitting feedback information in wireless communication systems
US20130294322A1 (en) * 2012-05-04 2013-11-07 Electronics And Telecommunications Research Institute Apparatus and method for sequentially transmitting data
WO2014105893A1 (en) * 2012-12-26 2014-07-03 Ict Research Llc Mobility extensions to industrial-strength wireless sensor networks
CN103280814A (en) * 2013-03-26 2013-09-04 南京南瑞集团公司 Wind power plant reactive voltage comprehensive control system and method
CN106561014A (en) * 2015-11-18 2017-04-12 天地融科技股份有限公司 Data transmission method and system, main communication equipment, and slave communication equipment
CN109327288A (en) * 2015-12-14 2019-02-12 华为技术有限公司 Data transmission acceleration method, apparatus and system
CN106533639A (en) * 2016-12-06 2017-03-22 迈锐数据(北京)有限公司 Data retransmission method and device
CN108762193A (en) * 2018-07-31 2018-11-06 吉林大学 Numerically controlled machine remote data acquire and analysis system
CN109379355A (en) * 2018-10-11 2019-02-22 无锡威孚力达催化净化器有限责任公司 Adaptive reliable multiwindow data transmission method based on udp protocol

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PAAVNI SHUKLA等: ""Design and development of a MODBUS automation system for industrial applications"", 《2017 6TH INTERNATIONAL CONFERENCE ON COMPUTER APPLICATIONS IN ELECTRICAL ENGINEERING-RECENT ADVANCES (CERA)》 *
邓国平: ""基于MODBUS现场总线的断路器"", 《中国优秀博硕士学位论文全文数据库(硕士)——工程科技Ⅱ辑》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294264A (en) * 2020-02-17 2020-06-16 北京和利时系统工程有限公司 Communication method and device based on Modbus TCP protocol
CN111294264B (en) * 2020-02-17 2021-12-24 北京和利时系统集成有限公司 Communication method and device based on Modbus TCP protocol
CN111245687A (en) * 2020-03-20 2020-06-05 北京和利时系统工程有限公司 Communication state updating method and device
CN111245687B (en) * 2020-03-20 2021-11-16 北京和利时系统工程有限公司 Communication state updating method and device
CN111586182A (en) * 2020-05-11 2020-08-25 北京和利时系统工程有限公司 Data sending method and device
CN111586182B (en) * 2020-05-11 2023-06-06 北京和利时系统集成有限公司 Data transmission method and device
CN113746647A (en) * 2020-05-27 2021-12-03 中国联合网络通信集团有限公司 Data transmission method, node, electronic device and readable storage medium
CN113746647B (en) * 2020-05-27 2023-12-19 中国联合网络通信集团有限公司 Data transmission method, node, electronic device and readable storage medium
CN111813733A (en) * 2020-06-30 2020-10-23 厦门科灿信息技术有限公司 Synchronous communication method and system based on Modbus protocol and terminal equipment
CN111813733B (en) * 2020-06-30 2022-05-13 厦门科灿信息技术有限公司 Synchronous communication method, system and terminal equipment based on Modbus protocol
CN114019834A (en) * 2021-11-03 2022-02-08 深圳市奥拓普科技有限公司 Yacht control method and system, storage medium and intelligent terminal
CN114019834B (en) * 2021-11-03 2024-02-09 深圳市奥拓普科技有限公司 Yacht control method, yacht control system, storage medium and intelligent terminal

Also Published As

Publication number Publication date
CN110311847B (en) 2022-08-05

Similar Documents

Publication Publication Date Title
CN110311847A (en) A kind of bulk data transmission method and device
US5539734A (en) Method of maintaining PVC status packetized communication system
RU2007110486A (en) INTERFACE MODULE FOR USE WITH FIELDBUS DEVICE NETWORK AND WITH PROCESS CONTROL NETWORKS ON THE BASIS OF INTERNET OR ANOTHER NETWORK
CN112565441B (en) Data communication method and electronic equipment
CN112134915B (en) Application layer protocol decoupling universal network processing system
US6452946B1 (en) Apparatus and method for improving performance in master and slave communications systems
CN108810129A (en) Internet of Things network control system and method, terminal device and local network services equipment
EP3891687A1 (en) Method and system for determining a state of an account in a network device running a light client protocol of a distributed ledger technology network
US5469436A (en) Polling-type digital communications system having pseudo-balanced mode
JP2003198572A (en) Deterministic field bas and process for management of such a bus
DE50212162D1 (en) PARTICIPANT UNIT FOR A HIGH PERFORMANCE COMMUNICATION SYSTEM
Miller TCP/IP Explained
KR100439032B1 (en) method and system for syncronization of IP phone using call server
JP3432449B2 (en) Communication control apparatus and method
CN114884967B (en) Control method and system of distributed edge intelligent gateway system
JPH11239135A (en) Network managing information acquiring method and repeating device
EP0568479A2 (en) Method and system of establishing parallel conversations in a communications network
CN116938755A (en) Network performance measurement method and related equipment
CN105610634B (en) Core network data Transmission system and method
CN115996245A (en) Data frame stream transmission method, device, equipment and medium
CN106131209A (en) A kind of provide the method for information, base station and terminal unit
JP2602587B2 (en) Secondary station initialization method in SDLC communication system
JP3205823B2 (en) Monitoring device for devices connected by communication line
JP3212365B2 (en) Inviting Multiplexing Stations in Networks
CN115658290A (en) Message processing method, device, equipment and storage medium

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211117

Address after: 100176 room 3412, floor 4, building 3, yard 2, Desheng Middle Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant after: Beijing Helishi system integration Co.,Ltd.

Address before: 100176 No.2, Disheng Middle Road, Yizhuang Economic and Technological Development Zone, Daxing District, Beijing

Applicant before: BEIJING HOLLYSYS Co.,Ltd.

GR01 Patent grant
GR01 Patent grant