FR 7157 then FR 6921 at Dublin
Madrid → Dublin → Barcelona
Timetable, Dublin time
20:25FR 7157 from Madrid at the gate
12:50FR 6921 to Barcelona leaves the gate
16 h 25 apart on the timetable, overnight
FR 6921 leaves 16 h 25 after FR 7157 arrives on the timetable: more than half a day, so not a connection we count.