Reference with optical sensor
-
Hello,
My Z-axis reference is 30mm below the nozzle. I reference my z axis with an optical sensor using G30. How can I home the axle when the sensor is triggered?
I would like to check the Pin State and then decide what happens. My reasoning looks like this:; homez.g G1 X225 F400 ; Referenzposition if(sensors.gpIn[!io2.in].value = 1) ; !io2.in pin optical sensor define with M558 G91 G1 Z50 F1000 G90 G30 G1 Z0 F600 ; Start Position else G30 G1 Z0 F600 ; Start Position
Is there a way to query the Z probe pin status because the sensor.gpIn dont work like this?
-
@stanh yes, you can get the reading of Z probe #0 at sensors.probes[0].value[0].
-
@dc42 Thanks