Change Z probe pin between probe tests
Can I ask if there is any way of using different controller pins for nozzle height determination and for bed leveling? For example, can the height of each of two nozzles be found by running G30 using RAMPS pin D2 for the probe, then finding a datum for bed leveling by running a further G30 but using RAMPS pin D18, followed by a G32 for bed leveling, again using RAMPS pin D18?
The above sequence of actions can be seen on a YouTube video at The reason for using two separate sensors is that I have found that dynamic effects can potentially make under bed sensors very inaccurate.
The above sequence of actions can be seen on a YouTube video at The reason for using two separate sensors is that I have found that dynamic effects can potentially make under bed sensors very inaccurate.
Comments
Mike
Mike
Modifying my sensors so that the output could be shared with one common pin was just a matter of tri-stating the output of the un-selected sensor. The sequence is now:
1) Select underbed sensor and load extruder 0 then run G30, recording Z
2) Stay on underbed sensor but load extruder 1 and run G30. Calculate and enter EXT1_Z_OFFSET
3) Select touch sensor and run G30. Calculate difference from EXT0_Z_OFFSET and enter in Z_PROBE_Z_OFFSET
A bit manual, but quite do-able. If this all works, may I come back to you with a feature request to implement some or all parts of this into your V2 firmware?
Mike
The way you describe it, it should be no problem. For z probe difference height does not matter, just difference. So you can use z probe height for the other sensor.
In V2 sensor is currently a fixed class. Would it be a pointer with preset that would make it easier in this case. Then you could just add a g-code to select a z probe and run commands. Some idea for the future.
One thing that is not presently working, is that I haven't found a way to simply set the Z height. While G30 works correctly, G30 S1 which worked on older firmware now fails even to see the trigger from the sensor.
G32 works perfectly, but is referenced to the touch probe - entering a value for Z-probe height in the EEPROM does not seem to change the Z zero position.
Mike
and sets z probe height from given Zx value.
How do you handle the z signals currently when you say:
> G32 works perfectly, but is referenced to the touch probe - entering a value for Z-probe height in the EEPROM does not seem to change the Z zero position.
G32/G30 should use the same sensor so both use also same z probe height. Only the fact that z probe height is not relevant for extruder z difference makes G134 work regardless of that value.
Selecting the touch sensor I can call G30 and the probe works correctly, the Z moving down until it either touches the bed or I simulate a contact by tapping the probe tip.
Selecting the touch sensor and calling G32 functions correctly (7 X 7 array) and the correct value is recorded in Z max length in the EEPROM. G32 would not be useful with the underbed sensor selected as there are positions on the bed of poor sensitivity.
The ideal would be to set the Z max length from the first probe of the G134 which works accurately and reliably
So the main problem and only one is that G30 S1 Z6 or which ever Z you use is not working.
With S1 it runs
float zheight = Printer::runZProbe(true, true, Z_PROBE_REPETITIONS, true);
while without it runs
The deafult value for the last parameter is true so that is the only real difference. So S1 has in runZProbe enforceStartHeight true and without it is false.
This means Printer::startProbing is called with enforceStartHeight so this extra block is run eventually:
Please try if
in void Printer::measureZProbeHeight(float curHeight) works better. I think this is not good and maybe I added the extra parameter later and did not see it is used here. The move down is without end stop test if it triggers and thinks it is too high so that might be the move you are looking for.