Help with Stepper Motor TPU fcn
2003-11-03 by Tim
Hello all, I have question I hope some can help with. I am using the Stepper Motor fcn of the TPU on a 68376A (not the G mask). My present code, when it gets a command to move the stepper checks to see if the "desired" and "actual" positions are the same, if so then set both to the midpoint (0x7FFF). This way it needs some very unusual commands to cause overflow. Well you guessed it ... A device we added can send a lot of stepper move commands such that the "actual" and "desired" don't get reset back to midpoint. So I can have a situation like: - the current position is says FF00 and moving in a positive direction and ending at FFF0 say. - then I get a command to move another say F0 positive. - well FFF0 + F0 = 100E0, but the SM fcn uses 16bit registers so this is 00E0 and hence a large negative move and in-correct behaviour. What are possible solutions? - can I take the current position (@ FF00) and the desired position (@FFF0)(before new request) and set current position to be 8000 and desired position to be 80F0 and not screw up the movement in process? - other options? Tim Flynn Director of R&D RMS Welding Systems Ph.(780)955-3907 http://www.rmsweldingsystems.com Tim Flynn Director of R&D RMS Welding Systems Ph.(780)955-3907 http://www.rmsweldingsystems.com