Hi you all, I do have a very naive question, but i have been looking on the PBP reference manual an on the web and I can’t find anything that helps.
I wrote a code for a little machine I’m making and everything works fine except for the HPWM command, that I use to drive a L297 IC which drives a unipolar stepper motor, well it does work but I don’t know how to make the HPWM to stop what I mean is that the program continues to work normally but the motor keeps going on, again any help will be greatly apreciate this is the part of the code that drives the motor


avance: ' routine to advance roll to desired setting
av1=0
portd.0= encoder
while av1< medida
hpwm 1,127,1000
if encoder <> portd.0 then
av1= av1+1
portd.0= encoder
endif
wend
rollo= rollo+Av1
goto rutpal