This FB125,DB125 from Siemens works very well and gives you a very detailed diagnostic on your profibus. It is a rather big program.
If you are only interested in knowing which slaves are not present that should be I can get you an FB like FB125 (+/- 1700 bytes).
It gives you all missings slaves in a bitpattern, the error slavenumber in an INT, a general DP-error bit and also an easy possibility to (de) activate slaves on your bus.
We made this block ourselves and it has no know-how protection so you can hack it anyway you want.
The screen for an OP can be included.