Digital inputs
The camshaft and crankshaft sensor and a door switch are examples of digital inputs. These are more difficult to diagnose. In the case of the camshaft and crankshaft sensor, it may be concluded that there is a fault in the camshaft sensor if only the crankshaft sensor is transmitting signals (Motronic).
Buttons and many other digital inputs are often entirely without diagnostics.
You can see that simply switching on the ignition is not enough for the diagnostics to locate the fault. The crankshaft has to be rotating. If the camshaft is not rotating, the diagnostic trouble code will be set after 12 engine revolutions. If the fault is present from startup and the motor is unable to start without the sensor, it is necessary to turn the engine over on the starter motor before the code is set (e.g. Motronic).
If the cam chain snaps, the diagnostic trouble code will be set. The control module is unable to tell whether the camshaft sensor has stopped transmitting signals because of a mechanical fault or an electrical fault.