Not sure if I'm posting in the correct area. I'd like to build a CNC cam grinder. Building the machine itself won't be difficult for me, but instead of having to use masters to grind the lobe profiles, I would like to be able to program it into the CNC.

The way I envision this, is to have an encoder motor on the cam that tells a stepper motor to move the grinding wheel / X axis away and closer to the cam lobe depending on the position of the cam.

Being a bit of a novice on the electronics side, I am a bit unsure of how to properly set up / program the timing vs position. I wish there was a simple way of telling a machine: "IF cam position is "---"degrees, send "X" axis to "-.--" position. Then you would simply build a lobe by programming the X position for every one of the 360 degrees or how ever many pulses you have per revolution.

The other way I can see this happening, is setting it up with the cam rotation motor to only travel 359 degrees, reverse back to zero (home).

I expect some severe criticism in my idea here, and am prepared for it. But would certainly like the input from others. My plan would be to use generic stepper motors and drives with a basic CNC program.

Thanks in advance.