CN106656708A - Communication method and device based on communication protocol in master-slave mode - Google Patents

Communication method and device based on communication protocol in master-slave mode Download PDF

Info

Publication number
CN106656708A
CN106656708A CN201611108714.XA CN201611108714A CN106656708A CN 106656708 A CN106656708 A CN 106656708A CN 201611108714 A CN201611108714 A CN 201611108714A CN 106656708 A CN106656708 A CN 106656708A
Authority
CN
China
Prior art keywords
communication protocol
slave mode
configured information
master slave
destination server
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.)
Pending
Application number
CN201611108714.XA
Other languages
Chinese (zh)
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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201611108714.XA priority Critical patent/CN106656708A/en
Publication of CN106656708A publication Critical patent/CN106656708A/en
Pending legal-status Critical Current

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
    • H04L12/40006Architecture of a communication node
    • 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)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a communication method and a device based on a communication protocol in a master-slave mode, which are applied to nodes based on the communication protocol in the master-slave mode, wherein the method comprises the following steps: receiving monitoring information; and setting the node state as a server state according to the monitoring information. Alternatively, it comprises: acquiring the address of a target server; and connecting to the target server according to the address of the target server, and setting the node state into a client state, so that the client has the function of the server at the same time, and a plurality of nodes based on a communication protocol in a master-slave mode can mutually read and write data.

Description

