#homing override

1 messages · Page 1 of 1 (latest)

dull dragon
#

hi @mossy island

remote breachBOT
#
AI Help

Hello! How can I help you with 3D printing today?

mossy island
#

hello

#

send current homing override

dull dragon
#

ok 1s

mossy island
#

as code preferrably

dull dragon
#

goofy ahh firmare isnt connecting

#
axes: yz
gcode:
  {% if 'X' in params %}
  G28 X 
  {% endif %}
  {% if 'Y' in params %}
    {% if "x" not in printer.toolhead.homed_axes %}
    G28 X
    {% endif %}
    G1 X100
    G28 Y 
  {% endif %}
  {% if 'Z' in params %}

      {% if "y" not in printer.toolhead.homed_axes %}
      G28 Y
  {% endif %}
  G1 X175 Y175 F6000
  G28 Z
  {% endif %}```
mossy island
#

add x to axes section

dull dragon
#

nothing

mossy island
#

nothing in the console?

dull dragon
#

nope

mossy island
#

do you just run G28 XYZ

dull dragon
#

yeah

mossy island
#

1s

dull dragon
#

k

mossy island
#

can you add
RESPOND MSG="{params}"

#

at the beginning of the gcode

dull dragon
#

where

mossy island
#

should show the params in the console

dull dragon
#

ah

mossy island
#

what the hell

dull dragon
#

lmao

mossy island
#

can you instead of doing {params} do {rawparams}

#

just for a test

dull dragon
#

lol

mossy island
#

what happens if you run G28 X

dull dragon
#

it homes x

mossy island
#

rn i believe G28 Z should home everything

#

"properly"

dull dragon
#

fuck

#

it dragged on the bed

mossy island
#

😭

#

need add z hop then

dull dragon
#

yeh

mossy island
#

add set_position_z: 0

#

and at the beginning of the macro

dull dragon
#

bed is fine

mossy island
#

G1 Z2 or something

mossy island
#

then itll move up by 2mm

dull dragon
#

do more than that

mossy island
#

go ahead

dull dragon
#

its flying gantry it might be fucked

#

oh yeah i can do it

#

also it didnt move y to the safe position

#

i mean x

mossy island
#

good to know

#

ok

#

wild idea but

#

at the beginning

#

first line add this

#

{%set realparams = params.keys()|list|last %}

#

send the code so i can update

dull dragon
#

erm

mossy island
#

send code

dull dragon
#
axes: xyz
gcode:
  {%set realparams = params.keys()|list|last %}
  RESPOND MSG="{rawparams}"
  set_position_z: 0
  G1 Z10
  {% if 'X' in params %}
  G28 X 
  {% endif %}
  {% if 'Y' in params %}
    {% if "x" not in printer.toolhead.homed_axes %}
    G28 X
    {% endif %}
    G1 X100
    G28 Y 
  {% endif %}
  {% if 'Z' in params %}

      {% if "y" not in printer.toolhead.homed_axes %}
      G28 Y
  {% endif %}
  G1 X175 Y175 F6000
  G28 Z
  {% endif %}  ```
mossy island
#
axes: xyz
set_position_z: 0
gcode:
  {% set realparams = params.keys() | list | last %}
  {% if realparams == "" %} {% set realparams = "XYZ" %} {% endif %}
  RESPOND MSG="{realparams}"
  G1 Z10

  {% if 'X' in realparams %}
    G28 X 
  {% endif %}
  {% if 'Y' in realparams %}
    {% if "x" not in printer.toolhead.homed_axes %}
      G28 X
    {% endif %}
    G1 X100
    G28 Y
  {% endif %}
  {% if 'Z' in realparams %}
    {% if "y" not in printer.toolhead.homed_axes %}
      G28 Y
    {% endif %}
    G1 X175 Y175 F6000
    G28 Z
  {% endif %}
#

i believe this should properly respond to g28 xyz

#

and possibly g28 itself

#

still wont home y properly

#

but we taking steps right

