FR 5483 then FR 188 at Madrid
Porto → Madrid → Edinburgh
Timetable, Madrid time
08:30FR 5483 from Porto at the gate
05:55FR 188 to Edinburgh leaves the gate
21 h 25 apart on the timetable, overnight
FR 188 leaves 21 h 25 after FR 5483 arrives on the timetable: more than half a day, so not a connection we count.