CN101232425B - Bus type distributed control system master-salve station opposite terminal control method - Google Patents
- ️Wed Apr 21 2010
Info
-
Publication number
- CN101232425B CN101232425B CN2007100265731A CN200710026573A CN101232425B CN 101232425 B CN101232425 B CN 101232425B CN 2007100265731 A CN2007100265731 A CN 2007100265731A CN 200710026573 A CN200710026573 A CN 200710026573A CN 101232425 B CN101232425 B CN 101232425B Authority
- CN
- China Prior art keywords
- main website
- order
- slave station
- return data
- bag Prior art date
- 2007-01-26 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
The invention provides a master-slave station peer-to-peer control method for a bus-type distribution control system. Compared with prior token control method and standard data communication control procedure method, the method has the advantages of simple implementation, high efficiency, and low resources occupancy. The method is particularly suitable for a bus-type distribution control system with half-duplex hardware such as a RS-485 bus, and implements a simple and high-efficiency peer-to-peer control function by a control method including a unique control token and a combined control process.
Description
Technical field
The present invention relates to the bus type distributed control system master-salve station communication technology, specifically be meant a kind of bus type distributed control system master-salve station opposite end control method.
Background technology
Along with the complexity of control system improves constantly, a large amount of control system by unit control changing into the multimachine collecting and distributing type control in past, is also referred to as distributed control usually.In built-in field, dcs is coordinated by primary processor and controls a plurality ofly to finish controlled function jointly from processor, usually we claim the control module of primary processor composition to be " main website ", and each control module of forming from processor is " slave station ".Collecting and distributing control requires must be able to intercom mutually between main website and slave station, usually the master-salve station that adopts communicates to connect mode at present RS-485, RS-422, CAN, Ethernet etc., the RS-485 mode has advantages such as simple and reliable, long transmission distance, cost be low in numerous modes, be widely used in little to the communication of plate inter-stage, greatly to fields such as communications between building.
Because the RS-485 link is semiduplex communication link, promptly each only allows a website to send data on bus links constantly, otherwise will data collision occur and destroy data.Therefore in the control system based on the RS-485 mode, can set a website usually is main website, and other websites are slave station, are coordinated the communication of each slave station by main website.The conventional method that slave station is coordinated by main website is to adopt the token method, and control features is briefly described below:
(1) main website divides the inquiry frame usually, frame and poll frame is set the control of slave station, when slave station is received the inquiry frame or is passive content in the frame to be responded when frame is set, and slave station can initiatively be sent out data to main website when receiving poll frame, to obtain the data of own needs from main website.Usually main website can be regularly and higher density send poll frame, and inquiry frame and frame is set in needs, just sends usually.
(2) after slave station need obtain permission slave station that main website sends and sends token, could initiatively initiate the command request of slave station to main website, main website can not inquire about the real time data that obtains slave station at the response slave station during to the main website command request simultaneously.
(3) main website need carry out the operation of main website inquiry slave station data in addition after the command request of the slave station of handling to main website, just can obtain the slave station real time data.
Certainly, master-salve station communication also can be adopted some standard data communications control procedures, as ADCCP, SDLC/HDLC etc., but no matter be to adopt previously described token mode or standard data communications control procedure, its shortcoming all be realize complicated, to expend processor resource many.
Summary of the invention
The objective of the invention is to overcome the shortcoming and defect of above-mentioned prior art, a kind of bus type distributed control system master-salve station of advantages of simplicity and high efficiency opposite end control method is provided.
Purpose of the present invention is achieved through the following technical solutions: this a kind of bus type distributed control system master-salve station opposite end control method, and it may further comprise the steps:
(1) each slave station all is in accepting state, and main website is sent completely the back and waits for that receiving slave station returns by the order of bus transmission to slave station 1;
(2) because each slave station all has an independently address, can specify tributary address in the order that main website sends, therefore all slave stations can both receive the main website order, but the slave station 1 that only meets address in the main website order just can respond, slave station 1 this order of identification is also handled formation main website order return data bag " A ", check simultaneously whether our station has the command request of operation main website, if not then main website order return data bag " A " is directly returned to main website; If slave station 1 has the operational order request of pair main website, then main website order return data bag " A " is returned to main website together with 1 pair of main website of slave station operational order bag " B ", at this moment, adopt oppositely order special identifier symbol " F " separation between described main website order return data bag " A " and 1 pair of main website of the slave station operational order bag " B ", slave station 1 enters and waits for the main website return state then;
(3) after the data that slave station 1 returns have been received by main website, then whether main website has reverse order special identifier symbol " F " in the identification return data earlier, if have then return data carried out twice processing: at first handle main website order return data bag " A ", handle 1 pair of main website of slave station operational order bag " B " then, obtain return data bag " B1 ", after obtaining " B1 ", the corresponding order that generates main website to slave station 1 once more, this order together returns to slave station 1 together with " B1 ", adopts between this order and the return data bag " B1 " and oppositely orders special identifier symbol " F " to be separated;
(4) slave station 1 is after receiving the main website order, then in the identification return data whether reverse order special identifier symbol " F " is arranged earlier, if have then return data carried out twice processing, at first handle the order of main website to slave station 1, form main website order return data bag " A ", handle the return data bag " B1 " of 1 pair of main website of slave station operational order bag " B " then, after finishing above-mentioned processing, slave station 1 need judge whether in addition the operational order request to main website, if have, then the operational order bag " B " with main website order return data bag " A " and 1 pair of main website of slave station together returns to main website, adopt oppositely order special identifier symbol " F " separation between described main website order return data bag " A " and 1 pair of main website of the slave station operational order bag " B ", slave station 1 enters and waits for the main website return state then, comes back to step (3);
(5) when slave station 1 during more not to the operational order request of main website, 1 of slave station directly returns to main website with main website order return data bag " A ", and slave station 1 enters accepting state then;
(6) main website forms the order to next slave station (as slave station 2) after receiving and handle the main website order return data bag " A " that slave station 1 returns.
Must realize the present invention for better, described bus type distributed control system is a half-duplex bus formula distribution control system.
Described half-duplex bus formula distribution control system is the bus type distributed control system of RS-485 mode; When main website sent data, first set RS-485 chip sent enable pin " TX_EN "; Close the RS-485 chip after being sent completely and send enable pin " TX_EN ", make it enter accepting state; Slave station 1 also is that set RS-485 chip sends enable pin " TX_EN " when sending data, sends data to bus then, closes the RS-485 chip after being sent completely and sends enable pin " TX_EN ", makes it enter accepting state.
Described order comprises polling order " L ", or querying command " Q ", or order " C " is set.
The present invention compared with prior art, have following advantage and beneficial effect: implementation method is simple, communication efficiency improves, shortened polling cycle, when slave station quantity was many, poll speed improved particularly evident, this method is particularly suitable for being on the hardware semiduplex bus type distributed control system, as the RS-485 bus etc., on control method, by unique controlled flag with cooperate control flow, realize advantages of simplicity and high efficiency master-salve station system opposite end controlled function.
(1) each polling order of main frame or querying command, order is set, all can obtain up-to-date slave station real time data and slave station simultaneously to the main website command request.
(2) this sort command and opposite end command execution results are together returned and are sent to the opposite end, and the efficient height relies on reverse command identifier between both orders and separates.
(3) main website or slave station side receive whether identification earlier exists reverse command identifier behind the return data, return and command request with processing command respectively.
Description of drawings
Fig. 1 is existing bus type distributed control system structure principle chart;
Fig. 2 is the bus type distributed control system structure principle chart of RS-485 mode;
Fig. 3 is the control flow chart of a kind of bus type distributed control system master-salve station of the present invention opposite end control method.
Embodiment
Below in conjunction with embodiment and accompanying drawing, the present invention is described in further detail, but embodiments of the present invention are not limited thereto.
Embodiment one
Fig. 1 is existing bus type distributed control system structure principle chart, and main website is connected with each slave station by bus driver.
As shown in Figure 2, bus type distributed control system of the present invention is the bus type distributed control system of RS-485 mode, the MCU of main website (microcontroller) is connected with the MCU of each slave station by the RS-485 chip for driving, usually the RS-485 chip for driving is in accepting state, in the time will sending out data, make it be operated in transmit status, send after the data and make it be operated in accepting state at once.
As shown in Figure 3, the step of a kind of bus type distributed control system master-salve station of the present invention opposite end control is such:
(1) each slave station all is in accepting state, and main website is sent completely the back and waits for that receiving slave station returns by the order of bus transmission to slave station 1;
(2) because each slave station all has an independently address, can specify tributary address in the order that main website sends, therefore all slave stations can both receive the main website order, but the slave station 1 that only meets address in the main website order just can respond, slave station 1 this order of identification is also handled formation main website order return data bag " A ", check simultaneously whether our station has the command request of operation main website, if not then main website order return data bag " A " is directly returned to main website; If slave station 1 has the operational order request of pair main website, then main website order return data bag " A " is returned to main website together with 1 pair of main website of slave station operational order bag " B ", at this moment, adopt oppositely order special identifier symbol " F " separation between described main website order return data bag " A " and 1 pair of main website of the slave station operational order bag " B ", slave station 1 enters and waits for the main website return state then;
(3) after the data that slave station 1 returns have been received by main website, then whether main website has reverse order special identifier symbol " F " in the identification return data earlier, if have then return data carried out twice processing: at first handle main website order return data bag " A ", handle 1 pair of main website of slave station operational order bag " B " then, obtain return data bag " B1 ", after obtaining " B1 ", the corresponding order that generates main website to slave station 1 once more, this order together returns to slave station 1 together with " B1 ", adopts between this order and the return data bag " B1 " and oppositely orders special identifier symbol " F " to be separated;
(4) slave station 1 is after receiving the main website order, then in the identification return data whether reverse order special identifier symbol " F " is arranged earlier, if have then return data carried out twice processing, at first handle the order of main website to slave station 1, form main website order return data bag " A ", handle the return data bag " B1 " of 1 pair of main website of slave station operational order bag " B " then, after finishing above-mentioned processing, slave station 1 need judge whether in addition the operational order request to main website, if have, then the operational order bag " B " with main website order return data bag " A " and 1 pair of main website of slave station together returns to main website, adopt oppositely order special identifier symbol " F " separation between described main website order return data bag " A " and 1 pair of main website of the slave station operational order bag " B ", slave station 1 enters and waits for the main website return state then, comes back to step (3);
(5) when slave station 1 during more not to the operational order request of main website, 1 of slave station directly returns to main website with main website order return data bag " A ", and slave station 1 enters accepting state then;
(6) main website forms the order to next slave station (as slave station 2) after receiving and handle the main website order return data bag " A " that slave station 1 returns.
When main website sent data, first set RS-485 chip sent enable pin " TX_EN "; Close the RS-485 chip after being sent completely and send enable pin " TX_EN ", make it enter accepting state; Slave station 1 also is that set RS-485 chip sends enable pin " TX_EN " when sending data, sends data to bus then, closes the RS-485 chip after being sent completely and sends enable pin " TX_EN ", makes it enter accepting state.
Above-mentioned controlled step also goes for the control procedure of main website when slave station is sent querying command " Q " or order " C " is set.
As mentioned above, just can realize the present invention preferably.
Claims (4)
1. bus type distributed control system master-salve station opposite end control method is characterized in that may further comprise the steps:
(1) each slave station all is in accepting state, and main website is sent completely the back and waits for that receiving slave station returns by the order of bus transmission to slave station 1;
(2) because each slave station all has an independently address, can specify tributary address in the order that main website sends, therefore all slave stations can both receive the main website order, but the slave station 1 that only meets address in the main website order just can respond, slave station 1 this order of identification is also handled formation main website order return data bag " A ", check simultaneously whether our station has the command request of operation main website, if not then main website order return data bag " A " is directly returned to main website; If slave station 1 has the operational order request of pair main website, then main website order return data bag " A " is returned to main website together with 1 pair of main website of slave station operational order bag " B ", at this moment, adopt oppositely order special identifier symbol " F " separation between described main website order return data bag " A " and 1 pair of main website of the slave station operational order bag " B ", slave station 1 enters and waits for the main website return state then;
(3) after the data that slave station 1 returns have been received by main website, then whether main website has reverse order special identifier symbol " F " in the identification return data earlier, if have then return data carried out twice processing: at first handle main website order return data bag " A ", handle 1 pair of main website of slave station operational order bag " B " then, obtain return data bag " B1 ", after obtaining " B1 ", the corresponding order that generates main website to slave station 1 once more, this order together returns to slave station 1 together with " B1 ", adopts between this order and the return data bag " B1 " and oppositely orders special identifier symbol " F " to be separated;
(4) slave station 1 is after receiving the main website order, then in the identification return data whether reverse order special identifier symbol " F " is arranged earlier, if have then return data carried out twice processing, at first handle the order of main website to slave station 1, form main website order return data bag " A ", handle the return data bag " B1 " of 1 pair of main website of slave station operational order bag " B " then, after finishing above-mentioned processing, slave station 1 need judge whether in addition the operational order request to main website, if have, then the operational order bag " B " with main website order return data bag " A " and 1 pair of main website of slave station together returns to main website, adopt oppositely order special identifier symbol " F " separation between described main website order return data bag " A " and 1 pair of main website of the slave station operational order bag " B ", slave station 1 enters and waits for the main website return state then, comes back to step (3);
(5) when slave station 1 during more not to the operational order request of main website, 1 of slave station directly returns to main website with main website order return data bag " A ", and slave station 1 enters accepting state then;
(6) main website forms the order to next slave station after receiving and handle the main website order return data bag " A " that slave station 1 returns.
2. according to the described a kind of bus type distributed control system master-salve station of claim 1 opposite end control method, it is characterized in that: described bus type distributed control system is a half-duplex bus formula distribution control system.
3. according to the described a kind of bus type distributed control system master-salve station of claim 2 opposite end control method, it is characterized in that: described half-duplex bus formula distribution control system is the bus type distributed control system of RS-485 mode; When main website sent data, first set RS-485 chip sent enable pin " TX_EN "; Close the RS-485 chip after being sent completely and send enable pin " TX_EN ", make it enter accepting state; Slave station 1 also is that set RS-485 chip sends enable pin " TX_EN " when sending data, sends data to bus then, closes the RS-485 chip after being sent completely and sends enable pin " TX_EN ", makes it enter accepting state.
4. according to the described a kind of bus type distributed control system master-salve station of claim 1 opposite end control method, it is characterized in that: described order comprises polling order " L ", or querying command " Q ", or order " C " is set.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007100265731A CN101232425B (en) | 2007-01-26 | 2007-01-26 | Bus type distributed control system master-salve station opposite terminal control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007100265731A CN101232425B (en) | 2007-01-26 | 2007-01-26 | Bus type distributed control system master-salve station opposite terminal control method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101232425A CN101232425A (en) | 2008-07-30 |
CN101232425B true CN101232425B (en) | 2010-04-21 |
Family
ID=39898616
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2007100265731A Expired - Fee Related CN101232425B (en) | 2007-01-26 | 2007-01-26 | Bus type distributed control system master-salve station opposite terminal control method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101232425B (en) |
Families Citing this family (18)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101483646B (en) * | 2009-01-22 | 2013-06-05 | 浙江大学 | Method and interface for high-speed communication on bus |
CN101799680B (en) * | 2010-02-09 | 2012-01-11 | 张文中 | Distributed loop-opening automatic control system and method using utilizing electronic communication equipment |
CN102123007A (en) * | 2011-03-01 | 2011-07-13 | 上海奈凯电子科技有限公司 | Communication method for realizing data transmission in numerical control system |
CN102841554A (en) * | 2011-06-24 | 2012-12-26 | 镇江华扬信息科技有限公司 | Intelligent remote control method for system |
CN103763167B (en) * | 2013-12-25 | 2016-06-01 | 京东方科技集团股份有限公司 | Communication system and communication method thereof |
CN103716420A (en) * | 2014-01-03 | 2014-04-09 | 西南大学 | Automatic station address obtaining method of Modbus ASCII slave station and slave station |
CN103684938B (en) * | 2014-01-26 | 2017-03-08 | 华中科技大学 | A kind of industrial bluetooth network system and network-building method |
CN104503390B (en) * | 2014-11-30 | 2017-05-24 | 天津理工大学 | Method for achieving automatic recognition of main station through industrial Ethernet integrated slave station |
CN104410557A (en) * | 2014-12-25 | 2015-03-11 | 深圳中科讯联科技有限公司 | Dynamic networking method and communication method based on RS-485 |
CN104683194A (en) * | 2015-02-14 | 2015-06-03 | 河南辉瑞生物医电技术有限公司 | PWM-based one-way master-slave one-to-many multi-computer communication method |
CN104683068A (en) * | 2015-02-14 | 2015-06-03 | 河南辉瑞生物医电技术有限公司 | PWM-based one-way master-slave multi-computer communication method |
CN105700335A (en) * | 2016-03-22 | 2016-06-22 | 飞亚达(集团)股份有限公司 | State collection and judgment method and state collection and judgment system for terminal clock of time synchronization system |
CN106125711B (en) * | 2016-09-05 | 2018-10-16 | 广州途道信息科技有限公司 | A kind of control method based on bus communication |
CN107682247B (en) * | 2017-09-15 | 2020-10-23 | 广东芬尼克兹节能设备有限公司 | Efficient communication method for host and multiple slaves |
CN107942769B (en) * | 2017-10-09 | 2021-04-06 | 深圳市瑞凌实业股份有限公司 | Communication system and method for digital power supply and various digital welding devices |
CN109639366B (en) * | 2019-01-31 | 2022-01-28 | 华夏世昌(北京)科技有限公司 | Signal pulse width modulation and demodulation method based on two-wire bus communication |
CN109587022B (en) * | 2019-01-31 | 2021-11-23 | 华夏世昌(北京)科技有限公司 | Communication method of ignition drive bus IDBUS |
CN112702248A (en) * | 2020-12-28 | 2021-04-23 | 苏州和欣致远节能科技有限公司 | High-efficiency communication method realized by low-speed field bus |
Citations (2)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1232217A (en) * | 1998-01-23 | 1999-10-20 | 索尼公司 | Transmitting system, transmitting method, and transmitting/receiving system |
CN1301364A (en) * | 1997-09-05 | 2001-06-27 | 索尼克斯公司 | Fully-pipelined fixed-latency communications system with a real-time dynamic bandwidth allocation |
-
2007
- 2007-01-26 CN CN2007100265731A patent/CN101232425B/en not_active Expired - Fee Related
Patent Citations (2)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1301364A (en) * | 1997-09-05 | 2001-06-27 | 索尼克斯公司 | Fully-pipelined fixed-latency communications system with a real-time dynamic bandwidth allocation |
CN1232217A (en) * | 1998-01-23 | 1999-10-20 | 索尼公司 | Transmitting system, transmitting method, and transmitting/receiving system |
Also Published As
Publication number | Publication date |
---|---|
CN101232425A (en) | 2008-07-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101232425B (en) | 2010-04-21 | Bus type distributed control system master-salve station opposite terminal control method |
CN107465764B (en) | 2021-01-05 | Star topology based internet of things communication system, gateway equipment and method |
CN107580085B (en) | 2019-12-13 | Networking method of Internet of things |
CN106210152B (en) | 2020-04-21 | A vehicle cloud system and resource acquisition method based on the Internet of Things |
CN105022276A (en) | 2015-11-04 | Smart home system and data interaction method thereof |
CN112713917B (en) | 2022-04-26 | HPLC-based communication method and device, storage medium and electronic device |
CN102567125A (en) | 2012-07-11 | Method for realizing communication between browser pages |
CN105553795B (en) | 2018-10-16 | A method of the transmission standard Ethernet data in Industrial Ethernet |
CN107370792A (en) | 2017-11-21 | A DALI extension system and control method |
CN102916874B (en) | 2016-06-08 | A kind of file transmitting method and equipment |
CN103716092A (en) | 2014-04-09 | Networking system and communication method for bidirectional optical fiber communication in bus network |
CN215378952U (en) | 2021-12-31 | Edge gateway terminal equipment and data processing system based on cloud edge cooperation technology |
CN108809608A (en) | 2018-11-13 | A kind of high-effective data collecting system and control method based on LoRaWAN agreements |
CN101014050A (en) | 2007-08-08 | Connection-based communication protocol of CAN bus applied for a great deal of data |
CN207926623U (en) | 2018-09-28 | Vehicle netbios and automobile |
CN105632385A (en) | 2016-06-01 | LED display screen blind spot detection method and detection device thereof |
CN105530151A (en) | 2016-04-27 | GPRS module and information transmission method for GPRS module |
CN106302188A (en) | 2017-01-04 | The multicast message transmission control method of a kind of switch device and device |
CN108770063A (en) | 2018-11-06 | A kind of method of integrated gateway and processing multinode communication collision |
CN101895560A (en) | 2010-11-24 | Fieldbus DP-NET with open two-stage topological structure |
CN112512012B (en) | 2022-08-12 | Multi-vehicle linkage system and method based on 5G virtual private communication |
CN202513948U (en) | 2012-10-31 | Master-slave protocol conversion gateway from Ethernet to PROFIBUS-DP |
CN106657093A (en) | 2017-05-10 | Gateway protocol for smart home |
CN102307200A (en) | 2012-01-04 | Method for packaging 376.1 protocol/645 protocol in Ethernet frame |
CN100481774C (en) | 2009-04-22 | Method for establishing configuration management operation channel and networking device communication |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2008-07-30 | C06 | Publication | |
2008-07-30 | PB01 | Publication | |
2008-09-24 | C10 | Entry into substantive examination | |
2008-09-24 | SE01 | Entry into force of request for substantive examination | |
2010-04-21 | C14 | Grant of patent or utility model | |
2010-04-21 | GR01 | Patent grant | |
2016-03-23 | CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20100421 Termination date: 20150126 |
2016-03-23 | EXPY | Termination of patent right or utility model | |
2016-03-30 | CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20100421 Termination date: 20150126 |
2016-03-30 | EXPY | Termination of patent right or utility model |