FR 9601 then FR 188 at Madrid
Rome → Madrid → Edinburgh
Timetable, Madrid time
19:50FR 9601 from Rome at the gate
10:30FR 188 to Edinburgh leaves the gate
14 h 40 apart on the timetable, overnight
FR 188 leaves 14 h 40 after FR 9601 arrives on the timetable: more than half a day, so not a connection we count.