A series of conditions must be met for a well regulated procedure that also defines the system response times. Each station must know the address of whichever station precedes it and of the one that follows it, so that it knows from whom it will receive the token and to whom it must be passed. These parameters are established by each station independently on initialization and updated dynamically as required during operation.
List of active participants = 1,7
This picture shows, for example, that a future station can detect that the token is being passed between stations 1 and 7. To ensure that this principle also functions when there is only one master on the PROFIBUS, a lone master will always send a token telegram to itself.
A list of all accessible stations on the bus is also drawn up for bus management. This is achieved by each master regularly checking for any stations in the so-called gap between its own network address and that of its token follower.
Construction of live-list = 1,(3),(5),7
In the example shown, the master with address 1 finds the two slaves 3 and 5 located in its address gap from 2 to 6. The master waits no longer than the 'slot time' for an answer. The master with address 7 is responsible for addresses 8 to 0. In this case, it will poll up to the maximum planned station address (HSA = highest station address). Any stations higher than this address will not therefore appear in the list of stations (live-list).
If enough time still remains during authorized transmission, the master will make a single status query and then pass on the token. Once the entire 'gap' has been polled, there will be a pause lasting G*TTR tBit after which the process starts again from the beginning.
If a new station wishes to join the ring it sends a special status message. It will then receive the token, as shown in the following diagram.
After the introduction of the new master the list of active stations is 1,5,7
This makes it possible to insert active stations into the network or separate them from it during run, without having to interrupt continuing communications in the rest of the system. If no bus activity is detected for a certain time (idle time) the token will be considered lost. Each master starts a timeout timer, loaded with a time that depends on the master's current station address.
Timeout time = 6 TSL + 2 n TSL
With TSL = slot time (maximum response time)
The master whose timeout timer is the first to run out will immediately send a token to itself. All the others can then cancel their idle timers and the mechanism of inserting new stations begins, as described above.
Generation of a new token
Address 0 is generally reserved for programming tools, which means that, in case of a crisis, they will always receive the token first. With this mechanism the PROFIBUS network can recover itself after a lost token.
Please note: If a master is separated from the PROFIBUS network for longer than its timeout time, it will independently generate a new token. This can lead to errors if, for example:
-A PC card is activated first and only then connected to a PROFIBUS. This will insert a second token into the network, leading to faults.
-A network with two masters is interrupted intermittently (e.g. a wireless, optical transmission line segment). This will result in the generation of two tokens that lead to collisions and faults when networks are merged. Therefore, in the case of a wireless, optical transmission line segment, it has been specified that all masters should be on the same side of the interface.