dull dragon
#

its doing it

mossy island
#

when it homes

dull dragon
#

it worked

mossy island
#

move it up on Z axis by a bit

#

then run G28 X

dull dragon
#

with g28xyz

mossy island
#

and see if Z is still properly done

#

need to make sure it doesnt override it

dull dragon
#

wdym if z is properly done

mossy island
#

just see if the Z pos is correct

dull dragon
#

no its not

mossy island
#

alright good to know

#

let me try this

#
axes: xyz
gcode:
  {% set realparams = params.keys() | list | last %}
  {% if realparams == "" %} {% set realparams = "XYZ" %} {% endif %}
  RESPOND MSG="{realparams}"

  {% if "z" not in printer.toolhead.homed_axes %}
    G92 Z0
  {% endif %}

  G1 Z10

  {% if 'X' in realparams %}
    G28 X 
  {% endif %}
  {% if 'Y' in realparams %}
    {% if "x" not in printer.toolhead.homed_axes %}
      G28 X
    {% endif %}
    G1 X100
    G28 Y
  {% endif %}
  {% if 'Z' in realparams %}
    {% if "y" not in printer.toolhead.homed_axes %}
      G28 Y
    {% endif %}
    G1 X175 Y175 F6000
    G28 Z
  {% endif %}
#

wait

#

wrong

#

now?

dull dragon
#

lets see

mossy island
#

god i feel like im doing something wrong so bad 😭

#

whys it acting so weird, everywhere i look online just 'X' in params worked

dull dragon
#

g28 does nothing

mossy island
#

what does it log

#

the respond command

dull dragon
#

nothing

mossy island
#

instead of respond realparams do params

#

so i can better see

dull dragon
#

and now klipper is dead

#

man

mossy island
#

we love klipper

dull dragon
#

yep

mossy island
#

alright

#

{% if realparams == "G" %} {% set realparams = "XYZ" %} {% endif %}

#

do this one

dull dragon
#

dwhere?

mossy island
#

instead of the other realparams == ""

#

replace that line with this one

#

the one most similar

dull dragon
#

oh i see

mossy island
#

then g28 itself should work

dull dragon
#

nuh uh

mossy island
#

does it throw the must home axis first?

dull dragon
#

wdym

mossy island
#

the red error

#

does it pop up after g28

dull dragon
#

yeah

mossy island
#

oh your shit upside down

#

lol

dull dragon
#

???

mossy island
#

my console goes the other direction

dull dragon
#

oh

#

lol

mossy island
#

so

#

issue is

#

g92 z0 doesnt let it move

#

and even if i did it for all axes

#

it will think Z is homed

#

if you run g28 x

#

and idk how to undo fake homing

#

we can use force_move

dull dragon
#

😭

mossy island
#

[force_move]
enable_force_move: True

#

you need this

#
axes: xyz
gcode:
  {% set realparams = params.keys() | list | last %}
  {% if realparams == "G" %} {% set realparams = "XYZ" %} {% endif %}

  FORCE_MOVE STEPPER=stepper_z DISTANCE=10 VALUE=10

  {% if 'X' in realparams %}
    G28 X 
  {% endif %}
  {% if 'Y' in realparams %}
    {% if "x" not in printer.toolhead.homed_axes %}
      G28 X
    {% endif %}
    G1 X100
    G28 Y
  {% endif %}
  {% if 'Z' in realparams %}
    {% if "y" not in printer.toolhead.homed_axes %}
      G28 Y
    {% endif %}
    G1 X175 Y175 F6000
    G28 Z
  {% endif %}
#

then try this

dull dragon
#

same issue still

mossy island
#

be careful though

#

first move it higher above the bed

#

i dont wanna accidentally wreck ur bed lol

dull dragon
#

oh

mossy island
#

should be fine though

dull dragon
#

lol no velocity

mossy island
#

ok set velocity=100 ig

#

thats just accel

#

100 mm/s2 should be not bad for Z

#

i think

#

thats my max

