CN101989941A - RS485 bus addressing method - Google Patents

RS485 bus addressing method Download PDF

Info

Publication number
CN101989941A
CN101989941A CN2009100560407A CN200910056040A CN101989941A CN 101989941 A CN101989941 A CN 101989941A CN 2009100560407 A CN2009100560407 A CN 2009100560407A CN 200910056040 A CN200910056040 A CN 200910056040A CN 101989941 A CN101989941 A CN 101989941A
Authority
CN
China
Prior art keywords
equipment
addressing
controller
broadcasting signal
bus
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
CN2009100560407A
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.)
JUER (SHANGHAI) PHOTOELECTRIC LIGHTING CO Ltd
Original Assignee
JUER (SHANGHAI) PHOTOELECTRIC LIGHTING 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 JUER (SHANGHAI) PHOTOELECTRIC LIGHTING CO Ltd filed Critical JUER (SHANGHAI) PHOTOELECTRIC LIGHTING CO Ltd
Priority to CN2009100560407A priority Critical patent/CN101989941A/en
Publication of CN101989941A publication Critical patent/CN101989941A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention relates to a RS485-based automatic addressing method, which aims to solve the problem that because an interlinking method of adopting a bus to serially connect nodes by a RS485 is adopted, the addressing on each device has certain difficulty. In the invention, a RS485 bus addressing technique is adopted, through the on/off of a switch and the matching of software, the purpose of automatically addressing RS485 buses is achieved, thereby addressing a plurality of devices connected with a host in a certain sequence, and when the x(th) device is controlled to be accessed, the control and access operations can be performed simply and conveniently.

Description

