In this Kato SD40, I have installed a CN-GP. The CN-GP because it fits the best in this locomotive. I also used a CN-GP because I needed an extra light function to run a rotary beacon on the top of the locomotive.
I first needed to make sure to decoder would fit inside the locomotive, so I had to mill the frame so that the parts on the bottom would not make contact with the frame. I made sure to file the frame where I milled and made sure all the filings were cleaned out so they would not potentially become a short. To make the decoder fit snug, I had to bend the top of the frame that comes in contact with the top of the decoder down with a pliers. I applied very little pressure so I would not break the tabs off.
After I milled the frame down so that the decoder would not come in contact with the frame, I isolated the frame from the decoder with tape. I then wired the orange and gray wires to the motor and isolated the motor from the frame with tape. I then cut a notch in the plastic frame that holds the motor so I could run the orange and gray wire out through the top. I left enough space that I could push the orange and gray through the crack of the locomotive where the two frames meet. I then wired the yellow, black and blue wire from the front of the CN-GP to the back half of the CN-GP as shown below.
Completed Installation with shell off
I then placed a piece of tape on the wires so they would be secured to the frame and not affect the way the shell fits on the locomotive. I also made sure the wheels made contact with the bus bar and taped the bus bar to the frame so it would not move at all. The decoder fits and was tight so I was ready to wire the rotary beacon.
Close up of lighting function wiring
I needed to wire the beacon next so I connected one end of the rotary beacon to a 1k 1206 surface mount resistor at the first function pad and took the other end to the blue wire pad where the 5 volt output is. I then needed to connect the wires to the shell where they were mounted. (use caution because shell can melt)
Now that I had everything wired up I needed to program my rotary beacon on the programming track so that the could be functional. So I changed CV 51 to a value of 38. I then put the shell back on the locomotive and made sure the wires I added would clear the shell and tested the locomotive to make sure my extra light function would work correctly.