Page 1 of 1

Stepper current position

Posted: Tue Jul 03, 2018 5:46 am
by clint
Hi

My problem is about handling a stepper motor with the new api phidget22

I have noticed with this new api that the controller looses the current position when the application is shutdown. When the application is restarted, the current position is automatically set to zero.

With the previous api phidget21, the current position was not modified and the application can restart with a correct position

Is it normal ?

Re: Stepper current position

Posted: Tue Jul 03, 2018 9:55 am
by mparadis
This is expected behaviour in Phidget22. It was restructured so that a Phidget will always be in a predictable default state when attached. You'll have to keep track of currentPosition in your program by writing it to a file instead.