I don't know much about how it works. But I removed it to take the engine out of the frame. Basically there is a wire which goes to the underside of the engine on the left side. The wire has a terminal on the end of it (if I remember correctly) and it's screwed onto the case.
I have a picture of what holds it on somewhere I'll try and dig it out. I'll also try and look at one of my bikes tomorrow and see the color of the wire and try and snap a pic or two.
I'm sure someone else here will be more helpful, hope this gets you pointed in the right direction.
Matt