Communication means and device based on communication protocol under master slave mode
Technical field
The present invention relates to communication technical field, and in particular to a kind of communication means based on communication protocol under master slave mode and Device.
Background technology
Modbus agreements are that ICP/IP protocol is that coverage rate is high in network using a kind of very wide communication protocol in industry Communication protocol.
Modbus ICP/IP protocols are capable of achieving EPA data exchange.The strong point of both the above agreement is combined, it is real Show that transmission range is longer, transmission data ability is higher and it is cheap to make use of general-purpose network component to reach exercise price Purpose.Being widely recognized as of applying in industry is have also been obtained at present.
At present, modbus TCP/IP are mainly according to the one master and multiple slaves pattern of similar modbus agreements in network interface communication, The namely pattern of the multiple slaves of main frame, usually slave to main frame send request and then main frame response, host broadcast, The modes such as main frame roll-call.Fig. 1 is networking model schematic diagram between industrial equipment in prior art, as shown in figure 1, communication network structure The two parts built:Server and client computer.Communication process:Client computer sends to server and asks, and sets up communication.Server is always In listening state.
The content of the invention
In view of this, a kind of communication means based on communication protocol under master slave mode and dress are embodiments provided Put, to solve prior art in can not mutually read data and to write between MODBUS TCP/IP main frames and MODBUS TCP/IP slaves The problem of data.
For this purpose, embodiments providing following technical scheme:
According in a first aspect, embodiments provide a kind of communication means based on communication protocol under master slave mode, The node based on communication protocol under master slave mode is applied to, including:Receive monitoring information;According to the monitoring information by node shape State is set to server state.
Alternatively, node state is set to after server state according to the monitoring information, is also included:From based on master The client computer read switch amount and/or analog quantity of communication protocol under slave pattern.
Alternatively, include from the client computer read switch amount and/or analog quantity based on communication protocol under master slave mode:Obtain First configured information, wherein, first configured information is used for the length for indicating the initial address for reading data and reading data; According to first configured information from the client computer read switch amount and/or analog quantity based on communication protocol under master slave mode.
According to second aspect, the embodiment of the present invention additionally provides a kind of communication party based on communication protocol under master slave mode Method, is applied to the node based on communication protocol under master slave mode, including:Obtain the address of destination server;According to the target The address of server is connected to the destination server, and node state is set into client state.
Alternatively, node state is set to after client state, is also included:From the destination server read switch Amount and/or analog quantity;And/or, send switching value and/or analog quantity to the destination server.
Alternatively, include from the destination server read switch amount and/or analog quantity:The second configured information is obtained, its In, second configured information is used for the length for indicating the initial address for reading data and reading data;Refer to according to described second Show information from the destination server read switch amount and/or analog quantity;And/or, send switching value to the destination server And/or analog quantity includes:The 3rd configured information is obtained, wherein, the 3rd configured information is used for the starting for indicating to send data Address and the length of transmission data;Switching value and/or simulation are sent to the destination server according to the 3rd configured information Amount.
Alternatively, communication protocol is MODBUS ICP/IP protocols under the master slave mode.
According to the third aspect, the embodiment of the present invention additionally provides a kind of communication dress based on communication protocol under master slave mode Put, be applied to the node based on communication protocol under master slave mode, including:Receiver module, for receiving monitoring information;First is arranged Module, for node state to be set into server state according to the monitoring information.
Alternatively, described device also includes:First read module, in first setup module according to the prison Listen information that node state is set to after server state, from the client computer read switch based on communication protocol under master slave mode Amount and/or analog quantity.
Alternatively, first read module includes:First acquisition unit, for obtaining the first configured information, wherein, institute State the first configured information for indicate read data initial address and reading data length;First reading unit, for root According to first configured information from the client computer read switch amount and/or analog quantity based on communication protocol under master slave mode.
According to fourth aspect, the embodiment of the present invention additionally provides a kind of communication dress based on communication protocol under master slave mode Put, be applied to the node based on communication protocol under master slave mode, including:Acquisition module, for obtaining the address of destination server; Second setup module, for being connected to the destination server according to the address of the destination server, node state is arranged For client state.
Alternatively, described device also includes:Second read module, for setting node state in second setup module After being set to client state, from the destination server read switch amount and/or analog quantity;And/or, sending module is used for After node state to be set to second setup module client state, to the destination server switching value is sent And/or analog quantity.
Alternatively, second read module includes:Second acquisition unit, for obtaining the second configured information, wherein, institute State the second configured information for indicate read data initial address and reading data length;Second reading unit, for root According to second configured information from the destination server read switch amount and/or analog quantity;And/or, sending module includes:The Three acquiring units, for obtaining the 3rd configured information, wherein, the 3rd configured information is used for the starting point for indicating to send data Location and the length of transmission data;Sending module, switchs for being sent to the destination server according to the 3rd configured information Amount and/or analog quantity.
Alternatively, communication protocol is MODBUS ICP/IP protocols under the master slave mode.
Embodiment of the present invention technical scheme, has the advantage that:
1. a kind of communication means based on communication protocol under master slave mode and device are embodiments provided, is applied to Based on the node of communication protocol under master slave mode, monitoring information is received, node state is set to by server according to monitoring information State, for example, in the client computer based on communication protocol under master slave mode after monitoring information is received, the client computer is arranged For server state, so that the client computer has been provided simultaneously with the function of server, and then cause to lead to based under master slave mode Can mutually read data between multiple nodes of letter agreement and write data.
2. a kind of communication means based on communication protocol under master slave mode and device are embodiments provided, is applied to Based on the node of communication protocol under master slave mode, the address of destination server is obtained, be connected to according to the address of destination server Destination server, by node state client state is set to, and for example, is being obtained based on the server of communication protocol under master slave mode After getting the address of destination server, the destination server is connected to, the server is set into client state, so that The function that the server has been provided simultaneously with client computer is obtained, and then is caused between the multiple nodes based on communication protocol under master slave mode Data can mutually be read and data are write.
Description of the drawings
In order to be illustrated more clearly that the specific embodiment of the invention or technical scheme of the prior art, below will be to concrete The accompanying drawing to be used needed for embodiment or description of the prior art is briefly described, it should be apparent that, in describing below Accompanying drawing is some embodiments of the present invention, for those of ordinary skill in the art, before creative work is not paid Put, can be with according to these other accompanying drawings of accompanying drawings acquisition.
Fig. 1 is networking model schematic diagram between industrial equipment in prior art;
Fig. 2 is a flow chart based on the communication means of communication protocol under master slave mode according to embodiments of the present invention;
Fig. 3 is networking model schematic diagram between industrial equipment according to embodiments of the present invention;
Fig. 4 is another flow process based on the communication means of communication protocol under master slave mode according to embodiments of the present invention Figure;
Fig. 5 is nodal interface schematic diagram according to embodiments of the present invention;
Fig. 6 is a structural frames based on the communicator of communication protocol under master slave mode according to embodiments of the present invention Figure;
Fig. 7 is a structural frames based on the communicator of communication protocol under master slave mode according to embodiments of the present invention Figure.
Specific embodiment
Technical scheme is clearly and completely described below in conjunction with accompanying drawing, it is clear that described enforcement Example is a part of embodiment of the invention, rather than the embodiment of whole.Based on the embodiment in the present invention, ordinary skill The every other embodiment that personnel are obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
In describing the invention, it should be noted that term " " center ", " on ", D score, "left", "right", " vertical ", The orientation or position relationship of the instruction such as " level ", " interior ", " outward " be based on orientation shown in the drawings or position relationship, merely to Be easy to description the present invention and simplify description, rather than indicate or imply indication device or element must have specific orientation, With specific azimuth configuration and operation, therefore it is not considered as limiting the invention.Additionally, term " first ", " second ", " the 3rd " is only used for describing purpose, and it is not intended that indicating or implying relative importance.
In describing the invention, it should be noted that unless otherwise clearly defined and limited, term " installation ", " phase Company ", " connection " should be interpreted broadly, for example, it may be being fixedly connected, or being detachably connected, or be integrally connected;Can Being to be mechanically connected, or electrically connect;Can be joined directly together, it is also possible to be indirectly connected to by intermediary, can be with It is the connection of two element internals, can is wireless connection, or wired connection.For one of ordinary skill in the art For, above-mentioned term concrete meaning in the present invention can be understood with concrete condition.
As long as additionally, technical characteristic involved in invention described below different embodiments non-structure each other Just can be combined with each other into conflict.
Embodiment 1
A kind of communication means based on communication protocol under master slave mode is provided in the present embodiment, is applied to based on principal and subordinate The node of communication protocol under pattern, Fig. 2 is the communication means based on communication protocol under master slave mode according to embodiments of the present invention A flow chart, as shown in Fig. 2 the flow process comprises the steps:
Step S201:Receive monitoring information;
Step S202:Node state is set to by server state according to the monitoring information.For example, based on master slave mode The client computer is set to server state by the client computer of lower communication protocol after monitoring information is received, so that should Client computer has been provided simultaneously with the function of server, and then cause between the multiple nodes based on communication protocol under master slave mode can be with Mutually read data and write data.
By above-mentioned steps, in the case where monitoring information is received, by the node based on communication protocol under master slave mode Equipment is server state, so that being provided simultaneously with server and client computer based on the node of communication protocol under master slave mode Function, each node can monitor the data of other each nodes as server, access other each nodes as client computer Carry out the read-write of data, realize without principal communication, i.e., it is many it is main it is many from communication mode, facilitate realize each industrial equipment it Between data read and write.
Fig. 3 is networking model schematic diagram between industrial equipment according to embodiments of the present invention, as shown in figure 3, each node Two parts fusion is done:Existing server capability has client functionality again.It is each that each node can monitor other as server The data of node, other each nodes are accessed as client computer carry out the read-write of data.
After node state to be set to server state, the node just can read data from client computer, one In individual alternative embodiment, from client computer read switch amount and/or analog quantity based on communication protocol under master slave mode, so as to side Just the switching value and/or analog quantity of other nodes, have efficiently been got.
When node reads the switching value and/or analog quantity of other nodes, in one alternate embodiment, is obtained first One configured information, wherein, the first configured information is used for the length for indicating the initial address for reading data and reading data, according to the One configured information is from the client computer read switch amount and/or analog quantity based on communication protocol under master slave mode.So as to pass through this One configured information, can get the switching value and/or analog quantity for wanting to obtain.
In another alternative embodiment, another kind of communication means based on communication protocol under master slave mode is additionally provided, The node based on communication protocol under master slave mode is applied to, Fig. 4 is according to embodiments of the present invention based on communication under master slave mode Another flow chart of the communication means of agreement, as shown in figure 4, the flow process comprises the steps:
Step S401, obtains the address of destination server;
Step S402, according to the address of destination server destination server is connected to, and node state is set into client computer State.
By above-mentioned steps, when the address of destination server is got, the destination server is connected to, by node state Client state is set to, for example, in the address that destination server is got based on the server of communication protocol under master slave mode Afterwards, the destination server is connected to, the server is set into client state, so that communicating based under master slave mode The node of agreement has been provided simultaneously with the function of server and client computer, and each node can monitor other each nodes as server Data, other each nodes accessed as client computer carry out the read-write of data, realize without principal communication, i.e., it is many it is main it is many from it is logical Letter mode, facilitates the data realized between each industrial equipment and reads and write.
In one alternate embodiment, node state is set to after client state, reads from destination server and open Measure and/or analog quantity pass.In another alternative embodiment, node state is set to after client state, to target clothes Business device sends switching value and/or analog quantity.So as to the interaction that can complete switching value and/or analog quantity among multiple nodes.
Each node in order to read or sending switching value and/or analog quantity as desired, in one alternate embodiment, The second configured information is obtained, wherein, the second configured information is used for the length for indicating the initial address for reading data and reading data, According to the second configured information from destination server read switch amount and/or analog quantity.In another alternative embodiment, the is obtained Three configured informations, wherein, the 3rd configured information is used for the length for indicating the initial address for sending data and sending data, according to the Three configured informations to destination server sends switching value and/or analog quantity.
Communication protocol can include various communications protocols under above-mentioned master slave mode, for example, can assist for MODBUS TCP/IP View.
The node for being provided simultaneously with server and client functionality is described with reference to Fig. 5.
Whole system is that the Qt platforms under Linux environment are completed.Communication is introduced below by concrete interface Process and allomeric function.Fig. 5 top halfs are the parts as server, and Fig. 5 the latter half is the part as client computer.
(1) server section:
The listen in the upper left corner is first clicked on, makes itself to be in listening state.
Serverip parts are the ip addresses of server itself, and the setting of ip addresses can be carried out by the position in the upper right corner Update.
The switching value and analog quantity of server itself can be updated the data by update bit and update word. The data display of renewal is inside input status and input registers.
Two forms of right half part of server:Coil status and holding registers.It is for receiving visitor Switching value that family machine is sent and analog data.
(2) client-part:
It is the bottom half at whole interface as shown in interface first as the part of client computer.The upper left corner can be arranged will be even The server address for connecing, then clicks on connect and is attached.Read onlymode and read write mode are optional , it is to have selected the switching value for reading destination server that the former acts on, and the latter's effect is to have selected the mould for reading destination server Analog quantity.
There are two forms left half-court:Read status and read registers.The former is to read the destination server of coming Switching value, the latter be read come destination server analog quantity.Two forms have start addr and bit count, Its effect is respectively to arrange the initial address of reading data and arrange the length for reading data.Get bit are to start to obtain target The instruction key of server switching value, get word are the instruction keys for starting to obtain destination server analog quantity.
There are two forms right half-court:Coil status and holding registers.The former is that client computer will be sent to The switching value data of destination server, the latter is the analog data that client computer will be sent to destination server.Can pass through Update bit update the data of the latter by update word updating the former data.Two forms have start Addr and bit count, its effect is respectively to arrange the initial address of transmission data and arrange the length for sending data.Send Bit is the instruction key for starting to send switching value, and send word are the instruction keys for starting to send analog quantity.
It is exactly above that simple declaration is exactly that each node itself is both come the introduction to individual node according to the interface designed Server is again client computer, and it can obtain the data that other nodes are sent, it is also possible to allow other nodes to read the data of oneself, And each node ip of itself and the ip to be connected can be carried out arranging.
As client-part when the ip of the destination server to be connected is arranged, multiple nodes can connect same mesh Mark server can also be different, relatively more flexible.
Embodiment 2
A kind of communicator based on communication protocol under master slave mode is additionally provided in the present embodiment, and the device is used for real Existing above-described embodiment and preferred embodiment, had carried out repeating no more for explanation.As used below, term " module " The software of predetermined function and/or the combination of hardware can be realized.Although the device described by following examples is preferably with software To realize, but hardware, or the realization of the combination of software and hardware is also may and to be contemplated.
A kind of communicator based on communication protocol under master slave mode is embodiments provided, is applied to based on principal and subordinate The node of communication protocol under pattern, as shown in fig. 6, including:Receiver module 61, for receiving monitoring information;First setup module 62, for node state to be set into server state according to the monitoring information.
Alternatively, the device also includes:First read module, in the first setup module 62 according to the monitoring information Node state is set to after server state, from the client computer read switch amount based on communication protocol under master slave mode and/ Or analog quantity.
Alternatively, the first read module includes:First acquisition unit, for obtaining the first configured information, wherein, first refers to Show information for indicate read data initial address and reading data length;First reading unit, for referring to according to first Show information from the client computer read switch amount and/or analog quantity based on communication protocol under master slave mode.
The further function description of above-mentioned modules is identical with above-mentioned correspondence embodiment, will not be described here.
Embodiment 3
Another kind of communicator based on communication protocol under master slave mode is additionally provided in the present embodiment, and the device is used for Above-described embodiment and preferred embodiment are realized, repeating no more for explanation had been carried out.As used below, term " mould Block " can realize the software of predetermined function and/or the combination of hardware.Although the device described by following examples is preferably with soft Part is realizing, but hardware, or the realization of the combination of software and hardware is also may and to be contemplated.
The further function description of above-mentioned modules is identical with above-mentioned correspondence embodiment, will not be described here.
The embodiment of the present invention additionally provides another kind of communicator based on communication protocol under master slave mode, is applied to be based on The node of communication protocol under master slave mode, as shown in fig. 7, comprises:Acquisition module 71, for obtaining the address of destination server; Second setup module 72, for the address according to destination server destination server is connected to, and node state is set into client Machine state.
Alternatively, the device also includes:Second read module, for arranging node state in second setup module 72 After for client state, from destination server read switch amount and/or analog quantity;And/or, sending module, for second Setup module 72 is set to node state after client state, and to destination server switching value and/or analog quantity are sent.
Alternatively, second read module includes:Second acquisition unit, for obtaining the second configured information, wherein, second Configured information is used for the length for indicating the initial address for reading data and reading data;Second reading unit, for according to second Configured information is from destination server read switch amount and/or analog quantity;And/or, sending module includes:3rd acquiring unit, uses In the 3rd configured information of acquisition, wherein, the 3rd configured information is used for initial address and the transmission data for indicating to send data Length;Sending module, for sending switching value and/or analog quantity to the destination server according to the 3rd configured information.
Alternatively, communication protocol is MODBUS ICP/IP protocols under the master slave mode.
The further function description of above-mentioned modules is identical with above-mentioned correspondence embodiment, will not be described here.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can be using complete hardware embodiment, complete software embodiment or with reference to the reality in terms of software and hardware Apply the form of example.And, the present invention can be adopted and wherein include the computer of computer usable program code at one or more The computer program implemented in usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) is produced The form of product.
The present invention is the flow process with reference to method according to embodiments of the present invention, equipment (system) and computer program Figure and/or block diagram are describing.It should be understood that can be by computer program instructions flowchart and/or each stream in block diagram The combination of journey and/or square frame and flow chart and/or the flow process in block diagram and/or square frame.These computer programs can be provided The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced for reality by the instruction of computer or the computing device of other programmable data processing devices The device of the function of specifying in present one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing devices with spy In determining the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory is produced to be included referring to Make the manufacture of device, the command device realize in one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or The function of specifying in multiple square frames.
These computer program instructions also can be loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented process, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow process of flow chart or multiple flow processs and/or block diagram one The step of function of specifying in individual square frame or multiple square frames.
Obviously, above-described embodiment is only intended to clearly illustrate example, and not to the restriction of embodiment.It is right For those of ordinary skill in the art, can also make on the basis of the above description other multi-forms change or Change.There is no need to be exhaustive to all of embodiment.And the obvious change thus extended out or Among changing still in the protection domain of the invention.

