Homing, OMSMAXV with Encoder, Tango

Warning: The homing of a motor involves the risk that the motor moves all the way to the limit switches. Software limits are ignored during the homing procedure. Make sure that the limit switches are correctly cabled.

The homing procedure should be started from Online -tki. In the following it is explained step by step, starting from scratch.

The function get_motor_unit_position_encoder() works only after a motor has been homed. If this is not possible, the function get_motor_encoder_raw() provides a relative measurement. A virtual counter that uses the raw encoder reading may look like this:

if( $method =~ /reset/i)
   {
     return 1;
   }

if( $method =~ /read/i)
   {
     return Spectra::get_motor_encoder_raw( "mot25")/Spectra::get_motor_conversion_encoder( "mot25");
   }