CN104717110A - Transmitting method based on PWM master-slave type one-way multi-computer communication - Google Patents

Transmitting method based on PWM master-slave type one-way multi-computer communication Download PDF

Info

Publication number
CN104717110A
CN104717110A CN201510077985.2A CN201510077985A CN104717110A CN 104717110 A CN104717110 A CN 104717110A CN 201510077985 A CN201510077985 A CN 201510077985A CN 104717110 A CN104717110 A CN 104717110A
Authority
CN
China
Prior art keywords
machine
pwm
slave
computer
master
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
CN201510077985.2A
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.)
Henan Xi Rui Medical Electronics Technology Co Ltd
Original Assignee
Henan Xi Rui Medical Electronics Technology 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 Henan Xi Rui Medical Electronics Technology Co Ltd filed Critical Henan Xi Rui Medical Electronics Technology Co Ltd
Priority to CN201510077985.2A priority Critical patent/CN104717110A/en
Publication of CN104717110A publication Critical patent/CN104717110A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Abstract

The invention discloses a transmitting method based on PWM master-slave type one-way multi-computer communication. The method comprises the steps that 1, system is initialized; 2, 1#-N# slave computers in a PWM module of a master computer and PWM periods of slave computer parameters are set, N>=1, and N is a natural number; mutually-exclusive slave computer heading codes among the 1#-N# slave computers are set, and different PWM periods among different parameters of the same slave computer are set; slave computer parameter values are expressed by the pulse width of PWM; the master computer transmits the slave computer heading codes in sequence according to the sequence of the 1#-N# slave computers, and then the master computer transmits the period and the pulse width of the PWM containing the slave computer parameters and the information of the slave computer parameter values; 3, the master computer inquires update requests of the 1#-N# slave computers alternately and updates all the parameters to be updated of the 1#-N# slave computers in sequence; the step 3 is executed circularly. By means of the method, the communication protocol between the master computer and the slave computers is simplified, the communication efficiency and the instantaneity are high, and meanwhile the communication reliability is improved.

Description