dull dragon
#

oh its working

#

somehwat

mossy island
#

g28 itself?

#

it wont home y properly still

dull dragon
#

hopefully it doesnt crash the bed

mossy island
dull dragon
#

ye

#

IT WORKED

#

Now what

mossy island
#

can you test G28 X by itself and tell me it doesnt mark the other axes as homed please

dull dragon
#

your a magicain tbw

mossy island
#

lmao

#

ive been working with something similar to jinja templating for a while at work

#

so its in my blood rn

dull dragon
#

no it all stays the same

mossy island
#

alright good

#

g28 y should home x and y

#

and g28 z should home all

#

so i think

#

g28 / g28 xyz should be perfect

#

but, g28 z

#

won't home Y at the proper X position

#

am i correct

dull dragon
#

ok one issue

#

can we make it move forward on y before it homes x

mossy island
#

sure

#

if youre not scared

#

that its gonna be at the limit

#

and crash into the printer

dull dragon
#

eh its fine probably

mossy island
#

let me try

#
axes: xyz
gcode:
  {% set realparams = params.keys() | list | last %}
  {% if realparams == "G" %} {% set realparams = "XYZ" %} {% endif %}

  FORCE_MOVE STEPPER=stepper_z DISTANCE=10 VELOCITY=10

  {% if 'X' in realparams %}
    FORCE_MOVE STEPPER=stepper_y DISTANCE=10 VELOCITY=50
    G28 X 
  {% endif %}
  {% if 'Y' in realparams %}
    {% if "x" not in printer.toolhead.homed_axes %}
      FORCE_MOVE STEPPER=stepper_y DISTANCE=10 VELOCITY=50
      G28 X
    {% endif %}
    G1 X100
    G28 Y
  {% endif %}
  {% if 'Z' in realparams %}
    {% if "y" not in printer.toolhead.homed_axes %}
      G28 Y
    {% endif %}
    G1 X175 Y175 F6000
    G28 Z
  {% endif %}
#

nvm

#

now its moving y by +10mm before X

#

you really have some complicated homing lmfao

dull dragon
mossy island
#

change it if 10mm is wrong

#

we might want to move it into macros cause itll get convoluted soon

dull dragon
#

yeahhh

mossy island
#
[gcode_macro HOME_X]
gcode:
  FORCE_MOVE STEPPER=stepper_y DISTANCE=10 VELOCITY=50
  G28 X

[gcode_macro HOME_Y]
gcode:
  {% if "x" not in printer.toolhead.homed_axes %}
    HOME_X
  {% endif %}
  G1 X100
  G28 Y

[gcode_macro HOME_Z]
gcode:
  {% if "y" not in printer.toolhead.homed_axes %}
    HOME_Y
  {% endif %}
  G1 X175 Y175 F6000
  G28 Z

[homing_override]
axes: xyz
gcode:
  {% set realparams = params.keys() | list | last %}
  {% if realparams == "G" %} {% set realparams = "XYZ" %} {% endif %}

  FORCE_MOVE STEPPER=stepper_z DISTANCE=10 VELOCITY=10

  {% if 'X' in realparams %}
    HOME_X
  {% endif %}
  {% if 'Y' in realparams %}
    HOME_Y
  {% endif %}
  {% if 'Z' in realparams %}
    HOME_Z
  {% endif %}
#

this should be... final i think?

#

should also home y at the right pos when doing g28 z

dull dragon
#

wait so i just put all that in my macros foldeR?

mossy island
#

wherever, macros dont have to be in the macros folder

dull dragon
#

or just printer.cfg

mossy island
#

its all just an import

dull dragon
#

kk

mossy island
#

my printer.cfg was 500 lines with all macros vaulthah

#

before i split it into 7 files

dull dragon
#

lmao mine is like 700 rn

mossy island
#

i PRAY that invoking g28 through macros inside homing_override still does the real g28

#

and wont go to an infinite loop of homing and re-homing

#

well probably would infinitely just start z hopping

