FR 573 then FR 5054 at Madrid
Porto → Madrid → Luxembourg
Timetable, Madrid time
22:05FR 573 from Porto at the gate
17:05FR 5054 to Luxembourg leaves the gate
19 h apart on the timetable, overnight
FR 5054 leaves 19 h after FR 573 arrives on the timetable: more than half a day, so not a connection we count.