RS485 bus addressing method
Technical field
The present invention relates to communication technique field, particularly relate to a kind of bus addressing method at the RS485 communication.
Background technology
RS485 sends standard by a kind of balanced type data that the EIA of EIA (Electronic Industries Association) proposed in nineteen eighty-three, and the transceiver that satisfies this standard adopts balance to send and the differential received working method.In fact, RS485 (TIA/EIA-485) is counted as a kind of expansion of TIA/EIA-422 standard usually.Owing to support multinode (32 or more nodes), remote (maximum 4000 feet) and receive high sensitivity (200mV), when constituting communication network, only need a pair of twisted-pair feeder to make transmission line, therefore with low cost, equipment is simple, has obtained extensive use under multistation, telecommunication environment.
RS-485 adopts half-duplex operation, supports multipoint data communication.The general bus type structure that adopts the terminal coupling of RS-485 bus network topology promptly adopts a bus that each node is connected in series, and does not support annular or Star Network.Use hub-and-spoke configuration if desired, just must use 485 repeaters or 485 hubs just can.General maximum 32 nodes of supporting of RS-485/422 bus if use 485 special chips, can reach 128 or 256 nodes, and maximum can support 400 nodes.
Because it is more flexible that RS485 has long transmission distance, good in anti-interference performance, networking, advantages such as support node is many, in in the past 20 years, RS485 is as a kind of electrical code of multiple spot differential data transmission, be used in many different fields, but be based on the characteristics that a main frame can only be arranged on the RS485 bus-bar, it often is applied between centralized control hinge and the decentralized control unit (as shown in Figure 1).
Because many limitation that RS485 bus-bar itself exists, along with development of science and technology, shortcomings such as the node application that the bus-bar efficient of RS485 reliability low, communication is low, multiple undesirable, the single bus-bar of transmission range of later maintenance cost network engineering application can articulate is dumb slowly come out, because the signal line of all devices all is connected on the bus, when signal is sent out by main frame, if equipment itself does not have address, all equipment on bus all can receive signal and action, so, just need to give the apparatus settings address earlier if need the equipment single movement.
And the equipment of controlling with RS-485 at present, no matter be light fixture or other equipment, when if system needs addressing, no matter be to utilize hardware to set, or utilize software to set, all need the addressing one by one of certain manpower and time, not only time-consuming but also require great effort, and in many RS-485 network architectures, many times, the address of equipment all is that continuity is arranged, in order to simplify the process of this addressing, the RS-485 bus addressing system of the innovation, the open and close of switch have been utilized, and the cooperation of software, as long as see through computer and system's line, simple next instruction. can realize the purpose of auto-addressing.
The present invention is just based in order to overcome above-mentioned defective, invented a kind of RS485 bus addressing technology, the RS-485 bus addressing system of the innovation, the open and close of switch have been utilized, and the cooperation of software, as long as see through computer and system's line,, can realize the purpose of auto-addressing by simple commands for controlling.
Summary of the invention
Technical problem to be solved by this invention provides a kind of automatic debugging method based on RS485.To solve problems of the prior art, technical scheme provided by the invention is as follows:
A kind of auto-addressing method based on RS485 is characterized in that comprising the steps:
Step 1, during system boot, before addressing work in a period of time, all devices D 1-D nReceive ON-and OFF-command, with those equipment D 1-D nCorresponding switch S 1-S nAll be in off-state, at this moment, controller does not send communication signal, and wherein n is a natural number;
Step 2, controller are issued orders and are allowed the equipment D of system to being connected 1-D nDo addressing action, controller is sent a broadcasting signal earlier, allows all devices D on this bus 1-D nAction, but, have only equipment D1 to move, and all the other equipment all are failure to actuate owing to all switches are disconnected earlier in the step 1, at this moment, equipment D1 can send a broadcasting signal to controller, has accepted addressing so that this equipment D1 to be described;
Step 3, controller is given an order, equipment D I-1Switch S I-1The broadcasting signal that closure, controller are sent is delivered to equipment D 1-D i, and because the equipment D of back I+1The switch of-Dn remains open mode, so can not receive this broadcasting signal, can not move, and this moment equipment D 1-D I-1Moved, so can not move again after receiving broadcasting signal, at this moment, equipment D iCan send a broadcasting signal to controller, so that this equipment D to be described iAccepted addressing, i+1 then, and repeat step 3 is up to whole equal addressing of n platform equipment.
Equipment D wherein 1-D nCan be light fixture, each light fixture can be set bright different color.
In the above-mentioned embodiment, equipment D 1-D nCan be light fixture, each light fixture can be set bright different color, thereby can come the position of failure judgement equipment according to the color of lamp.
Wherein n can get any natural number in principle, but gets 32,128,256,400 etc. usually.
Description of drawings
Fig. 1 is a typical R S485 system schematic.
Fig. 2 is a RS485 addressing system schematic diagram before the present invention starts shooting.
Fig. 3 is the RS485 addressing system schematic diagram of first equipment of the present invention.
Fig. 4 is the RS485 addressing system schematic diagram of second equipment of the present invention.
Fig. 5 is the RS485 addressing system schematic diagram of the 3rd equipment of the present invention.
Fig. 6 is the RS485 addressing system schematic diagram of the 4th equipment of the present invention.
Embodiment
Below in conjunction with accompanying drawing 2-6 and embodiment the present invention is described in detail.
After coming out, RS485 signal line slave controller connect n (n is a natural number) platform equipment, n gets 32,128,256,400 etc. usually, present embodiment n gets 4, and the signal rear end of each equipment is provided with a switch and controls the back corresponding apparatus, and inside is then accepted and control appliance by single-chip microcomputer.
During system boot, in a period of time, all devices D1-D4 receives ON-and OFF-command before addressing work, and as shown in Figure 2, switch S 1-S4 all is in off-state, and at this moment, controller does not send communication signal;
Then, controller is issued orders and is allowed system that the equipment that is connected is done the addressing action, controller can be sent a broadcasting signal earlier, allows all devices action on this bus, but since before all switches are disconnected earlier, have only equipment D1 to move, and all the other equipment all are failure to actuate, and at this moment, equipment D1 can add that the address number of self sends the addressing broadcasting signal to bus, to all the other the equipment D2-D4 addressing on the bus, as shown in Figure 3.
Simultaneously, switch S 1 closure of equipment D1, the addressing broadcasting signal that is sent by equipment D1 can be delivered to equipment D1 and D2, and because the switch of the equipment D3-D4 of back remains closed condition, so can not receive this broadcasting signal, can not move, and the addressed mistake of equipment D1 this moment, therefore can not move again after receiving this addressing broadcasting signal, have only equipment D2 can receive this addressing broadcasting signal and action, at this moment, equipment D2 can add that the address number of self sends the addressing broadcasting signal to bus, to all the other the equipment D3-D4 addressing on the bus, as shown in Figure 4.
Simultaneously, switch S 2 closures of equipment D2, the addressing broadcasting signal that equipment D2 sends is delivered to equipment D1-D3, and because the switch of the equipment D4 of back remains closed condition, so can not receive this addressing broadcasting signal, can not move, and this moment equipment D1 and the addressed mistake of D2, therefore can not move again after receiving broadcasting signal, have only equipment D3 can receive this addressing broadcasting signal and action, at this moment, equipment D3 can add that the address number of self sends the addressing broadcasting signal to bus, to all the other the equipment D4 addressing on the bus, as shown in Figure 5.
Simultaneously, switch S 3 closures of equipment D3, the addressing broadcasting signal that is sent by D3 is delivered to equipment D1-D5, and this moment, equipment D1-D3 moved, therefore can not move again after receiving this addressing broadcasting signal, have only equipment D4 can receive this addressing broadcasting signal and action, finish the addressing of equipment D4, as shown in Figure 6.
This moment, all devices was all addressed, finished the addressing task.
Equipment in the present embodiment can be light fixture equipment.
By the method for above-mentioned auto-addressing, can fast and easily be all devices addressing in the bus, saved great amount of manpower and material resources, remedied the deficiency in the RS485 communication, for further extensive use RS485 application power has had large increase.
Though the present invention is illustrated hereinbefore according to preferred embodiment of the present invention, this does not represent that protection scope of the present invention is confined to above-mentioned structure, if by structure that claim of the present invention covered all within protection range.Those skilled in the art can be developed the equivalent substitution structure that at an easy rate after reading above-mentioned explanation, and these equivalent alternative structure also are within the scope that this case requires.

