Summary of the invention
The present invention propose a kind of heavily join for vehicle renumber device, renumber method and rail vehicle, heavily join difficulty to reduce vehicle.
The invention provides a kind of heavily join for vehicle renumber device, comprising:
Two RS485 communication modules, are electrically connected for other vehicles joined with this car weight;
Central processing unit, being connected with described two RS485 communication modules, for renumbeing this car according to the electrical connection situation of described two RS485 communication modules, if renumber this car, then the result renumberd being outputted to this car.
Present invention also offers a kind of rail vehicle, comprise driver's key and activate circuit and numbering uses unit, wherein, also comprise above-mentioned heavily join for vehicle renumber device, activate circuit with described driver's key and number respectively and use unit to be connected.
Present invention also offers a kind of heavily join for vehicle renumber method, comprising:
After vehicle heavily joins and powers on, judge whether two RS485 communication modules that other vehicles being used for joining with this car weight carry out being electrically connected are electrically connected by central processing unit;
When described two RS485 communication modules are all connected with other vehicle electrics, described central processing unit the numbering that described RS485 communication module receives is added 1 obtain and, be set to the new numbering of this car;
When a RS485 communication module is connected with other vehicle electrics, described central processing unit judges whether driver's key of this car is activated;
When driver's key of described car is activated, what described central processing unit arranged this car is numbered 1; When driver's key of described car is not activated, described central processing unit the numbering that described RS485 communication module receives is added 1 obtain and, be set to the new numbering of this car;
Described central processing unit exports the numbering 1 of described new numbering or setting to this car.
Provided by the invention heavily join for vehicle renumber device, renumber method and rail vehicle, by the electrical connection situation of central processing unit according to RS485 communication module, this car is renumberd, avoid and car number is set by hand, achieve vehicle heavily join after automatic numbering, effectively reduce vehicle heavily join after numbering operation easier, and then reduce vehicle and heavily join difficulty, particularly to the heavily connection that more vehicle participates in, improve vehicle and heavily join efficiency, be conducive to vehicle scheduling.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is a kind of structural representation renumbeing device heavily joined for vehicle provided by the invention.As shown in Figure 1, the device that renumbers heavily joined for vehicle comprises: central processing unit 13 and two RS485 communication modules: a RS485 communication module 11, the 2nd RS485 communication module 12.
Other vehicles that two RS485 communication modules are used for joining with this car weight are electrically connected.As heavily joined with at least two row car loads or two compartments as Ben Che, and be connected to when becoming middle car between two row car loads or two compartments, as a RS485 communication module 11 is connected with front truck, 2nd RS485 communication module 12 is connected with rear car, then a RS485 communication module 11 be used for receive front truck send numbering, this is numbered the numbering of front truck, and the 2nd RS485 communication module 12 is used for the numbering of this car to be sent to rear car.When this car weight connection after as head car time, a RS485 communication module is only had to be electrically connected with other vehicles heavily joined, now, the RS485 communication module that electrical connection occurs, when driver's key of this car is activated, sends the numbering of this car to the vehicle connected.When after this car weight connection as when heavily joining the trailer of vehicle, a RS485 communication module is equally also only had to be electrically connected with other vehicles heavily joined, the numbering that the vehicle that the RS485 communication module of this generation electrical connection is only used for receiving connection sends, this is numbered the numbering of the vehicle of connection.
Central processing unit 13 is connected with described two RS485 communication modules, for renumbeing this car according to the electrical connection situation of described two RS485 communication modules, if renumber this car, then the result renumberd is outputted to this car.The result renumberd is by two RS485 communication modules, the mouth of the RS485 communication module of this car numbering is sent to the vehicle connected, output to this car, or when the trailer joining vehicle attached most importance to by this car, output to this car by the RS485 communication module not occurring to be electrically connected.
As, described central processing unit 13 can specifically for when described two RS485 communication modules be all connected with other vehicle electrics, the numbering that described RS485 communication module receives is added 1 obtain and, be set to the new numbering of this car.
Described central processing unit 13 is also used in a RS485 communication module when being connected with other vehicle electrics, namely this car may as the head car heavily joining vehicle, also may as the trailer heavily joining vehicle, judge whether driver's key of this car is activated, when driver's key of this car is activated, illustrate that this car is head car, otherwise, illustrate that this car is trailer.Central processing unit 13 is for when driver's key of described car is activated, what arrange this car is numbered 1, when driver's key of described car is not activated, the numbering that described RS485 communication module receives is added 1 obtain and, be set to the new numbering of this car.
The controller of vehicle heavily joined for vehicle that the embodiment of the present invention provides also can comprise: select switch, select switch is connected with described central processing unit, for being communicated with the mouth of a RS485 communication module in described two RS485 communication modules under the control of described central processing unit.In the controller of vehicle heavily joined for vehicle of this structure, described central processing unit is also for when described two RS485 communication modules are all connected with other vehicle electrics, control described select switch to be communicated with the mouth of the RS485 communication module not receiving numbering, output to this car with the numbering of this car central processing unit arranged; For when a RS485 communication module is connected with other vehicle electrics and driver's key of described car is activated, control described select switch to be communicated with the mouth of the RS485 communication module be connected with other vehicle electrics in described two RS485 communication modules, output to this car with the numbering of this car central processing unit arranged; For when a RS485 communication module is connected with other vehicle electrics and driver's key of described car is not activated, control described select switch to be communicated with the mouth that the RS485 communication module be electrically connected does not occur in described two RS485 communication modules, output to this car with the numbering of this car central processing unit arranged.
The device that renumbers heavily joined for vehicle that above-described embodiment provides can be IC chip.
The diagram of circuit of the method that renumbers heavily joined for vehicle that Fig. 2 provides for the embodiment of the present invention.As shown in Figure 2, the method for renumbeing heavily joined for vehicle comprises:
After step 21, vehicle heavily join and power on, judge whether two RS485 communication modules that other vehicles being used for joining with this car weight carry out being electrically connected are electrically connected by central processing unit;
Step 22, central processing unit renumber this car according to the electrical connection situation of described two RS485 communication modules.
Particularly, when described two RS485 communication modules are all connected with other vehicle electrics, described central processing unit the numbering that described RS485 communication module receives is added 1 obtain and, be set to the new numbering of this car;
When a RS485 communication module is connected with other vehicle electrics, described central processing unit judges whether driver's key of this car is activated;
When driver's key of described car is activated, what described central processing unit arranged this car is numbered 1; When driver's key of described car is not activated, described central processing unit the numbering that described RS485 communication module receives is added 1 obtain and, be set to the new numbering of this car;
Step 23, described central processing unit export the numbering 1 of described new numbering or setting to this car.As, when described two RS485 communication modules are all connected with other vehicle electrics, described new numbering is outputted to this car by the mouth of the RS485 communication module not receiving numbering by described central processing unit; Wherein RS485 communication module be connected with other vehicle electrics and driver's key of described car is activated when, described central processing unit is by outputting to this car with the numbering 1 that the mouth of the RS485 communication module be connected with other vehicle electrics in described two RS485 communication modules is arranged; When a RS485 communication module is connected with other vehicle electrics and driver's key of described car is not activated, described central processing unit by with described two RS485 communication modules in there is not the RS485 communication module be electrically connected mouth described new numbering is outputted to this car.
The structural representation renumbeing device that the another kind that Fig. 3 provides for the embodiment of the present invention heavily joins for vehicle.In the present embodiment, the device that renumbers heavily joined for vehicle is chip, for the automatic numbering that light rail vehicle heavily joins.
As shown in Figure 3, for renumbeing of heavily joining of vehicle, device comprises central processing unit 30, a RS485 communication module 31, the 2nd RS485 communication module 32, first communication serial port 33, second communication serial ports 34, RS485 communicate output pin 35, select switch 36 and driver's key state of activation input pin 37.First communication serial port 33 is a RS485 communication module 31 for there is with the external world pin that is electrically connected, and second communication serial ports 34 is the 2nd RS485 communication module 32 for there is with the external world pin that is electrically connected.Driver's key state of activation input pin 37 is used for receiving the signal that driver key is activated.
One RS485 communication module 31, the 2nd RS485 communication module 32 are the interface unit adopting Phototube Coupling process.
Central processing unit 30 controls select switch 36 by internal logic circuit, and carrying out control RS485 communication output pin 35 is be connected with a RS485 communication module 31, or is connected with the 2nd RS485 communication module 32.
Fig. 4 is the central processing unit controls diagram of circuit renumbeing device heavily joined for vehicle shown in Fig. 3.As shown in Figure 4, the treatment scheme of central processing unit can comprise:
Step 41, for vehicle heavily join renumber device work time, central processing unit 30 is initialization RS485 communication module first.Particularly, a RS485 communication module 31 and the 2nd RS485 communication module 32 are all set to receiving condition by central processing unit 30.
Step 42, then central processing unit judge whether a RS485 communication module 31 and the 2nd RS485 communication module 32 have electrical connection with the external world, and this car is not independent operating if there is electrical connection to illustrate, if not, illustrates that this car is independent operating.
As central processing unit judges whether a RS485 communication module 31 and the 2nd RS485 communication module 32 only have one to have electrical connection with the external world, if, illustrating that this car participates in heavily connection rear is head car or trailer, then perform step 47, otherwise, this car independent operating being described or participating in heavily connection rear is middle car, performs step 43;
Step 43, judge whether a RS485 communication module 31 and the 2nd RS485 communication module 32 have electrical connection, and if so, illustrate that this car is middle car, now at least 3 row car loads or compartment heavily join; Then perform step 44, otherwise, illustrate that this car is independent operating, perform step 46;
Step 44, judge whether driver's key of this car is activated, if so, the key of middle car this car operation mistake is then described, because can not be activated, only have driver's key of a car just can be activated, therefore, end process, do not do to export arranging, then this car mark ID (Identity, mark) namely numbering can not output to this car, this car control unit does not receive this car ID, and this car control unit can reporting operations mistake; Otherwise, perform step 45;
If step 45 has a RS485 communication module to receive the id information being more than or equal to 1, then central processing unit 30 arranges another RS485 communication module is transmission state, control select switch 36 to be communicated with the mouth of the RS485 communication module of the state of transmission, thus RS485 communicates, output pin 35 is with on the output pin of the RS485 communication module of the state of transmission, ID is added the vehicle of the RS485 communication module connection outputting to Ben Che and the state of transmission after 1.Central processing unit 30 ends process.
When step 46, independent operating, central processing unit 30 car ID are set to 0, one RS485 communication module 31 is set to export, control select switch 36 to be communicated with the mouth of a RS485 communication module 31, thus RS485 communicates, output pin 35 is connected on the output pin of a RS485 communication module 31.Central processing unit 30 exports this car ID that is 0 by a RS485 communication module 31, also corresponding output 0 on RS485 communication output pin 35, this car control unit that the output pin 35 that communicates with RS485 is like this connected just can receive the information that this car ID is 0, learns that this car is independent operating at present.Central processing unit 30 ends process.
Step 47, judge whether driver's key is activated, if so, illustrate that this car is head car, perform step 48, otherwise, illustrate that this car is trailer, perform step 49.
When step 48, this car are cars, the ID of this car is set to 1 by central processing unit 30, and will the RS485 communication module of electrical connection be had to be set to transmission state, and control select switch 36 and be communicated with the mouth of RS485 communication module of the state of transmission, thus RS485 communicates, output pin is connected on the output pin of RS485 communication module of transmission state, and what central processing unit 30 arranged is the vehicle outputting to Ben Che after 1 No. ID and be connected with the RS485 communication module of the state of transmission.Central processing unit 30 ends process.
Step 49, central processing unit 30 judge whether the ID received is more than or equal to 1, if so, illustrate that the signal received is correct, perform step 410; Otherwise, illustrate and occurred mistake, perform step 411;
When step 410, this car are trailers, central processing unit 30 ID that RS485 communication module receives is added 1 and be set to the ID of this car, and will the RS485 communication module be electrically connected do not had to be set to transmission state, control select switch 36 to be communicated with the mouth of the RS485 communication module of the state of transmission, thus RS485 communicates, output pin is connected on the output pin of RS485 communication module of transmission state, outputs to this car by this car No. ID.Central processing unit 30 ends process.
It is-1 that step 411, central processing unit 30 arrange this car ID, control select switch 36 to be communicated with the mouth of the RS485 communication module not having electrical connection, thus RS485 communicates, output pin 35 is connected on the output pin of that RS485 communication module that electrical connection does not occur, this car ID outputs to this car control unit by that RS485 communication module not receiving data, this car control unit judges ID mistake, reports an error.
The structural representation of the rail vehicle that Fig. 5 provides for the embodiment of the present invention.As shown in Figure 5, rail vehicle comprises driver's key and activates circuit 51, numbering use unit 52 and renumber device 53, what renumber that device 53 can be that any one that provide in above-described embodiment heavily join for vehicle renumbers device, activating circuit 51 with described driver's key and number respectively uses unit 52 to be connected, for the signal whether the driver's key provided according to electrical connection situation and driver's key activation circuit 51 of the RS485 communication module of self is activated, this car is numbered, and output to numbering use unit 52 use for this car.
Said apparatus, method and vehicle embodiments, judged by the electrical connection situation of central processing unit to RS485 communication module, know that vehicle heavily joins situation, all have when two RS485 communication modules and to know when electrical connection and be all connected with vehicle before and after this car, thus the numbering numbering of this car being set to front truck adds 1.Further, when only having a RS485 communication module to have electrical connection, know that this car is attached most importance to the connection head car of vehicle or trailer, then whether be activated according to Ben Che driver's key, or this car is a car or trailer, when this car is car, this car numbering is set to 1, when this car is trailer, the numbering that this car numbering is set to front truck is added 1, vehicle is made to achieve automatic numbering after participation heavily connection, avoid manual operations, simplify vehicle heavily join after car number operation, improve vehicle and heavily join efficiency and dispatching efficiency.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can have been come by the hardware that programmed instruction is relevant, aforesaid program can be stored in a computer read/write memory medium, this program, when performing, performs the step comprising said method embodiment; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.