Is everything un blocked?? EVERYTHING ; so, the hose, and spinning brush bar???
Sometimes it can cut out when something is not working, to avoid it over heating and causing a fire.
Another thing might be that, inside where the wire enters the machine, the wire could be damaged there. This is quite often as I have seen it many times.
You need to open up where the wire enters the machine and check the connection there; loose connections, or even a damaged wire.
Thanks
STE
December 2008