Claims (3)

1. the auto-addressing method based on RS485 is characterized in that comprising the steps:
Step 1, during system boot, before debug work in a period of time, all devices D 1-D nReceive ON-and OFF-command, with those equipment D 1-D nCorresponding switch S 1-S nAll be in off-state, at this moment, controller does not send communication signal, and wherein n is a natural number;
Step 2, controller are issued orders and are allowed the equipment D of system to being connected 1-D nDo addressing action, controller is sent a broadcasting signal earlier, allows all devices D on this bus 1-D nAction, but, have only equipment D1 to move, and all the other equipment all are failure to actuate owing to all switches are disconnected earlier in the step 1, at this moment, equipment D1 can send a broadcasting signal to controller, has accepted addressing so that this equipment D1 to be described;
Step 3, controller is given an order, equipment D I-1Switch S I-1The broadcasting signal that closure, controller are sent is delivered to equipment D 1-D i, and because the equipment D of back I+1The switch of-Dn remains open mode, so can not receive this broadcasting signal, can not move, and this moment equipment D 1-D I-1Moved, so can not move again after receiving broadcasting signal, at this moment, equipment D iCan send a broadcasting signal to controller, so that this equipment D to be described iAccepted addressing, i+1 then, and repeat step 3 is up to whole equal addressing of n platform equipment.
2. the automatic debugging method of RS485 as claimed in claim 1, wherein equipment D 1-D nCan be light fixture, each light fixture can be set bright different color.
3. the automatic debugging method of RS485 as claimed in claim 2, wherein n≤32.
CN2009100560407A 2009-08-07 2009-08-07 RS485 bus addressing method Pending CN101989941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100560407A CN101989941A (en) 2009-08-07 2009-08-07 RS485 bus addressing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100560407A CN101989941A (en) 2009-08-07 2009-08-07 RS485 bus addressing method

Publications (1)

Publication Number Publication Date
CN101989941A true CN101989941A (en) 2011-03-23

Family

ID=43746296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100560407A Pending CN101989941A (en) 2009-08-07 2009-08-07 RS485 bus addressing method

Country Status (1)

Country Link
CN (1) CN101989941A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101989932B (en) * 2009-08-07 2012-12-12 巨尔(上海)光电照明有限公司 RS485-based automatic error detection method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101989932B (en) * 2009-08-07 2012-12-12 巨尔(上海)光电照明有限公司 RS485-based automatic error detection method

Similar Documents

Publication Publication Date Title
CN108667661B (en) Automatic numbering system and numbering method for in-situ distributed protection management host
EP3965535B1 (en) Method for quickly setting dmx addresses of lamps
WO2011026337A1 (en) System and method for monitoring parallel base station power supply
CN103024074A (en) DSP (digital signal processor) remote wireless upgrading method based on GPRS (general packet radio service)
CN105282904B (en) A kind of control system and its control method based on DMX512 agreement
CN101989932B (en) RS485-based automatic error detection method
CN102968184B (en) A kind of KVM long-distance management system
CN111023262A (en) Modbus protocol conversion device and multi-online centralized control system
CN109284121B (en) Method and system for synchronously updating programs of energy storage power supply multi-stage network multi-control equipment
CN104505942A (en) Power distribution automatic feeder terminal based on data bus and network thereof
CN106482080A (en) A kind of relay client/server system
CN106338938B (en) A kind of backplane bus communication addressing system and method
CN101989941A (en) RS485 bus addressing method
CN110456705B (en) Network control device capable of dynamically expanding interface and building automatic control system
CN104965745B (en) Air-conditioner system program renewing device and method
CN103095739A (en) Cabinet server system and node communication method thereof
CN102916818A (en) Method, device and system for expanding POE service radius
CN108508876B (en) Daisy chain RS485 control circuit and short circuit solving method
CN202533790U (en) Electric wring and wireless control system
CN102331762B (en) Control method for master station write-in of address codes by RS-485 buses
CN109802877A (en) A kind of CAN bus based Communication System Design
CN110247809B (en) Communication control method of double-ring network control system
CN204856479U (en) Electric power source distribution device management system
CN107317738B (en) Bus network communication system and method thereof
CN109088753B (en) Circuit and method for automatically detecting RS485 communication fault

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20110323