The present invention relates to a method for automatically allocating addresses to at least two similar users of a communication bus system by a coordinating master control unit.
Recent vehicles are characterized by an increasingly highly networked architecture of control units which are connected to one another by a suitable bus system, and which may exchange data with one another using protocols that are available for this purpose.
A bus system known from the related art is the CAN bus, which is described by the ISO 11898 standard. A characteristic feature of this bus system is that the access to the bus for the individual bus user is granted or not granted within the scope of arbitration, depending on the bus user address. In the event of a simultaneous transmission attempt, bus users with low addresses are given priority over bus users with higher addresses, and may transmit their data frame to the bus, while the bus user with the higher address must start a transmission attempt anew.
Transmission processes for bus systems such as this one make it necessary to carefully select the addresses for each individual control unit in configuring a bus communication for a vehicle. Depending on this selection, the latency time which may be required by a bus user as a function of the bus utilization in order to transmit its data on the bus is longer or shorter, with possible corresponding effects on the vehicle behavior.
In some cases, multiple bus users have the same tasks. For example, multiple sensors, such as for measuring temperatures or voltages or rotational speeds at various points in the vehicle, have similar designs, and their measured data may have a similar priority for the vehicle behavior.
However, communication protocols such as the CAN bus protocol routinely require that these matching bus users have different addresses in order to take part in the communication via the bus. This may result in an increased level of effort for suppliers for providing the differently programmed sensors having correspondingly different part numbers, etc., or also for vehicle manufacturers for programming the sensors at the end of production and/or for the associated logistics system.
In contrast, it would be advantageous to be able to automatically allocate suitable addresses to similar bus users of a network, and to use sensors which are identical except for the serial numbers, for example, having uniform part numbers.
German Utility Model DE 299 07 265 U1 describes a data transmission system having a central configuration control unit which is able to assign suitable addresses to the multiple functional units, which differ only with respect to their serial number, by writing to an address register that is set up for this purpose.
German Patent Specification DE 197 13 240 C2 describes a method for automatically allocating addresses in a CAN network, in which, upon request by a master, the bus users generate an address via a random generator, and based on the data traffic on the bus and based on the bus users' individual success in gaining bus access, subsequently determine whether this address is unique within the bus network or is already allocated. A targeted address allocation or influencing the address allocation by the master, for example with the aim of setting a priority among the bus users, is not provided here.
European Patent Specification EP 2 014 062 B1 discloses a method in which a new user on a data bus derives a temporary address and a transmission time based on the serial number of the data bus, independently reports to the bus with a request message, using both values, and as a response to the request message receives a suitable final address from a coordinating control unit for further use.
The methods known from the related art do not provide satisfactory results in all respects.
The object of the present invention is to provide a method in which similar control units which differ only with respect to their serial number, for example, may be connected to a communication bus without having been assigned different addresses beforehand, and may be assigned addresses by a master control unit in such a way that the master control unit has control over the sequence of the allocation process and the allocated addresses.
The described object is achieved according to the present invention in that the master control unit starts an allocation of the addresses by an arranged instruction, and the slave bus users or slaves respond differently, depending on whether or not they have already been assigned an address. The slaves which have already been assigned an address report at the address assigned to them. The slaves which have not yet been assigned an address communicate their serial number to the master via a suitable communication process which advantageously minimizes the likelihood of message collisions. The master then assigns a suitable address. It may be advantageous for the master to enter the serial number together with the assigned address into a list which the master manages in its memory.
In one preferred specific embodiment, the participating control units are set up for allocating the addresses by suitable programming which in particular assists in carrying out the method according to the present invention via a suitable protocol. This protocol may advantageously be a transport protocol which resides on the CAN protocol, and which is suited for the steps to be carried out, for example the writing to memory areas. Likewise, one preferred aspect is to use services based on a known diagnostic protocol, for example the Unified Diagnostic Services (UDS) standard.
In addition, it is advantageous if, as the result of a suitable programming or configuration, the master knows how many slaves should be connected to the bus in the normal case.
Likewise, it is advantageous if, after recognizing a successful allocation of the addresses to the slaves that are present, the master initiates the normal bus operation.
To allow slave bus users which have not yet been assigned an address to transmit their serial number to the master, it is advantageous if the slave bus users transmit their data to the master at a fixed address at randomly selected points in time. As a result, collisions between the transmitted data are unlikely. It may be practical for the master to specify for the slaves a time range having defined time windows for transmission.
If the method according to the present invention has to be run through multiple times in order to complete the allocation of addresses, it is advantageous to adapt the mentioned time range in each case according to the number of slave bus users which have not yet been assigned an address. The total time required for allocating the addresses may thus be reduced.
Another option is for the slave bus users to use their serial number as an address for transmission. For this purpose, in the case of use of a CAN bus it is practical to switch over to the extended mode of the CAN protocol. If there are still not enough addresses in extended mode to map all serial numbers, the range of the serial numbers may additionally be divided into subranges by suitable masking.
It is also advantageous to initiate error correction for the case that the expected number of slaves does not report to the bus during the allocation process. For example, if too many slaves query an address, a faulty bus configuration may be signaled by a suitable error message. If too few slaves have become active, the method may be iterated, a reset of the slaves may be initiated, or, in particular after a predetermined number of iterations have unsuccessfully been run through, a suitable error message may likewise be triggered.
Exemplary embodiments of the method according to the present invention and the device are described below. These specific examples are used for explaining the carrying out of the present invention, but do not limit the scope of the inventive concept. In particular, the use of a CAN bus is assumed in the exemplary embodiments. However, the method is transferable to other bus systems having event-driven, address-based access to the bus by the bus users.
A CAN bus 100 having multiple users 110, 120, 130, 140 as illustrated in
As the first exemplary embodiment, the case is considered that at the start of the method, all slaves differ only with respect to their serial number. Control units 110, 120, 130, 140 in
The method according to the present invention is explained with reference to the sequence illustrated as a flow chart in
As the result of a suitable programming or configuration, master bus user 110 knows the number of slaves that are to take part in the communication. In addition, the master bus user maintains a list of serial numbers and addresses, in which it enters which addresses it has assigned to the various slaves.
The master bus user requests all slave bus users to report on the bus at their assigned address in step 2 in
The bus users take preparatory measures in step 4 in
The slaves respond in step 5 in
In step 6 in
If the expected number of slaves has reported and the particular serial number has been transmitted to the master, the master allots an address to each of the requesting slaves in subsequent step 7 in
In addition, the slave enters the allocated address together with an associated identifier, for example the serial number, into a list. Other pieces of information may also be entered into the list.
In subsequent step 8 in
In step 9 in
As the second exemplary embodiment, the case is considered that at the beginning, one or multiple slaves already have an address that has been assigned to it/them by the master. During normal operation, control units 110, 120, 130, 140 in
As the result of a suitable programming or configuration, master bus user 110 knows the number of slaves that are to take part in the communication. In addition, the master bus user maintains a list of serial numbers and addresses, in which it at least enters which addresses it has assigned to the various slaves.
The master bus user requests all slave bus users to report on the bus at their assigned address in step 2 in
The bus users take preparatory measures in step 4 in
In step 6 in
If the expected number of slaves has reported and transmitted the particular serial number to the master, the master allots to each of the requesting slaves an address in subsequent step 7 in
In subsequent step 8 in
In step 9 in
A special case of the second exemplary embodiment is that only one new slave, for example a replacement part due to a failure, has been newly connected to the bus. In this case, the slaves respond to the query by the master in step 2 by transmitting, in step 3, a message including their serial number to the master at their assigned address. The master counts the number of acknowledgments, optionally comparing the received messages to its list, and otherwise carries out the procedure as described above. This check may take place directly after step 3, or also only after acknowledgment by the new slave without an assigned address, in step 6, as illustrated in
Alternatively, it is also possible for collisions to occur in step 5 due to coincidentally identical transmission times or coincidentally identical transmission addresses derived from the serial number.
In the illustrated case, there is an abort criterion for step 3 which causes termination after four transmission attempts. A suitable error correction must be initiated which results in a reallocation of addresses at least for the control units having colliding addresses.
In addition, an error correction is initiated if the method has not resulted in success after a predefined number of iterations, for example because a slave is permanently nonfunctional, too many slaves are present on the bus, or the message of the master is not received by all slaves. In this case, some or all control units in question may be reset as an error correction; however, switch-off with appropriate error memory entry may be practical.
Number | Date | Country | Kind |
---|---|---|---|
10 2010 041 810 | Sep 2010 | DE | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP2011/066444 | 9/21/2011 | WO | 00 | 8/7/2013 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2012/041753 | 4/5/2012 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
20070088885 | Ellerbrock | Apr 2007 | A1 |
20070173083 | Kopplin | Jul 2007 | A1 |
20130282946 | Ricci | Oct 2013 | A1 |
Number | Date | Country |
---|---|---|
101167341 | Apr 2008 | CN |
299 07 265 | Apr 1989 | DE |
197 13 240 | Oct 1998 | DE |
10 2007 028 387 | Aug 2008 | DE |
0 893 767 | Jan 1999 | EP |
2014 062 | Jan 2009 | EP |
11120118 | Apr 1999 | JP |
WO 2005051723 | Jun 2005 | WO |
WO 2007122229 | Nov 2007 | WO |
Entry |
---|
International Search Report for PCT/EP2011/066444, dated Jan. 20, 2012. |
Number | Date | Country | |
---|---|---|---|
20130326099 A1 | Dec 2013 | US |