The Z axis go down after "Z home" in CNC mode.

Dear Experts!

My 3D printer is CNC mode now.
When I send "Z home" command, the motor sit down until Z min, after go down approx 40 mm (of course it can't).
If I push the Z min switch earlier, then the Z axis stop, go up and down 5mm (it's OK), but after go down 40mm again.

If Z probe is dissabled then the Z axis works properly.

This is the Z probe code:
#define Z_PROBE_Z_OFFSET 0
#define Z_PROBE_Z_OFFSET_MODE 0
#define UI_BED_COATING 1
#define FEATURE_Z_PROBE 1
#define EXTRUDER_IS_Z_PROBE 0
#define Z_PROBE_DISABLE_HEATERS 0
#define Z_PROBE_BED_DISTANCE 30
#define Z_PROBE_PIN ORIG_Z_MIN_PIN
#define Z_PROBE_PULLUP 0
#define Z_PROBE_ON_HIGH 0
#define Z_PROBE_X_OFFSET 0
#define Z_PROBE_Y_OFFSET 0
#define Z_PROBE_WAIT_BEFORE_TEST 1
#define Z_PROBE_SPEED 2
#define Z_PROBE_XY_SPEED 150
#define Z_PROBE_SWITCHING_DISTANCE 1
#define Z_PROBE_REPETITIONS 1
#define Z_PROBE_USE_MEDIAN 0
#define Z_PROBE_HEIGHT -20
#define Z_PROBE_DELAY 0
#define Z_PROBE_START_SCRIPT ""
#define Z_PROBE_FINISHED_SCRIPT ""
#define Z_PROBE_RUN_AFTER_EVERY_PROBE ""
#define Z_PROBE_REQUIRES_HEATING 0
#define Z_PROBE_MIN_TEMPERATURE 150
#define FEATURE_AUTOLEVEL 0
#define FEATURE_SOFTWARE_LEVELING 0
#define Z_PROBE_X1 20
#define Z_PROBE_Y1 20
#define Z_PROBE_X2 160
#define Z_PROBE_Y2 20
#define Z_PROBE_X3 20
#define Z_PROBE_Y3 160
#define BED_LEVELING_METHOD 0
#define BED_CORRECTION_METHOD 0
#define BED_LEVELING_GRID_SIZE 5
#define BED_LEVELING_REPETITIONS 5

What did i mess up?

Thank you: Peter

Comments

  • #define Z_PROBE_HEIGHT -20

    does not sound good. -20 means it triggers when you rammed the nozzle 20mm into bed. With cnc it is different normally. Does this also measure length of tool so z=0 is the tip of the mill?

    I have a special switch for my cnc so it triggers x mm before (height of sensor). In my case nearly 40mm. 
    Problem is that firmware knows that bed is 40mm deeper. So actually I do not home z axis but I use G30 to home Z axis.
    - G30 P<0..3> - Single z-probe at current position P = 1 first measurement, P =
    2 Last measurement P = 0 or 3 first and last measurement
    - G30 H<height> R<offset> Make probe define new Z and z offset (R) at trigger
    point assuming z-probe measured an object of H height.

    The second variant is what you need to define levels for homing replacement.
  • Well, I may not understand the principle:
    Can I upload an image? 
  • We have no image upload. But you can use any free image hosting site like imgur or post images to dropbox or alike stored image - just make sure they are public so we can open them.
  • Yep that is how you need to do it for cnc. But as you see you can not home z as it is somewhere on the board where your sensor needs to be. So what you do is home xy maybe home z if you have z max end stop. z probe whould be a different pin. Then you position manually tool over the sensor and run
    - G30 H<height> R<offset> Make probe define new Z and z offset (R) at trigger
    point assuming z-probe measured an object of H height.

    Now it depends a bit how your cnc code looks like. Do you need z=0 at wood top or bottom. This command is a combination of setting real bottom and Z offset as done with G92. So lets say wood has 30mm and you want wood top to be z=0 but allow moving down to z=-30 so you can reach the bottom. If I get it right (please test first with test triggering in free air) you would send:
    G30 H50 R20
    when z probe height is 0. When z probe height is -20 as in your settings it reduces to less math:
    G30 H30 R0

    If you want the wood bottom to be 0 it would be
    G30 H30 R30

    So H is always the height you measured and R is which Z position you want to assign it.

  •  The Repetier firmware gives "unknown command" answer.   (G30)
    The printer are CNC mode....
    Why?
  • The implementation is inside a block protected with FEATURE_Z_PROBE so if that is set 0 you will not have it. So sounds like were not having probe functions active at all.
  • Ok, but, if i allow the probe, then and I send "Z home" command, the motor sit down until Z min, after go down approx 40 mm.
    The motor strains, but not place...  :-(
  • As I said you should not home Z - only x and y. For Z use G30 instead or make your cnc use z max homing which also works.
  • All right!
    Where can I the z max homing switch?
  • Just set z min pin -1 to disable that and connect a switch positioned at z max with a pin and assign it z max pin and set homing direction for z to 1. Then upload firmware again and it should home to the top position. Safer anyway with tools since it moves away from anything. And later use G30 to set z for your objects heights as needed.
Sign In or Register to comment.