Thanks for staying with this post. I dont believe i have monitored M18 and 10 for errors. I am not using MB27 or MB3 for any other functions within the program. The first move is not really supposed to complete, it is supposed to see the sensor before completion. Once the sensor is tripped we overwrite the previous PTO command with the one to terminate the move. We are not detecting the end of the move by any feedback device the move is completely open ended. Heres the puzzling thing - the code and stepper system system works perfectly at just about every speed from 3000 up to 18000 pulses. I noticed this condition while testing random speeds - so yes works great at higher speeds. When it overshoots it appears to be relatively conistent, but the overshoot is huge. for example my second move is 1/2 inch it overshoots anout 8 inches. My stepper resolution is set to 1600 PPR and can accept up to 200kHz. I have attached the program for you to evaluate. Maybe there is a better method??? Also, the program altered from the original in which i subract 11 from the first move's velocity decreasing the chance of the issue, but i would like to eliminate if possible. I have posted another entry in the forum asking in more detail for help with programming.
thanks,
Joe
gap sensor program.vlp