For the control of the model railroad by the computer, the control program has to know in wich section of track are located the trains to stablish routes, set the correct aspect in signals, speed control of trains, etc... For it, detectors are placed that to the passage of the train activate the inputs of a feedback module that inform to the command station and this to the computer.

The most popular feedback modules are:

RS RS bus feedback modules
S88 S88 bus feedback modules

Move the locomotive to see the activation of the detectors and the drive of the signal: