The train goes straight ahead without changing line if the switch is at “Position 0”. If the switch is at Position 1, however, the train changes its direction. Position 0 and Position 1 and switch locked indications are usually taken as separate digital inputs.