Ah, so you mean machine alarms, not a PLC fault. Just to clarify, a PLC fault is when the actual processor faults and stops executing code because of bad logic or something. Which is NOT what you want here, right?
The critical piece of information in that question is "what inputs were activated BEFORE a fault occurs"...very difficult to pre-empt a fault! To me, this is a case for diagnostic coding. Once the fault occurs, save the file as described above before anything is reset or cleared. That will show you the state of all inputs/outputs/tag values at the moment you save it. From there you may have to dig into the logic a bit. If you find that "Fault ABC came up because timer XYZ timed out", then you have to trace back and ask "what can cause timer XYZ to time out?" If there's only one thing - great, you're one step closer to the root cause. Repeat previous step! If there are multiple things, and you're now not sure which one caused it, that's when you would write some diagnostic logic. There are simple and complicated ways of doing it, the more information you want the more complicated your diagnostic code will be. The simplest way is something like this: say you have three tags that can activate the timer. Call them Tag 1, Tag 2, Tag 3. Create 3 more tags, Tag 1 Trap, Tag 2 Trap, Tag 3 Trap. Then put in a line of code so that when the alarm occurs, you use a oneshot to latch the "Trap" tags for each of the tags that are on at the time. So you can come along to the PLC and say "at the instant this fault occurred, Tag 2 was on". And so on. Of course, this doesn't necessarily give you the whole picture. Tag 1 might be coming on for 1 second, then Tag 2 comes on just before Tag 1 turns off, and then Tag 3 does the same thing - so all three tags are contributing to the fault but you only see the one that was on when the fault actually occurs. Like I say, the more detail you want, the more complicated your diagnostic logic gets!
Good luck, if you get stuck post some more details and we'll try and help out!