A kind of sending method based on the unidirectional multi-computer communication of PWM master-slave mode
Technical field
The present invention relates to the transmission technology of multi-computer communication, particularly relate to a kind of sending method based on the unidirectional multi-computer communication of PWM master-slave mode.
Background technology
In various equipment use system, master-slave multhi-proc-cssor system is the most common in multi-computer communication form, and the unidirectional multi-computer communication of master-slave mode this multimachine form communication pattern typical case especially.But the unidirectional multi-computer communication of master-slave mode owing to adopting the existing communication module of microcomputer as integrated UART module more, and the low and high level sequence sent by communication module completes, and thus there are the following problems: agreement is complicated, and maintenance difficulties is large, consuming time many; Data communication real-time and efficiency are all not high; 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 sending method based on the unidirectional multi-computer communication of PWM master-slave mode is provided, fundamentally solve main frame and complicated from communication protocol between machine, communication efficiency and real-time are not high, and the problem such as data communication reliability is not strong.
For achieving the above object, the present invention by the following technical solutions:
Based on a sending method for the unidirectional multi-computer communication of PWM master-slave mode, wherein, comprise the steps:
Step 1, system initialization;
Step 2, sets 1 in the PWM module of main frame # ~ N # from the PWM cycle from machine identification parameter and the PWM cycle from machine parameter of machine, N>=1, N is natural number; Described 1 # ~ N # different from machine identification code from setting between machine, describedly adopt the PWM cycle to represent from machine identification code, samely between the different parameters of machine, set the different PWM cycles; Describedly to represent from the pulsewidth of machine parameter value by PWM; 1 # ~ N # from arrange between machine from the mutual exclusion of machine identification code;
Main frame is according to 1 # ~ N # send from machine identification code successively from the order of machine, then send and comprise this from machine parameter with from PWM cycle of machine parameter information and pulsewidth;
Step 3, main wheel continuous query 1 # ~ N # also 1 is upgraded successively from the update request of machine # ~ N # from all parameters that machine is to be updated; Circulation performs step 3.
As preferably, described 1 # ~ N # adjacent from differing as 1ms from the machine identification code PWM cycle of setting between machine from machine.
As preferably, the PWM cycle set between the described same adjacent parameter from machine differs as 0.1ms.
The beneficial effect of the invention is:
The present invention is directed to the ever-present main frame of the unidirectional multi-machine communication system of master-slave mode and complicated from communication protocol between machine, operation maintenance difficulty is large, consuming time many; Data communication real-time and efficiency are all not high; The problems such as data communication reliability is not strong, the present invention adopts different communication modes, thus fundamentally solves the problems referred to above in the unidirectional multi-machine communication system of master-slave mode.The present invention adopts PWM to be different from as information carrier to adopt level as information carrier, and respectively between machine and set the different PWM cycles between each parameter and distinguish, the parameter value that transmit is represented by PWM pulsewidth.Present invention achieves 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, step 2, sets 1 in the PWM module of main frame # ~ 6 # from the PWM cycle from machine identification parameter and the PWM cycle from machine parameter of machine; 1 # ~ 6 # different from machine identification code from setting between machine, adopt the PWM cycle to represent from machine identification code, the different PWM cycles from machine identification code is different.Samely between the different parameters of machine, set the different PWM cycles; Represent from the pulsewidth of machine parameter value by PWM.
Main frame is according to 1 # ~ 6 # send from machine identification code successively from the order of machine, then send and comprise this from machine parameter with from PWM cycle of machine parameter information and pulsewidth;
Step 3, main wheel continuous query 1 # ~ 6 # from the update request of machine, and upgrade 1 successively # ~ 6 # from all parameters that machine is to be updated; Circulation performs step 3.PWM-20ms in Fig. 1 refers to send the duration from machine identification code, receives and identifies from machine so that corresponding.
As shown in Figure 2,1 # from machine, 2 # from machine, 3 # from machine, 4 # from machine, 5 # from machine, 6 # between machine identification code, the PWM cycle of adjacent mutual deviation 1 millisecond is adopted to distinguish from the adjacent of machine, 1 # from 1 of machine # parameter, 2 # parameter, 3 # parameter, 4 # parameter adopts the PWM cycle of adjacent mutual deviation 0.1 millisecond between adjacent two parameters to distinguish, and 2 # from machine, 3 # from machine, 4 # from machine, 5 # from machine, 6 # between the different parameters of machine, also adopt the PWM cycle of adjacent mutual deviation 0.1 millisecond to distinguish.Represent from the pulsewidth of machine parameter value by PWM.The present invention adopts PWM as information carrier, different between machine, between the same different parameters from machine and difference between the parameter of machine, adopt the different PWM cycles to distinguish, the parameter value that transmit is represented by the pulsewidth of PWM.
Communication protocol of the present invention is simple and clear, 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 sending method for the unidirectional multi-computer communication of PWM master-slave mode, it is characterized in that: comprise the steps:
Step 1, system initialization;
Step 2, sets 1 in the PWM module of main frame # ~ N # from the PWM cycle from machine identification parameter and the PWM cycle from machine parameter of machine, N>=1, N is natural number; Described 1 # ~ N # different from machine identification code from setting between machine, describedly adopt the PWM cycle to represent from machine identification code, samely between the different parameters of machine, set the different PWM cycles; Describedly to represent from the pulsewidth of machine parameter value by PWM;
Main frame is according to 1 # ~ N # send from machine identification code successively from the order of machine, then send and comprise this from machine parameter with from PWM cycle of machine parameter information and pulsewidth;
Step 3, main wheel continuous query 1 # ~ N # also 1 is upgraded successively from the update request of machine # ~ N # from all parameters that machine is to be updated; Circulation performs step 3.
2. a kind of sending method based on the unidirectional multi-computer communication of PWM master-slave mode according to claim 1, is characterized in that: described 1 # ~ N # adjacent from differing as 1ms from the machine identification code PWM cycle of setting between machine from machine.
3. a kind of sending method based on the unidirectional multi-computer communication of PWM master-slave mode according to claim 1 and 2, is characterized in that: the PWM cycle set between the described same adjacent parameter from machine differs as 0.1ms.
CN201510077985.2A 2015-02-14 2015-02-14 Transmitting method based on PWM master-slave type one-way multi-computer communication Pending CN104717110A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510077985.2A CN104717110A (en) 2015-02-14 2015-02-14 Transmitting method based on PWM master-slave type one-way multi-computer communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510077985.2A CN104717110A (en) 2015-02-14 2015-02-14 Transmitting method based on PWM master-slave type one-way multi-computer communication

