I must be missing something.
It sounds like you want to control your railway using an Arduino following commands from your PC, then you try to have the Arduino sense the power on the railway tracks (that it controls itself) to react to what is happening (its own controls), and tell the PC (where the commands come from in the first place) to make the appropriate noises. That's a terrible roundabout way.