Quantcast
Channel: Reprap Forum - Firmware - mainstream and related support
Viewing all articles
Browse latest Browse all 1025

help for marlin customization: print offset at homing (no replies)

$
0
0
Hello. I want to debug an axis that occasionally seems to loose some steps, so i thought this: i could echo on usb the position of the axis just before resetting it in the g28 homing command. In this way i could see if making some movements at certain speeds increase the difference between "logical" position of the axis and the actual "real" position.

I tried putting this code in the homeaxis(axis) function (my code is the block in the #ifdef):

[...]
    feedrate = homing_feedrate[axis]/2 ; 
    plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
    st_synchronize();

#ifdef DEBUG_ON_HOMING    
    MYSERIAL.write(axis_codes[axis]);
    SERIAL_PROTOCOLPGM(":");
    SERIAL_PROTOCOL(current_position[axis]);
#endif

    axis_is_at_home(axis);					
    destination[axis] = current_position[axis];
    feedrate = 0.0;
    endstops_hit_on_purpose();
  }
}

I don't know why, it always print 0. Maybe the current_position isn't always "current"? Please, can someone give me some hint?

Viewing all articles
Browse latest Browse all 1025

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>