SCREWS_TILT_CALCULATE and Move out of range error

I am still new to Klipper/Mainsail but trying to dial in my printer. My printer is an Ender 3 with the V4.2.7 MCU and a BLTouch. I’ve started with using the template for the Creality 4.2.7 board, as that is what I have on my Ender 3. I was trying to set up the printer.cfg for “[screws_tilt_adjust]” and taking into consideration that the BLTouch sensor pin is 42.4 mm to the left of the nozzle, this was putting the nozzle clearly right of the bed. In this instance, that should be fine, as this is just for the adjustment of the screws and not for the purpose of actually printing. When I ran the command “SCREWS_TILT_CALCULATE”, I would get an error; “Move out of range: 244.900 38.500 10.000 [0.000]”. I looked in my printer.cfg and notice that the “position_max” for both the X and Y steppers were both set at 235. I figured this was the error, so I changed the value to 245, knowing that it is beyond the dimensions of my print bed. By changing this, I was able to successfully run the “SCREWS_TILT_CALCULATE” and it appears to be testing at the screw locations as expected.

Now, that all works, but it leaves me with the question of making sure that I never attempt to print outside the borders of the print bed. How to I ensure I don’t print outside of the bed but allow the carriage to move beyond for testing purposes? Is it just something I just need to control in the slicer and not in the printer itself?

I set up an Ender 3 for a customer a while ago and ran into exactly the same scenario. The position_min and position_max in klipper define the bounds of the travel moves, and not of the print area. For example, on my printer the x endstop is 60mm to the left of the bed, and so position_min on the X axis is set to -60mm. As you suggest, the bounds of the print area should be defined in the slicer.