You are here:
Print

The iMOT intelligent motors use a magnetic encoder that outputs quadrature signals but additionally, it can also output the motor absolute position, on one mechanical turn.
The absolute position is saved in the controller RAM memory, at the address 0x222 and goes from 0 to 4096. To read it, the following TML code sequence can be used.

/* User variables declaration and initialization. */
int abs_pos_address; // Define integer variable abs_pos_address
long abs_pos; // Define long integer variable abs_pos
abs_pos = 0;

/* Read the motor absolute position. */
abs_pos_address = 0x222;
abs_pos(L) = (abs_pos_address), dm;

After running the code above, the “abs_pos” variable will contain the absolute position of the motor (on on turn).