Apparently the Z Endstop does not share the same pin as the touch sensor unlike some older boards, but for some reason the example config is made in such a way that it first override the Z_MIN pin static variable followed by a function that replaces the Probe Pin with the Z_MIN pin variable.
I just finish compiling the firmware so I did not do any print test yet, but it seems to be working fine and I probably need to increase the bed height by 1mm or so if I wish to use the Z endstop as a failback.
To use both BLTouch and Z Endstop, from Configuration.h
Comment out this line
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
By adding // to the front of the line
//#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN // We are using Z_MIN_PROBE_PIN instead
Find the below:
#if ENABLED(CR10V2_BLTOUCH)
#define Z_STOP_PIN 19 // Source DWIN2
#endif
Replace with:
#if ENABLED(CR10V2_BLTOUCH)
#define Z_MIN_PROBE_PIN 19
#define USE_PROBE_FOR_Z_HOMING
#endif
Find the below:
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING ENABLED(CR10V2_BLTOUCH) // Set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING ENABLED(CR10V2_BLTOUCH) // Set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING ENABLED(CR10V2_BLTOUCH) // Set to true to invert the logic of the probe.
set Z_MIN_ENDSTOP_INVERTING and Z_MAX_ENDSTOP_INVERTING to false, I am not sure if we should leave Z_MAX_ENDSTOP_INVERTING alone because it was assigned the same pin number, but it should be fine since the Z_MIN_PROBE_ENDSTOP_INVERTING should override it.
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING ENABLED(CR10V2_BLTOUCH) // Set to true to invert the logic of the probe.
Optionally you can also uncomment this code to allow the endstop to act as a failsafe. However if you do this you would need to use the bed leveler to increase the bed height so that Z 0.0 does not trigger the Z endstop switch.
#define ENDSTOPS_ALWAYS_ON_DEFAULT
Finally just recompile and upload to the control box and update your slicer startup g-code.
Add a G29 after the G28 to create a new mesh every single time or alternatively add M420 S1 after G28 to reuse the stored mesh.