FR 689 then AA 8651 at Madrid
Vienna → Madrid → Barcelona
Timetable, Madrid time
19:00FR 689 from Vienna at the gate
18:00AA 8651 to Barcelona leaves the gate
23 h apart on the timetable, overnight
AA 8651 leaves 23 h after FR 689 arrives on the timetable: more than half a day, so not a connection we count.