Claims (14)

1. a kind of communication means based on communication protocol under master slave mode, is applied to the section based on communication protocol under master slave mode Point, it is characterised in that include:
Receive monitoring information;
Node state is set to by server state according to the monitoring information.
2. method according to claim 1, it is characterised in that node state is set to by service according to the monitoring information After device state, also include:
From client computer read switch amount and/or analog quantity based on communication protocol under master slave mode.
3. method according to claim 2, it is characterised in that read from the client computer based on communication protocol under master slave mode Switching value and/or analog quantity include:
The first configured information is obtained, wherein, first configured information is used to indicate the initial address and receive data that read data According to length;
According to first configured information from the client computer read switch amount based on communication protocol under master slave mode and/or simulation Amount.
4. a kind of communication means based on communication protocol under master slave mode, is applied to the section based on communication protocol under master slave mode Point, it is characterised in that include:
Obtain the address of destination server;
The destination server is connected to according to the address of the destination server, node state is set into client state.
5. method according to claim 4, it is characterised in that node state is set to after client state, is also wrapped Include:
From the destination server read switch amount and/or analog quantity;And/or,
Switching value and/or analog quantity are sent to the destination server.
6. method according to claim 5, it is characterised in that from the destination server read switch amount and/or simulation Amount includes:The second configured information is obtained, wherein, second configured information is used for initial address and the reading for indicating to read data The length of data;According to second configured information from the destination server read switch amount and/or analog quantity;And/or,
Sending switching value and/or analog quantity to the destination server includes:The 3rd configured information is obtained, wherein, the described 3rd Configured information is used for the length for indicating the initial address for sending data and sending data;According to the 3rd configured information to described Destination server sends switching value and/or analog quantity.
7. method according to any one of claim 1 to 6, it is characterised in that communication protocol is under the master slave mode MODBUS ICP/IP protocols.
8. a kind of communicator based on communication protocol under master slave mode, is applied to the section based on communication protocol under master slave mode Point, it is characterised in that include:
Receiver module, for receiving monitoring information;
First setup module, for node state to be set into server state according to the monitoring information.
9. device according to claim 8, it is characterised in that described device also includes:
First read module, for node state to be set into service according to the monitoring information in first setup module After device state, from client computer read switch amount and/or analog quantity based on communication protocol under master slave mode.
10. device according to claim 9, it is characterised in that first read module includes:
First acquisition unit, for obtaining the first configured information, wherein, first configured information is used to indicate to read data The length of initial address and reading data;
First reading unit, for being read from the client computer based on communication protocol under master slave mode according to first configured information Switching value and/or analog quantity.
A kind of 11. communicators based on communication protocol under master slave mode, are applied to the section based on communication protocol under master slave mode Point, it is characterised in that include:
Acquisition module, for obtaining the address of destination server;
Second setup module, for being connected to the destination server according to the address of the destination server, by node state It is set to client state.
12. devices according to claim 11, it is characterised in that described device also includes:
Second read module, after node state to be set to client state in second setup module, from described Destination server read switch amount and/or analog quantity;And/or,
Sending module, after node state to be set to client state in second setup module, to the target Server sends switching value and/or analog quantity.
13. devices according to claim 12, it is characterised in that second read module includes:Second acquisition unit, For obtaining the second configured information, wherein, second configured information is used to indicate the initial address and receive data that read data According to length;Second reading unit, for according to second configured information from the destination server read switch amount and/or Analog quantity;And/or,
Sending module includes:3rd acquiring unit, for obtaining the 3rd configured information, wherein, the 3rd configured information is used for Indicate the initial address for sending data and the length for sending data;Sending module, for according to the 3rd configured information to institute State destination server and send switching value and/or analog quantity.
14. devices according to any one of claim 11 to 13, it is characterised in that communication protocol under the master slave mode For MODBUS ICP/IP protocols.
CN201611108714.XA 2016-12-06 2016-12-06 Communication method and device based on communication protocol in master-slave mode Pending CN106656708A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611108714.XA CN106656708A (en) 2016-12-06 2016-12-06 Communication method and device based on communication protocol in master-slave mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611108714.XA CN106656708A (en) 2016-12-06 2016-12-06 Communication method and device based on communication protocol in master-slave mode

