I have question with stepper motors with encoders. With a step and dir type, do people typically run a PWM signal and just keep track of the steps and stop when the number of accumulated steps from the encoder is achieved? Essentially, it is like hitting a run button and having it turn off at some limit. Or is it more used where you turn the pin on and off and continually check the encoder feedback at the same time and progress until you hit the number of steps?
And what is the question? Sorry
Yes... each step advances a known degree, but a belt, cable, track might slip, so this might not work.
... and yes, limits at the ends or any point in the path.
Or maybe you know how much you want to turn, so you send precisely that many pulses, and perhaps check that the encoder moved its proper number of pulses. If you've properly sized the stepper, it should move to exactly where you want it to go without losing track of any steps.
Or is it an absolute encoder, and you use it to initialize an initial position, and then count steps from there.
How many steps does it take to make the motor turn one revolution?
How many pulses does the encoder output in one revolution?
Generally, you would use a stepper motor so that you don't have to use an encoder. As noted by others, a stepper motor can lose steps, but if properly sized should not in normal operation.
Depending on application, you may want to monitor the actual position perhaps to avoid damage to people or equipment. Or for applications were you have high speed but lower torque, like a 3D printer, it is quite easy for the printer to lose steps if it catches on the print.
So the encoder with a stepper is used more as a verification check. The step profile is generated and executed as an open loop, periodically the encoder feedback is used to check that motor is moving correctly, and potentially add a correction to the step generation.
No.
You don't control a stepper with a PWM signal.
If you have a step/dir type driver, then It's just a single pulse for each step.