I've never trained a dog on a treadmill, but I know it can be done, and from my understanding its pretty simple.
Start as young as possible, or as soon as possible. Start on a very low setting, you don't want to scare the dog. Try crouching in front of the treadmill while the pup is on it, and encourage the dog to come to you, so that he starts walking. Have treats ready and give him one every now and then when he's calm and not having issues walking on the machine. Be very slow and gradual with upping the settings if you are going to, and try not to work the dog up before getting him on the machine.
I dont think tying a dog to a treadmill is a good idea, if he does slip or lose footing there is a higher risk of strangling on the lead if its attached to the treadmill, so I would try training him on it without a lead. Dogs I've seen who walk on machines learn to love it, and dont need any more encouragement other than turning the machine on and the command to get on.
Maybe another member has more specific instructions, or someone else has actually trained their dog on a machine like you are, but I think starting slowly with you in front of the machine makes sense for encouragement. Be sure to praise the dog a lot as he's on the machine, try and make it fun for him. Good luck!