Virtual Token Passing

Each P-NET master is given a node address (NA), between 1 and the number of masters expected within a system. 
All masters contain an ‘idle bus bit period counter’ which increments for each bit period the bus is idle, but is reset to zero when the bus becomes active. Each master also has an access counter, which is incremented when the idle bus bit period counterreaches 40, 50, 60, … 

When the access counter in a master is equal to its node address, that master holds the token, and is allowed access to the bus. When the access counter exceeds the maximum number of masters, it is preset to 1.

The diagram shows an example of the token principles in P-NET, within a system configured for 4 masters.

First, master 3 has the token, and is receiving a response from a slave. Then the bus becomes idle.

When 40 idle bit periods have been counted, all access counters are incremented by 1, and master 4 is allowed access to the bus. Since master 4 does not have anything to send, and after 50 bit periods, master 1 is allowed access to the bus.

Master 1 does not need bus use either (it may not even be present), so the virtual token is passed to master 2, when the idle bus bit period counter reaches 60.

Since masters 2 and 3 do not require access, the token is eventually passed on to master 4, when the idle bus bit period counter is equal to 80. This time, master 4 does require access. Data appears on the bus, so all idle bus bit period counters are reset to zero.

The passing of the virtual token takes place within only 130 uS or 10 bit periods, and no data is actually sent over the bus. A single network can have up to 32 masters with equal priority, and no hierarchy needs to be managed. 

Consequently, P-NET does not require any bus arbitrator functions. Virtual token passing is much more efficient than passing the token by message.

Close Menu