Here is a circuit setup to have minimal time between trains. This is mostly for multiple unloading of the same kind with waiting bays holding trains until there is a free unloading bay. It could be used for smaller setups, but the time saved is probably not worth much in that case, it saves 2 to 3 seconds over just having several signals, if unloading a train takes a minute or two, don't bother with this. If you're unloading a train every 7 seconds (12 stack inserters unloading an ore car) this will help.
The two green wires go back to the station with Read Stopped Train, that puts a number in T if there is a train stopped at the station.
The top signal is set to Close if T > 0, so it will open when the train is leaving, this allows the next train to start at the same time as the current train is leaving. The second signal has two purposes, first it blocks the top one from turning off when the current train hasn't yet moved, and second it detects the second train as it passes. The other combinator keeps the signal red until the second train is at the station, this prevents a third train from trying to get into the station too soon.