How often should a BACnet MSTP device search for a new master?

A BACnet MSTP device should search for a new master after it has gotten the token more then Npoll – 1 times.
If your device is on a large network (20+ nodes) and Npoll is set to a very high number it may take a long time for your device to find a new device between its own MAC address and its next station.

For example
There are three devices on the network, 0×02, 0×03, 0×07.
All of the devices have a Npoll of 255, and have received the token 254 times since the start.

0×02 receives the token and increments its own TokenCount to 255. 0×02 now goes in to poll for master mode and attempts to find a new master, the NS (next station) just happens to be the PS (poll station) as well so TokenCount is reset to zero with out a poll for master message being sent out. 0×02 sends the token to 0×03.

0×03 receives the token and increments its own TokenCount to 255. 0×03 now goes in to poll for master mode and attempts to find a new master. It will poll for a new master between the range of 0×04-0×06. If it does not find a new master it will pass the token on to 0×07.

0×07 receives the token and increments its own TokenCount to 255. 0×03 now goes in to poll for master mode and attempts to find a new master. It will poll for a new master between the range of 0×08-Nmax_master then 0×00-0×01. But 0×07 has a Nmax_info_frames of 5 so it will only poll for 5 new master before it will pass on the token to 0×02. Next time 0×07 receives the token it will start to poll for a new master where it last left off at 5 frames a time.

Npoll
The number of tokens received or used before a Poll For Master cycle is executed: Default: 50.

Nmax_master
This parameter represents the value of the Max_Master property of the node’s Device object. The value of Max_Master specifies the highest allowable address for master nodes. The value of Max_Master shall be less than or equal to 127. If Max_Master is not writable in a node, its value shall be 127.

Nmax_info_frames
This parameter represents the value of the Max_Info_Frames property of the node’s Device object. The value of Max_Info_Frames specifies the maximum number of information frames the node may send before it must pass the token. Max_Info_Frames may have different values on different nodes. This may be used to allocate more or less of the available link bandwidth to particular nodes. If Max_Info_Frames is not writable in a node, its value shall be 1.