Buffering AC supply voltage and detect power loss?
Placing UPSes here and there is a primary instinct for almost every automation engineer. But it is not a good solution, especially on big systems (which the discussed one is not). The two main disadvantages of powering from UPS is:


The UPS has batteries inside. All types of batteries degrades with the time and need replacement. But any support work on the industrial machinery is not good by definition.
Using UPS on some part of the machine (usually computers) means that on power loss, the system goes to inconsistent state, that is rarely processed properly by the software. As a result there are often restart problems after power restoration. Such a machines need very careful design and extended testing.


So, on the topic. I would suggest following variants:


Think again - is it really, really so important to keep the PC working after the power fault? Isn't it possible by some software methods to make that shut-down to not lead to information loss?
If the answer of 1. is "No", then use industrial PC powered by 24VDC and use capacitive backup device that will keep the voltage for at least several seconds or minute and will switch it for the whole machine. In addition, it will not need support and battery replacements.


Note: We have the cited Wöhrle devices in several of our plant machines.