FR 635 then FR 495 at Dublin
Cardiff → Dublin → Madrid
Timetable, Dublin time
09:15FR 635 from Cardiff at the gate
05:55FR 495 to Madrid leaves the gate
20 h 40 apart on the timetable, overnight
FR 495 leaves 20 h 40 after FR 635 arrives on the timetable: more than half a day, so not a connection we count.