#

Ohh also this has a potential issue, the force_move Z doesn't change the actual Z position saved in the printer

#

Let me know when you put it in your config and send me the homing_override section so i can update

#

I'll use g1 if Z homed, force_move if not

#

Same for the other one

dull dragon
#

it works i think?

mossy island
#

nice

#

send the homing_override so i can fix

dull dragon
#

im gonna try a print first vaulthah

mossy island
#

nah

#

send it

dull dragon
#

nuh uh

#

print first

mossy island
#

it has a potential to fuck up the positions

dull dragon
#

ah

#

ok

mossy island
#

when re-homing

#

lool

dull dragon
#
axes: xyz
gcode:
  {% set realparams = params.keys() | list | last %}
  {% if realparams == "G" %} {% set realparams = "XYZ" %} {% endif %}

  FORCE_MOVE STEPPER=stepper_z DISTANCE=10 VELOCITY=10

  {% if 'X' in realparams %}
    HOME_X
  {% endif %}
  {% if 'Y' in realparams %}
    HOME_Y
  {% endif %}
  {% if 'Z' in realparams %}
    HOME_Z
  {% endif %}
mossy island
#
axes: xyz
gcode:
  {% set realparams = params.keys() | list | last %}
  {% if realparams == "G" %} {% set realparams = "XYZ" %} {% endif %}

  {% if "z" not in printer.toolhead.homed_axes %}
    FORCE_MOVE STEPPER=stepper_z DISTANCE=10 VELOCITY=10
  {% else %}
    G91
    G1 Z10
    G90
  {% endif %}

  {% if 'X' in realparams %}
    HOME_X
  {% endif %}
  {% if 'Y' in realparams %}
    HOME_Y
  {% endif %}
  {% if 'Z' in realparams %}
    HOME_Z
  {% endif %}
#

that one

#

and

#
[gcode_macro HOME_X]
gcode:
  {% if "y" not in printer.toolhead.homed_axes %}
    FORCE_MOVE STEPPER=stepper_y DISTANCE=10 VELOCITY=50
  {% else %}
    G91
    G1 Y10
    G90
  {% endif %}
  G28 X
#

i absolve myself of any liability due to failed homing

#

but this should work

dull dragon
#

lmao

#

alright

mossy island
#

wildest homing macro ive seen

#

i like it

dull dragon
#

wait

#

smth is fucked i think

mossy island
#

what is

dull dragon
#

lemme test again

#

yeah uhh that didnt go so well

mossy island
#

that sounds like something with your printer 🤔

dull dragon
#

it went way more than 10mm forward

mossy island
#

i didnt misspell 10 did i

#

no it is 10

#

wat

#

z moves fine but y doesnt?

dull dragon
#

it freaked out a little

#

on the home after its already homed

mossy island
#

did u do the updates i sent?

#

including the home_x macro

dull dragon
#

yeah

#

like what the freak

mossy island
#

jeez

#

wtf

#

FORCE_MOVE STEPPER=stepper_y DISTANCE=10 VELOCITY=50

#

so like

#

how

#

:how:

#

maybe try reducing it to 1 idk

#

why does that also seem WAY faster than 50mm/s

dull dragon
#

wait did i goof

mossy island
#

lmao

#

OHHH I KNOW

#

IM STUPID

#

1sec

dull dragon
#

lmao

mossy island
#

ill edit those messages

dull dragon
#

kk

mossy island
#

try now

#

updated

#

its because it was going to y=10 🤦

#

not relatively adding 10

dull dragon
#

lmfao

mossy island
#

so, safe in the end, but definitely a scare lol

#

please make sure your print end gcode moves it to somewhere it will not crash moving forward by 10mm 🙏

dull dragon
#

ok it worked

dull dragon
mossy island
#

well

#

great!

#

off to eat something

#

feeling proud

dull dragon
mossy island
#

couldve been way easier to just home all axes

#

no matter what's requested

#

but gotta deliver lmao

dull dragon