CN104683068A - PWM-based one-way master-slave multi-computer communication method - Google Patents
PWM-based one-way master-slave multi-computer communication method Download PDFInfo
- Publication number
- CN104683068A CN104683068A CN201510077980.XA CN201510077980A CN104683068A CN 104683068 A CN104683068 A CN 104683068A CN 201510077980 A CN201510077980 A CN 201510077980A CN 104683068 A CN104683068 A CN 104683068A
- Authority
- CN
- China
- Prior art keywords
- pwm
- machine
- communication method
- parameters
- communication
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 34
- 238000000034 method Methods 0.000 title claims abstract description 11
- 230000007717 exclusion Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
Landscapes
- Communication Control (AREA)
Abstract
The invention discloses a PWM-based one-way master-slave multi-computer communication method. The method comprises the following steps: step one, initializing a system; step two, sending all the parameters of all the slave computers by selecting the corresponding period and duty ratio of a PWM module of a host; step three, inquiring updating requests of all the slave computers in sequence and updating all parameters to be updated of all the slave computers by the host; circularly performing the step three. By virtue of the PWM-based one-way master-slave multi-computer communication method, a communication protocol between the host and the slave computers is simplified; the communication efficiency and real-time performance are improved; meanwhile, the communication reliability is improved.
Description
Technical field
The present invention relates to master-slave mode one-to-many multi-computer communication technology, particularly relate to a kind of unidirectional Subordinate communication method based on PWM.
Background technology
In various equipment use system, unidirectional Subordinate communication is one of communication pattern widely.But there is problem common as follows: communication protocol is complicated, operation maintenance difficulty is large, consuming time many; Allocation address coding is respectively needed from machine; Data communication real-time and efficiency are all not high; Data communication reliability is not high.
Summary of the invention
In view of this, the object of the invention is for the deficiencies in the prior art, a kind of unidirectional Subordinate communication method based on PWM is provided, make main frame and be able to concisely from communication protocol between machine, communication efficiency and real-time are improved, and improve communication reliability simultaneously.
For achieving the above object, the present invention by the following technical solutions:
Based on a unidirectional Subordinate communication method of PWM, wherein, comprise the steps:
Step 1, system initialization;
Step 2, selects the PWM module respective cycle of main frame and duty ratio to send all parameters from machine, transmits the PWM cycle mutual exclusion of each parameter; The described value from machine parameter is represented by the duty ratio of its PWM;
Step 3, all update requests from machine of main wheel continuous query also upgrade all parameters all to be updated from machine successively; Circulation performs step 3.
As preferably, described vicinity differed as fixed value from the PWM cycle set between machine.
As preferably, the PWM cycle set between the described same proximity parameter from machine differs as fixed value.
The beneficial effect of the invention is:
The present invention is directed to the ever-present main frame of unidirectional " master-slave mode one-to-many " multi-machine communication system and complicated from communication protocol between machine, operation maintenance difficulty is large, consuming time many; Data communication reliability is not high; Data communication real-time and efficiency are all not high; The problems such as difference allocation address coding are needed from machine, the present invention is due to the difference of communication mode, adopt PWM to be different from as information carrier and adopt sequence of levels as information carrier, different to distinguish from setting the different PWM cycles between machine and between the same different parameters from machine, achieve main frame and simple and clear from communication protocol between machine, without the need to giving from machine allocation address coding, improve real-time communication, efficiency, communication reliability.
Accompanying drawing explanation
Fig. 1 is flow chart of the present invention.
Fig. 2 is the parameter periodic table of communication protocol of the present invention.
Embodiment
Below in conjunction with drawings and Examples, the invention will be further described.
As shown in Figure 1, the present invention includes following steps:
Step 001, system initialization; Step 001 is responsible for the modules that initialization meets system requirements.
Step 002, selects the respective cycle of PWM module and corresponding duty ratio to send all parameters from machine; Step 002 is responsible for selecting the respective cycle of PWM module and corresponding duty ratio to send to all parameters from machine.Preset the cycle of all parameters in main frame, transmit the PWM cycle mutual exclusion of each parameter; The described value from machine parameter is represented by the duty ratio of PWM;
Step 003, all update requests from machine of main wheel continuous query, and upgrade all parameters all to be updated from machine successively; Circulation performs step 3.
As shown in Figure 2,1# adopts the PWM cycle of contiguous mutual deviation 1 millisecond to distinguish from machine, 6# from machine, 5# from machine, 4# from machine, 3# from machine, 2# between the 1# parameter of machine, 1# distinguishes from adopting the PWM cycle of contiguous mutual deviation 0.1 millisecond between the 1# parameter of machine, 2# parameter, 3# parameter, 4# parameter, and 2# also adopts the PWM cycle of contiguous mutual deviation 0.1 millisecond to distinguish from machine, 6# from machine, 5# from machine, 4# from machine, 3# between the different parameters of machine.The present invention adopts PWM to be different from employing level as information carrier as information carrier, and the PWM cycle mutual exclusion of each parameter, the value of the parameter that transmit is represented by the duty ratio of PWM.
Communication protocol of the present invention is simple and clear, does not have address code from machine, has the application characteristic that real-time communication, efficiency and communication reliability improve.
What finally illustrate is, above embodiment is only in order to illustrate technical scheme of the present invention and unrestricted, other amendments that those skilled in the art make technical scheme of the present invention or equivalently to replace, only otherwise depart from the spirit and scope of technical solution of the present invention, all should be encompassed in the middle of right of the present invention.
Claims (3)
1., based on a unidirectional Subordinate communication method of PWM, it is characterized in that: comprise the steps:
Step 1, system initialization;
Step 2, selects the PWM module respective cycle of main frame and duty ratio to send all parameters from machine;
Step 3, all update requests from machine of main wheel continuous query also upgrade all from all parameters to be updated of machine successively; Circulation performs step 3.
2. a kind of unidirectional Subordinate communication method based on PWM according to claim 1, is characterized in that: described vicinity differed as fixed value from the PWM cycle set between machine.
3. a kind of unidirectional Subordinate communication method based on PWM according to claim 2, is characterized in that: the PWM cycle set between the described same proximity parameter from machine differs as fixed value.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510077980.XA CN104683068A (en) | 2015-02-14 | 2015-02-14 | PWM-based one-way master-slave multi-computer communication method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510077980.XA CN104683068A (en) | 2015-02-14 | 2015-02-14 | PWM-based one-way master-slave multi-computer communication method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN104683068A true CN104683068A (en) | 2015-06-03 |
Family
ID=53317712
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510077980.XA Pending CN104683068A (en) | 2015-02-14 | 2015-02-14 | PWM-based one-way master-slave multi-computer communication method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104683068A (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050041445A1 (en) * | 2001-12-31 | 2005-02-24 | Dangsheng Zhou | Method of establishing a master & minus; host in modules connecting in parallel |
| CN101222377A (en) * | 2007-11-23 | 2008-07-16 | 深圳国人通信有限公司 | Method and device for processing slave machine parameter in distributed master-salve machine communication |
| CN101232425A (en) * | 2007-01-26 | 2008-07-30 | 京信通信系统(中国)有限公司 | A peer-to-peer control method for master-slave stations in a bus-type distributed control system |
| CN101986765A (en) * | 2010-10-28 | 2011-03-16 | 河南理工大学 | Singlechip-based low-power consumption networking positioning instrument |
| CN102857956A (en) * | 2012-07-26 | 2013-01-02 | 京信通信系统(广州)有限公司 | Master-slave communication method and device |
-
2015
- 2015-02-14 CN CN201510077980.XA patent/CN104683068A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050041445A1 (en) * | 2001-12-31 | 2005-02-24 | Dangsheng Zhou | Method of establishing a master & minus; host in modules connecting in parallel |
| CN101232425A (en) * | 2007-01-26 | 2008-07-30 | 京信通信系统(中国)有限公司 | A peer-to-peer control method for master-slave stations in a bus-type distributed control system |
| CN101222377A (en) * | 2007-11-23 | 2008-07-16 | 深圳国人通信有限公司 | Method and device for processing slave machine parameter in distributed master-salve machine communication |
| CN101986765A (en) * | 2010-10-28 | 2011-03-16 | 河南理工大学 | Singlechip-based low-power consumption networking positioning instrument |
| CN102857956A (en) * | 2012-07-26 | 2013-01-02 | 京信通信系统(广州)有限公司 | Master-slave communication method and device |
Non-Patent Citations (1)
| Title |
|---|
| 李鹏等: "《地铁制动实验台PWM信号转换器的研制》", 《青岛科技大学学报》 * |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| RU2017118289A (en) | APPARATUS, METHOD AND SYSTEM FOR MANAGING A LOADING DEVICE THROUGH A POWER SUPPLY LINE USING A POWER AGREEMENT PROTOCOL | |
| MY187393A (en) | Method and system for realizing data tracking by means of software development kit | |
| CN104378886A (en) | Intelligent illumination control system and method | |
| CN104216384A (en) | Intelligent remote control system combined with lamp | |
| CN110583076A (en) | Resource allocation method and equipment | |
| CN102802316B (en) | Lighting control device for realizing transmission of DALI (digital addressable lighting interface) bus protocol through ZigBee | |
| WO2014125103A3 (en) | Appliance control system & method | |
| CN104869157A (en) | Universal automated information collecting and monitoring system for industry | |
| CN104683068A (en) | PWM-based one-way master-slave multi-computer communication method | |
| CN103957271A (en) | Novel system composed of Internet of things devices | |
| CN103974509A (en) | Method and system for intelligently controlling LEDs | |
| CN105652813B (en) | A method of embedded real-time EtherCAT main websites are built based on AM335X processors | |
| CN204291487U (en) | Based on the LED automatic addressing circuit of DMX512, light fixture and system | |
| CN104683194A (en) | PWM-based one-way master-slave one-to-many multi-computer communication method | |
| CN104717110A (en) | Transmitting method based on PWM master-slave type one-way multi-computer communication | |
| CN204229197U (en) | The Integrated Service Digital Network formula circuit control system of music fountain | |
| CN104780084A (en) | Sending method for PWM (Pulse Wavelength Modulation) master-slave one-way multi-computer communication | |
| CN203387692U (en) | Wireless gateway equipment capable of data conversion of ZigBee signal with Wi-Fi signal | |
| KR101338153B1 (en) | Middleware technology based on Device model | |
| CN204116926U (en) | A kind of Programmable Logic Controller integrated equipment of supporting industry Ethernet | |
| CN103547015A (en) | Intelligent lighting system with power line for controlling light and control method of intelligent lighting system | |
| CN210075665U (en) | Street light controller | |
| CN204203740U (en) | Switch Signal Transmission System Based on Fieldbus | |
| CN103731932A (en) | Multi-wireless-communication compatible system and communication method thereof | |
| CN104883306A (en) | Router expansion intelligent antenna |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150603 |