IB 5029 then EC 7199 at Barcelona
Berlin → Barcelona → Edinburgh
Timetable, Barcelona time
13:15IB 5029 from Berlin at the gate
07:20EC 7199 to Edinburgh leaves the gate
18 h 05 apart on the timetable, overnight
EC 7199 leaves 18 h 05 after IB 5029 arrives on the timetable: more than half a day, so not a connection we count.