EW 2520 then IB 412 at Barcelona
Stuttgart → Barcelona → Madrid
Timetable, Barcelona time
14:25EW 2520 from Stuttgart at the gate
13:35IB 412 to Madrid leaves the gatealso LA 1524, LA 1577, CX 1926, LL 3012, VY 5060, AV 6172, BA 7081, QR 8004, AA 8776
23 h 10 apart on the timetable, overnight
IB 412 leaves 23 h 10 after EW 2520 arrives on the timetable: more than half a day, so not a connection we count.