Publications (1)

Publication Number Publication Date
CN106656708A true CN106656708A (en) 2017-05-10

Family

ID=58818901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611108714.XA Pending CN106656708A (en) 2016-12-06 2016-12-06 Communication method and device based on communication protocol in master-slave mode

Country Status (1)

Country Link
CN (1) CN106656708A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110166335A (en) * 2019-04-02 2019-08-23 深圳市汇川技术股份有限公司 EtherCAT slave station and slave station synchronous communication method, control system, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101695189A (en) * 2009-10-23 2010-04-14 深圳华为通信技术有限公司 Method for conducting data synchronization by earphone, and corresponding earphone and mobile terminal
CN101800652A (en) * 2010-02-04 2010-08-11 深圳市金宏威实业发展有限公司 Mode switching method and system of serial port and Ethernet and industrial Ethernet switch
CN102986168A (en) * 2010-08-12 2013-03-20 Abb研究有限公司 A communication method and apparatus of network management system
CN104486185A (en) * 2014-12-12 2015-04-01 中广核工程有限公司 Control system communication method and system for nuclear power plant
CN104539325A (en) * 2014-12-25 2015-04-22 惠州Tcl移动通信有限公司 Networking interconnection method and system based on low-power-consumption Bluetooth piconets
CN105207866A (en) * 2015-10-26 2015-12-30 珠海格力电器股份有限公司 Communication method of control terminal based on air conditioner control network and air conditioner control network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101695189A (en) * 2009-10-23 2010-04-14 深圳华为通信技术有限公司 Method for conducting data synchronization by earphone, and corresponding earphone and mobile terminal
CN101800652A (en) * 2010-02-04 2010-08-11 深圳市金宏威实业发展有限公司 Mode switching method and system of serial port and Ethernet and industrial Ethernet switch
CN102986168A (en) * 2010-08-12 2013-03-20 Abb研究有限公司 A communication method and apparatus of network management system
CN104486185A (en) * 2014-12-12 2015-04-01 中广核工程有限公司 Control system communication method and system for nuclear power plant
CN104539325A (en) * 2014-12-25 2015-04-22 惠州Tcl移动通信有限公司 Networking interconnection method and system based on low-power-consumption Bluetooth piconets
CN105207866A (en) * 2015-10-26 2015-12-30 珠海格力电器股份有限公司 Communication method of control terminal based on air conditioner control network and air conditioner control network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110166335A (en) * 2019-04-02 2019-08-23 深圳市汇川技术股份有限公司 EtherCAT slave station and slave station synchronous communication method, control system, equipment and storage medium
CN110166335B (en) * 2019-04-02 2021-08-27 深圳市汇川技术股份有限公司 EtherCAT slave station and slave station synchronous communication method, control system, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105222782B (en) A kind of route recommendation method and mobile terminal
CN105794152B (en) The system and method and device of the interaction based on web are carried out with building automatic
CN107846313B (en) A kind of method and the network equipment of the generation of network service moulding plate
CN103546467A (en) Method for transmitting Modbus RTU protocol on TCP/IP network
CN108494607A (en) The design method and system of big double layer network framework based on container
CN107133041B (en) Data notification method and device
CN103078765A (en) Test method and device of network element equipment performance
CN108459944A (en) System operation monitoring method, device and server
CN110012534A (en) Equipment state synchronous method, device, equipment and computer readable storage medium
CN108063775A (en) Communication protocol compatibility method, apparatus and system
CN109547875A (en) A kind of FC exchange network arbitrary port access design method
CN110474960B (en) Method and device for service deployment in virtual network
CN108259435A (en) Access the implementation method and device of the mixing application of Web components
CN106095676A (en) Method of testing that data report, Apparatus and system
CN107947982A (en) A kind of device software management system
CN110290187A (en) Transmission method and device, storage medium, the electronic device of data information
CN109413227A (en) IPv4 user based on more IPv6 networks accesses IPv6 network interworking device and equipment
CN108628729A (en) A kind of method for testing software and software test client
CN104582011B (en) A kind of method and apparatus for mobile terminal to be connected to network
CN105306542A (en) System for integrating Web services
CN106201852A (en) A kind of distributed test method and test system
CN109542754A (en) The cut-in method of mobile device, the adjustment method of application program, device and system
CN109240899A (en) Information acquisition method and device
CN106656708A (en) Communication method and device based on communication protocol in master-slave mode
CN109450768A (en) The method of container interconnection and the system interconnected for container

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20170510

RJ01 Rejection of invention patent application after publication