I'm running Marlin firmware with the Pronterface frontend on custom CNC hardware. I have had a bunch of problems with homing in my G-code initialization that just didn't seem correct. I finally gave up using an initial sequence and instead use a combination of a home move and Pronterface jog commands to get to the desired z initial position, I use a G92 command in my initial Gcode to set the origin and start my G-code. It wasn't pretty but it worked.
This weekend, I was using my CNC to validate some 3D measurement devices by moving them to known positions. I have a simple list of positions that I want the tool to move to. When, I run/print this script (and a simplified version that just moves the z axis +-100mm), After a frustrating afternoon, I finally figured out that if I just load/run a G-code file the z axis only moves approximately +-50mm when it should move +-100mm. But, if I jog z up/down .1 mm and then print the G-code the z movements are correct. In hindsight, this explains the problems I had with homing.
Can anyone explain what's going on??? It seems like Pronterface is sending some necessary initialization to the Marlin firmware when I jog the z axis. I already send G code commands for setting mm and absolute position. The x and y axis are always ok. What Gcode is needed to get the z axis working correctly. I'm running modifed Marlin firmware from this summer that works with the MAX6675 and Toshiba drivers.