Is there an attribute I can use with an input block to detect if an input has a proximity sensor plugged into any particular port, while the proximity sensor is not detecting, or not passing voltage?
Some diagnostic inputs can detect broken wires on the input, and have a "pulse test" feature.
A method that doesn't depend on the input module's technical features is to get a switch that has both a N.O. and N.C. output, and check them to be sure they are complementary. If both or OFF or both are ON, then something has gone wrong with the wiring or the switch.