FR 8240 then FR 9430 at Madrid
Porto → Madrid → Marrakesh
Timetable, Madrid time
16:30FR 8240 from Porto at the gate
09:30FR 9430 to Marrakesh leaves the gate
17 h apart on the timetable, overnight
FR 9430 leaves 17 h after FR 8240 arrives on the timetable: more than half a day, so not a connection we count.