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.
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.
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.
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.
The object of the present invention is to provide a method for allocating a device address.
Another object of the present invention is to provide a substation for a network whose device address is automatically allocated.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
As shown in
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
What is claimed as new and desired to be protected by Letters Patent is set forth in the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
10 2004 041 093.3 | Aug 2004 | DE | national |