Abstract:
A method for allocating a device address in a network to a substation connected by a point-to-point connection includes transmitting an initialization message from a main station to a substation, which message contains a part of the device address, determining a set communication address of the substation, generating a complete device address based on a received part of the device address and based on the communication address, and transmitting a response mesasge from a device to the main station, which response message contains an address selected from the group consisting of the communication address, the device address, and both.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     The present invention relates to a method for allocating a device address to a substation in a network by means of a main station. The present invention also relates to a substation and a main station for a network such as a field bus network in automation engineering.  
         [0002]     Usually, substations in a network have fixed, unique device addresses that permit each substation to be uniquely addressed. The device addresses are generally referred to as MAC addresses and are embedded into the hardware of the substation. In an initialization phase of the network, the device addresses of the individual substations are communicated to the main station so that the main station is able to selectively communicate with the individual substations of the network. Also during the initialization phase, the substations in the network are assigned IP addresses, which are either set manually or allocated by the DHCP.  
         [0003]     Usually, however, the IP addresses must be determined and input and each substation must be associated with an IP address after the initialization phase if a user is to be able to selectively communicate with the substation. This has the disadvantage that without consulting the allocation information in the main station, the user does not know the IP address or the device address of the substation in the network and therefore cannot perform a selective addressing.  
         [0004]     For real-time communication, usually each of the substations in the network is allocated a communication address that permits the device to be addressed directly in a real-time channel.  
       SUMMARY OF THE INVENTION  
       [0005]     The object of the present invention is to provide a method for allocating a device address.  
         [0006]     Another object of the present invention is to provide a substation for a network whose device address is automatically allocated.  
         [0007]     A first aspect of the present invention provides a method for allocating a device address to a substation in a network. The substation in the network is connected by means of a point-to-point connection. The method includes the steps of transmitting an initialization message from a main station to the substation, where the initialization message contains a part of a device address; determining a set communication address of the substation for the real-time communication; generating the complete device addresses with the aid of the received part of the device address and with the aid of the communication address; and transmitting the response message from the substation to the main station, which message contains the communication address and/or device address.  
         [0008]     The goal of the method according to the present invention is to allocate a device address to the substation and to announce the device address to both the substation and the main station. Basically, the device address can be freely selected from within a predetermined range, but is set so that a user who knows the part of the device address and knows the settable communication address is able to determine the device address. Thus, for example, the device address contains several bytes, a part of which is known to the user. In addition, the communication address for the real-time communication can be set, for example manually, in the substation so that the part of the device address that is known to the user and the likewise known communication address together constitute the complete device address of the substation. This eliminates the need for a user to first access the main station, which contains a list that associates the physical substations with the device addresses, in order to find a device address that is appropriate for a particular substation.  
         [0009]     Particularly in connection with the Ethernet network standard (protocol, network topology, and network hardware), known networks include switched networks (switched Ethernet) and networks with amplifiers (repeaters); a network with switched Ethernet technology is also referred to as a switched network. The present invention can be used for all types of such networks, i.e. for switched and/or unswitched networks with repeaters, even ones based on the Ethernet standard.  
         [0010]     According to another embodiment form of the present invention, the initialization message can also contain a part of an IP address. The complete IP address of the substation is generated with the aid of the received part of the IP address and with the aid of the communication address. The substation transmits the response message containing the communication address and/or the complete IP address to the main station. Consequently, the complete IP address can be generated based on the part of the IP address and the set communication address, either in the main station or in the substation. The essential thing is that after the method according to the present invention has been executed, the IP address is present in both the main station and the substation so that an IP communication can occur in an IP communication channel.  
         [0011]     Alternatively, the generation of the complete IP address of the substation can be generated in the main station with the aid of a predetermined part of an IP address and with the aid of the transmitted communication address, whereupon the main station sends the device an acknowledgment message containing the complete IP address as a response to the reception of the response message.  
         [0012]     Another aspect of the present invention provides a substation for a network. The substation has a reception unit for receiving an initialization message from a main station. A device number preparation unit supplies a communication address of the substation. In addition, a control unit is provided to determine a part of a device address based on the initialization message and to generate the complete device address based on the communication address and the received part of the device address. A transmission unit transmits a response message containing the device address and/or the communication address. This makes it possible to produce a substation for a network that determines the device address with the aid of a set or settable communication address. The device address is generated inside the substation and is then transmitted to the main station in the response message by the transmission unit.  
         [0013]     According to another embodiment form of the present invention, the control unit can once again determine a part of an IP address based on the initialization message and can generate the complete IP address with the aid of the communication address and the received part of the IP address. The transmission unit is designed to send the response message, which contains the communication address and/or the complete IP address, depending on whether the complete IP address is to be generated by the substation or by the main station. If the response message contains only the communication address, then the reception unit can be designed to receive an acknowledgment message containing the complete IP address as a response to the transmitted response message.  
         [0014]     Another aspect of the present invention provides a main station for a network, which has a control unit for supplying a part of a device address. The main station also has a transmission unit for sending an initialization message that contains the part of the device address. A reception unit is also provided in order to receive a response message containing a communication address and/or a complete device address.  
         [0015]     According to another embodiment form of the present invention, the control unit can trigger the transmission unit to provide the initialization message with a part of an IP address. The reception unit is also designed to receive an acknowledgment message containing the complete IP address as a response to the reception of the response message.  
         [0016]     The novel features which are considered as characteristic for the present invention are set forth in particular in the appended claims. the invention itself, however, both as to its construction and its method of operation, together with additional objects and advantages thereof, will be best understood from the following description of specific embodiments when read in connection with the accompanying drawings.  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0017]      FIG. 1  shows a possible network topology of a network, according to the present invention,  
         [0018]      FIG. 2  shows a block circuit diagram of a substation for the network according to  FIG. 1  according to the present invention,  
         [0019]      FIG. 3  shows a block circuit diagram of a main station for a network according to  FIG. 1  according to the present invention,  
         [0020]      FIG. 4  is a flowchart illustrating the method according to the present invention for automatically supplying a device address in a substation in a network according to  FIG. 1  according to the present invention, and  
         [0021]      FIG. 5  is a flowchart illustrating the method according to the present invention for automatically supplying a device address, according to another embodiment form according to the present invention.  
     
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0022]      FIG. 1  shows a ring network that has a main station  1  and several substations  2 . Each substation  2  has a data input and, separate from this, a data output, which can be connected to each other via a repeater. Two communication channels are provided in the network connections that connect the network subscribers to one another. In a first communication channel, the real-time communication channel, the main station  1  sends data packets. A first data packet contains data for the substations  2 . The data packet also contains defined time windows that are each associated with one of the substations  2 .  
         [0023]     The substations  2  read the data in the defined time windows from the data packet. The main station  1  also sends a second data packet in the real-time communication channel, which data packet likewise has time windows that function as placeholders for data. The data to be sent are inserted into the time window associated with the respective substation  2  and the data packet thus altered is then forwarded with the inserted data to the next network subscriber. The last substation  2  then sends the second data packet back to the main station  1 . The second data packet is currently filled with the data that the substations  2  have sent to the main station.  
         [0024]     During the active phase of another communication channel, an IP communication channel, each of the network subscribers, i.e. the main station  1  and the substations  2 , can transmit a data packet if no data packet is currently present at its respective data input. In other words, as soon as the network is not being used, one of the network subscribers can transmit a data packet in order to convey data. The real-time communication channel and the IP communication channel are constituted by two time domains during which the corresponding communication channel is occupied and which follow each other in cyclical sequence.  
         [0025]     To enable communication in the real-time communication channel, each substation  2  of the network is allocated a communication address. The communication address is manually set or preset in each of the substations  2 . A communication address of this kind can, for example, be a number between 1 and 254 and can thus be expressed in the form of a byte.  
         [0026]     For the IP communication channel, each of the substations  2  must be allocated a device address. The device address is a so-called MAC address (media access control) that is several bytes long. In conventional IP communication devices, a device address of this kind is usually embedded in the hardware and is unique for each IP communication device available on the market. In the field bus data network depicted here, the substations  2  must each be allocated a device address. If the substation  2  is to also to be capable of transmitting data in the IP communication channel, then the substation  2  must also be allocated an IP address.  
         [0027]     As shown in  FIG. 2 , a substation  2  of this kind has a reception circuit  3  that is connected to a data input E and can receive data via the network. A transmission unit  4  is also provided for transmitting data on the network to a subsequent network station via a data output A. The substation  2  also has a control unit  5  for operating the different communication channels. Between the reception unit  3  and the transmission unit  4 , a repeater  8  is provided, which transmits data that is present at the data input to the data output while the IP communication channel is active.  
         [0028]     In the real-time communication channel, the repeater  8  is likewise switched to forward a data packet from the reception unit  3  to the transmission unit  4 , but is also able to extract data from a corresponding data packet and supply it to the control unit  5  and is able to insert data from the control unit  5  into a data packet to be forwarded. For the initialization during an initialization phase, the substation  2  awaits reception of an initialization message that is forwarded from the reception unit  3  to an initialization unit  6 .  
         [0029]     In the initialization unit  6 , a part of a device address is determined based on the received message and this part of the device address and the set communication address supplied by a communication address preparation unit  7  are combined with each other to form a complete device address. The complete device address can, for example, be produced by simply joining the part of the device address to the manually set communication address. There are also other conceivable ways to combine the part of the device address with the communication address, but it is advantageous if a user understands the combination in order to be able to easily determine the complete device address simply by knowing the communication address.  
         [0030]     The initialization unit  6  transmits the complete device address to the network via the reception unit  4  in the form of a response message so that the main station  1  is informed of the device address associated with the respective substation  2 .  
         [0031]     In the same way, the initialization message can contain a part of an IP address, which the initialization unit  6  attaches to the communication address for real-time communication in order to form a complete IP address that is unique. The complete IP address is likewise transmitted in the response message to the main station  1  via the reception unit  4  so that there is a fixed association in the main station  1  between the complete IP address and the respective substation  2 .  
         [0032]     In an alternative embodiment form, the initialization unit  6  transmits the communication address supplied by the communication address preparation unit  7  directly to the main station  1  via the reception unit  4 . In this case, it is also not necessary for the initialization message to contain the part of the device address. As soon as the main station  1  receives the communication address, the main station determines the complete device address according to a fixed method and determines the complete IP address based on the preset parts of the device address and IP address and based on the communication address that has been communicated to it and transmits this device address to the respective substation  2  in an acknowledgment message.  
         [0033]      FIG. 3  shows an embodiment form of a main station. The main station  10  has a reception unit  11  and a transmission unit  12  that are connected to the substations  2  via appropriate network lines. The main station  10  also has an initialization unit  13  which, triggered by a control unit  15 , generates an initialization message and transmits it via the transmission unit  12 . The initialization message contains a part of a device address that is received from one of the substations  2  and, with the aid of the communication address set therein, can be processed to produce a complete device address.  
         [0034]     The reception unit  11  of the main station  10  receives the complete device address in the form of a response message, thus enabling an association between the complete device address and the respective substation to be stored in a memory  14  of the main station. In the same manner, the initialization message can also contain a part of an IP address that is completed in the substation and sent back to the main station  10  via the response message. Alternatively, the main station  10  can also receive the complete device address in the response message, generate the complete IP address based on it, and transmit an acknowledgment message to the respective substation  2  via the transmission unit  12  so that the substation also contains the unique IP address associated with it.  
         [0035]      FIG. 4  is a flowchart illustrating the method according to the present invention. The method relates to the initialization and allocation of device addresses and IP addresses in a network, e.g. in a field bus network for automation engineering. For the initialization, the main station transmits an initialization message that contains a part of a device address and/or a part of an IP address, which message is received by a substation. The substation first determines the set communication address for real-time communication and based on it, generates the complete device address and the complete IP address. Then the substation sends the main station a response message containing the complete device address and the complete IP address. As a result, the complete device address and complete IP address are present in both the substation and the main station so that the main station contains an association between the relevant substations and the complete device address and complete IP address.  
         [0036]      FIG. 5  shows an alternative method. In it, the main station sends the initialization message, thus prompting the substation to determine the communication address contained therein and to send it in a response message to the main station. Then the complete device address and complete IP address are generated in the main station based on the part of the device address contained therein and part of an IP address and based on the communication address that has been sent to it and then an acknowledgment message containing the complete device address and complete IP address is sent to the respective substation.  
         [0037]     According to another embodiment form of the present invention, instead of the communication address, an IP address can be preset, e.g. set manually, and the communication address for the real-time communication can be derived from this. In this case, the communication address would correspond to an IP address and the complete IP address would be determined based on the fixed, predetermined IP address.  
         [0038]     If, for example, were set as a communication address in the real-time communication channel  5 , then in an example, the device address and the IP address as well would end with 5, e.g. an IP address of 192.168.0.5. The main station would consequently transmit the first three bytes of the IP address along with the initialization message to the substation, thus permitting 255 different IP addresses to be allocated.  
         [0039]     It is also optionally possible for there to be an agreement regarding a timeout of the addresses so that even while a substation is operating, its acquired portion of the address can be changed.  
         [0040]     Alternatively, the initialization method according to the present invention can be used to allocate a device address and an IP address to each of the substations  2  of the above-described data network; it is also possible, however, for the device address and the IP address to be preset, e.g. with the aid of an input unit into which these addresses can be input.  
         [0041]     If agreements have been established in the data network regarding normally reserved IP addresses, then it is also possible for the substation to check whether the main station has the same IP address as it does itself. If the substation determines that the main station has the same IP address, then the substation uses a new IP address taken from the reserved range.  
         [0042]     It will be understood that each of the elements described above, or two or more together, may also find a useful application in other types of constructions and methods differing from the types described above.  
         [0043]     While the invention has been illustrated and described as embodied in a method for allocating a device address to a substation in a network as well as a substation and a main station for a network, it is not intended to be limited to the details shown, since various modifications and structural changes may be made without departing in any way from the spirit of the present invention.  
         [0044]     Without further analysis, the foregoing will reveal fully revela the gist of the present invention that others can, by applying current knowledge, readily adapt it for various applications without omitting features that, from the standpoint of prior art, fairly constitute essential characteristics of the generic or specific aspects of the invention.  
         [0045]     What is claimed as new and desired to be protected by Letters Patent is set forth in the appended claims.