This is all done automatically. The Automatic Shuttle will work on any gauge, but only on DC systems.
Massoth Automatic Shuttle 8431001
Z Gauge Automatic Shuttle Switch C006 Railway Model Supplies from Japan New
BLOCKsignalling SAS2-IR DC Shuttle with Infra-Red Detectors Model Rail
BIGPOT DCC model railway shuttle with station stop + power supply N/00 F0/F1 fns
BLOCKsignalling SAS2-BR DC Model Rail Shuttle with Station Stop & Acceleration