You say it only happens at top floor and not at the intermediate floor correct?
If this is the case, are your terminal switches interfering with the normal position reference system?
Temporarily bypass the up slow down limit switch and the up direction limit switch, but keep the final limit switch in circuit and check whether the problem disappears. If yes re-adjust the limit switches and put them back in circuit.

Also check whether at this position any related traveling cable wire is losing continuity and sparking because strands are broken.