I've not opened your VI, but do remember that stability margins are (usually) defined on the basis of an open loop transfer function to show how stable or unstable the corresponding closed loop system will be. If is a common mistake to used the closed loop transfer function when calculating stability margins.
With a Smith Predictor strategy you have the added problem that you could look at the stability of the controller + real plant, or the stability of the controller + plant model with or without plant time delay depending where you take the transfer function from.
Also, make sure you are putting the time delay in a format that the stability analysis can accept - sometimes you might need to use a Pade approximation.
Consultant Control Engineer
www-isc-ltd.com