Publications (1)

Publication Number Publication Date
CN104717110A true CN104717110A (en) 2015-06-17

Family

ID=53416101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510077985.2A Pending CN104717110A (en) 2015-02-14 2015-02-14 Transmitting method based on PWM master-slave type one-way multi-computer communication

Country Status (1)

Country Link
CN (1) CN104717110A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111586205A (en) * 2020-05-13 2020-08-25 贵州浙储***科技有限公司 Method and device for automatically allocating slave addresses in battery management system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526800A (en) * 2008-03-07 2009-09-09 十堰科纳汽车电器有限公司 Method and system for transmitting a plurality of parameters by utilizing multicycle PWM signals
CN101986765A (en) * 2010-10-28 2011-03-16 河南理工大学 Singlechip-based low-power consumption networking positioning instrument
CN102546033A (en) * 2011-12-15 2012-07-04 广东佳和通信技术有限公司 Multimachine communication device achieved by adopting pulse modulation combined with serial port mode

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526800A (en) * 2008-03-07 2009-09-09 十堰科纳汽车电器有限公司 Method and system for transmitting a plurality of parameters by utilizing multicycle PWM signals
CN101986765A (en) * 2010-10-28 2011-03-16 河南理工大学 Singlechip-based low-power consumption networking positioning instrument
CN102546033A (en) * 2011-12-15 2012-07-04 广东佳和通信技术有限公司 Multimachine communication device achieved by adopting pulse modulation combined with serial port mode

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111586205A (en) * 2020-05-13 2020-08-25 贵州浙储***科技有限公司 Method and device for automatically allocating slave addresses in battery management system

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
CN103986786A (en) Remote cloud desktop operation system
CN104756559A (en) Systems and methods for power savings in wireless communications
CN101208652A (en) I2C slave device with programmable write-transaction cycles
CN106603530A (en) Control system and method for electronic device compatible with different communication protocols
CN104486111A (en) 1553B data bus system network management method
CN102802316B (en) Lighting control device for realizing transmission of DALI (digital addressable lighting interface) bus protocol through ZigBee
CN104717110A (en) Transmitting method based on PWM master-slave type one-way multi-computer communication
CN204462674U (en) A kind of intelligent salt washing process based on Internet of Things
CN104102607A (en) CAN (controlled area network) bus driving method and system based on VxWorks operating system environment
CN103476058A (en) Data communication method and device in ZIGBEE network
CN103986588B (en) Computer system and far-end remote control method of computer device
CN202873087U (en) Wireless gateway for agricultural Internet of Things
CN104780084A (en) Sending method for PWM (Pulse Wavelength Modulation) master-slave one-way multi-computer communication
CN104683194A (en) PWM-based one-way master-slave one-to-many multi-computer communication method
CN203387692U (en) Wireless gateway equipment capable of data conversion of ZigBee signal with Wi-Fi signal
CN104683068A (en) PWM-based one-way master-slave multi-computer communication method
CN104283872A (en) Remote controller supporting CAN controller and PLC
CN103973539B (en) The method for running automated system
KR101338153B1 (en) Middleware technology based on Device model
CN103547015A (en) Intelligent lighting system with power line for controlling light and control method of intelligent lighting system
CN201994958U (en) Intelligent communication node between CAN (controller area network) bus and Ethernet
CN106878348B (en) Master station longitudinal data transmission method based on source end point table model maintenance
CN203930424U (en) A kind of intelligent control module and system
CN104917704A (en) Method and system for multiplexing 10GBase-R PCSs and 40GBase-R PCSs in the same architecture

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: 20150617