Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I get error -70125 when resetting encoder?

I have a simple VI that moves my stepper motor to a specific position (determined externally by a voltage I'm reading), then resets the motor position and the encoder position to both be zero.
 
The motor position function works ok, but the reset encoder vi returns the -71025 modal error - "The function was not executed because it was attempted at an illegal time".
I've tried moveing the VI around so that it is executed at various times, but it never seems to work. Even executing the VI on it's own seems to fail.
 
MAX will reset the encoder without a compaint though (using interactive).
 
This all worked fine until I "upgraded" from NI-Motion v5 to v7 and then labview 6.1 to 8.0.
 
Any ideas?
 
Mike Evans
TRW Conekt
N.I. Alliance Member, UK
http://www.Conekt.net
0 Kudos
Message 1 of 2
(3,586 Views)
Hi Mike,

Taken directly from NI-Motion C referance help:

" The Reset Encoder Position function resets the position of the selected encoder. You can reset position to zero or to any value in the 32-bit position range. Normally, this function is only used on independent encoders that are not mapped to axes. For encoders mapped to axes, you must use the Reset Position function instead.

Note Attempting to reset an encoder that is mapped to an axis generates an error. "

This could be why you are getting this error

Regards

Jon B
Applications Engineer
NIUK
Message 2 of 2
(3,534 Views)