I experienced that last summer in my machine, in the really hot part of the summer. Without knowing for sure I blamed the high heat. The speedo would go to O when the machine got hot but would start working again when things cooled down. Once fall hit, no more issues and only once over the winter after a long snowplowing job that got things pretty warm.
In another post someone mentioned a connection for the speedo under the seat in the wiring there, I was going to plug and unplug and clean the connection just to try something. Once fall came on and it started working again, I guess I forgot about it. Gonna see what happens this summer.