On this ladder logic I'm checking every pneumatic cylinder for any type of problems coming from a bad proximity or sensor with a failure in the ON or OFF state.

https://youtu.be/CFBJMyFsVAA