You will not make a VFD from a treadmill it's not possible.
Yes, No, Maybe. Read this.
http://www.vfds.in/variable-frequency-drive-in-treadmill-424237.html
A VFD is a device that allows you to run 3 phase electrical devices (ac motors) on single phase power.
That's too limited a definition. There are literally infinite combinations of VFD input and output. There are VFDs which only accept 3-phase input.
As long as we're being precise in our technical terminology, a Variable Frequency Drive does exactly that; changes the frequency of the incoming electrical signal to whatever frequency variables the internals allow for output. For some motors, changing the frequency input produces an equivalent rotational speed.
Some, but not all VFDs, also have the capability of changing 240-volt single phase input to 3-phase output as well as varying the frequency. Some, but not all, have the capability of changing 120-volt single phase to 240-volt 3-phase, as well as varying the frequency.
So, when selecting a VFD, read the fine print. There are too many horsepower, voltage and other requirements to just grab the first one which pops up on an internet search.
jack vines