There's got to be more to the error message than that. Post the actual Error Code (it's in the format Type XX, Code YY) and the full text of the fault.
The Powerup routine executes just once before any of the other Tasks in the controller (the Continuous, Periodic, and Event tasks).
Because any alarm logic that you have is going to be in the other Tasks, the Powerup routine won't do anything helpful in that regard.
What I do is use a "Global Powerup Delay" timer in the Continuous Task set to the measured time it takes everything to come up and start working after a power cycle. And by "everything", I mean communication modules and remote I/O adapters and drives and servos and so forth.
Usually this is about 40 seconds, so my rule-of-thumb time for powerup is 60 seconds.
I then use the completion of the Global Powerup Delay to allow processing of my alarm detection logic.