5.4 KiB
''' 使用本模块需要对klipper使用有一定知识和经验积累,请在使用前确保你具备自己进行配置修改的能力
为了保证精度,请安装时尽可能让传感器线圈板的顶面低于加热块的底面。 教程里没有提到的不要做(尤其是G28),提到的请务必做 在用户目录下执行git clone https://gitee.com/NBTP/IDM.git 下载程序包
执行chmod +x IDM/install.sh 如果你不确定自己的pip源是否是国内源或者能否正常下载新的库,或者你完全不知道pip是什么,建议使用以下命令将pip设置为清华源: ~/klippy-env/bin/pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple 然后执行IDM/install.sh进行安装
然后 [idm] serial: #canbus_uuid:
Path to the serial port for the idm device. Typically has the form
/dev/serial/by-id/usb-idm_idm_...
speed: 40.
Z probing dive speed.
lift_speed: 5.
Z probing lift speed.
backlash_comp: 0.5
Backlash compensation distance for removing Z backlash before measuring
the sensor response.
x_offset: 0.
X offset of idm from the nozzle.
y_offset: 21.1
Y offset of idm from the nozzle.
trigger_distance: 2.
idm trigger distance for homing.
trigger_dive_threshold: 1.5
Threshold for range vs dive mode probing. Beyond `trigger_distance +
trigger_dive_threshold` a dive will be used.
trigger_hysteresis: 0.006
Hysteresis on trigger threshold for untriggering, as a percentage of the
trigger threshold.
cal_nozzle_z: 0.1
Expected nozzle offset after completing manual Z offset calibration.
cal_floor: 0.1
Minimum z bound on sensor response measurement.
cal_ceil:5.
Maximum z bound on sensor response measurement.
cal_speed: 1.0
Speed while measuring response curve.
cal_move_speed: 10.
Speed while moving to position for response curve measurement.
default_model_name: default
Name of default idm model to load.
mesh_main_direction: x
Primary travel direction during mesh measurement.
#mesh_overscan: -1
Distance to use for direction changes at mesh line ends. Omit this setting
and a default will be calculated from line spacing and available travel.
mesh_cluster_size: 1
Radius of mesh grid point clusters.
mesh_runs: 2
Number of passes to make during mesh scan.
请注意调整配置中的x y方向偏移。确保校准过程中喷头会将线圈移动到原先喷嘴所在xy位置。 将这段配置放进printer.cfg并将serial修改为你查询到的idm的串口号,查询指令为ls /dev/serial/by-id/* can版本的话使用 ~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -q 搜索can的uuid并填入
在配置里再加入(你不加有你好果子吃) [force_move] enable_force_move: true
之后把[probe]模块删除 并将z限位(stepper_z的endstop_pin:后面)修改为probe:z_virtual_endstop 还需要设置 [safe_z_home] home_xy_position: <你的x轴中心坐标>,<你的y轴中心坐标> z_hop: 10 如果你已经配置过safe_z_home或者homing_override,可以忽视这一步 记得设置[bed_mesh]不然会报错 bed_mesh中的zero_reference_position不要配置
重启之后归零x和y(g28 x y ,不要归零z) 然后输入SET_KINEMATIC_POSITION z=80 之后就可以控制z方向移动,将喷嘴贴到平台上(也可以垫A4纸确保间隙合适) 再输入SET_KINEMATIC_POSITION z=0(注意,这和之前那条不一样) 之后执行idm_calibrate的指令 弹出的偏移控制框,请点击-0.1的偏移后确认,会自动进行校准 如果校准后重启之后,无法归零,报错no model,那么你的配置文件的自动生成配置格式错误,请修正格式。
如果你的机器是诸如VORON2.4这样的4z机器,请加入以下配置到配置文件中 [gcode_macro QUAD_GANTRY_LEVEL] rename_existing: _QUAD_GANTRY_LEVEL gcode: SAVE_GCODE_STATE NAME=STATE_QGL BED_MESH_CLEAR {% if not printer.quad_gantry_level.applied %} _QUAD_GANTRY_LEVEL horizontal_move_z=10 retry_tolerance=1 {% endif %} _QUAD_GANTRY_LEVEL horizontal_move_z=2 G28 Z RESTORE_GCODE_STATE NAME=STATE_QGL
如果你的机器是诸如VORON三叉戟这样的3z机器,请加入以下配置到配置文件中 [gcode_macro Z_TILT_ADJUST] rename_existing: _Z_TILT_ADJUST gcode: SAVE_GCODE_STATE NAME=STATE_Z_TILT BED_MESH_CLEAR {% if not printer.z_tilt.applied %} _Z_TILT_ADJUST horizontal_move_z=10 retry_tolerance=1 {% endif %} _Z_TILT_ADJUST horizontal_move_z=2 G28 Z RESTORE_GCODE_STATE NAME=STATE_Z_TILT
建议在moonraker.conf配置文件中加入 [update_manager idm] type: git_repo channel: dev path: ~/IDM origin: https://gitee.com/NBTP/IDM.git env: ~/klippy-env/bin/python requirements: requirements.txt install_script: install.sh is_system_service: False managed_services: klipper info_tags: desc=idm 便于后续自动更新IDM的脚本
含加速计(lis2dw)的版本可以在配置中添加以下内容启用加速计: 请注意,加速计的配置务必放置到IDM配置的后面。 [lis2dw] cs_pin: idm:PA3 spi_bus: spi1
[resonance_tester] accel_chip: lis2dw probe_points: 125, 125, 20 #此处设置为你进行共振测量时喷头所处坐标 配置好之后使用shaper_calibrate进行共振测量
准备工作结束后调一下z偏移再打印,z偏移保存在model_offset变量中 调整z偏移前请务必关闭网床,完成机械调平,调平后要再归零一次 '''