Marlin 固件 MKS Gen L V1.0 板在运动命令期间意外切换接头针脚如何完全控制引脚状态?

问题描述

我正在使用 UV LED 制作 3D 生物打印机。 接线如下,其中 MKS Gen L V1.0 板切换 LED 开/关。 (当数字引脚为高电平时,LED 熄灭,当数字引脚为低电平时,LED 点亮)。电源来自我的打印机 12V 电源,并通过可切换的恒流调节器中继到 LED。接线图见下图。 [UV LED 接线]:https://i.stack.imgur.com/CBvu6.png

要切换 LED 开/关,我使用 Marlin 固件(版本 2)提供的 M42(设置引脚状态)命令。当我手动将命令发送到任何可用的引脚时,它工作得很好。为了便于论证,我们将指的是数字引脚 53,这是我弄得最多的一个。 [MKS Gen L V1.0 开发板]:https://i.stack.imgur.com/YOcD0.jpg

所以问题来了。当我将 M42 命令(“M42 P53 S0”用于 ON,“M42 P53 S255”用于 OFF)添加到带有 G1 命令和由 Prusa Slicer 生成的龙门系统运动的 G 代码文件时,我失去了对该引脚的控制,并且UV LED 意外打开,并在要求打开时关闭。它不会快速切换,实际上它只在没有被要求时打开一次,在被要求打开时关闭

我的假设是,可能与 M42 一起使用的额外引脚实际上不是免费使用的,并且由于其他电路板功能而向它们发送电压。我想知道是否可以进行任何固件修改来隔离引脚并让用户完全控制其状态?

LED 用下面代码中的第一个 G1 命令 (G1 Z-1.54 F7800.000) 点亮。它在其他一些 G1 命令(G1 X40 Y40)中间关闭...... 以下是 G 代码作为参考:

; generated by PrusaSlicer 2.2.0+win64 on 2020-10-24 at 23:50:17 UTC

; 

; external perimeters extrusion width = 0.45mm
; perimeters extrusion width = 0.45mm
; infill extrusion width = 0.45mm
; solid infill extrusion width = 0.45mm
; top infill extrusion width = 0.40mm
; first layer extrusion width = 0.42mm
M42 P53 S255 ; TURNS LED OFF
M73 P0 R1 ; tell printer that build is ready to start
M201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations,mm/sec^2
M203 X50 Y50 Z12 E120 ; sets maximum Feedrates,mm/sec
M204 P1500 R1500 T1500 ; sets acceleration (P,T) and retract acceleration (R),mm/sec^2
M205 X10.00 Y10.00 Z0.20 E2.50 ; sets the jerk limits,mm/sec
M205 S0 T0 ; sets the minimum extruding and travel Feed rate,mm/sec
M107 ; Turn fan off
G92 Z0.0 ; here's my Z height
G90 ; absolute coordinates
G21 ; units to mm
G21 ; set units to millimeters
G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion
G92 E0 ; this is extruder not extruding
; Filament gcode
G1 Z-1.54 F7800.000 ; moves speed to fast and raises nozzle before beginning printing **UV turned ON (undesired)**
G1 X10 Y10 ; moves to starting point for print outline
G1 F1800.000 ; sets Feedrate for during print
G1 X10 Y50; Starts extruding outline
G1 X50 Y50
G1 X50 Y10
G1 X10 Y10; end outline

G1 Z-5

G1 X20 Y20 ; moves to starting point for print
G1 Z-1.54
G1 X20 Y40 ;start printing
G1 X40 Y40 ; ** UV decides to turn OFF without being asked to do so**
G1 X40 Y20
G1 X20 Y20 ; end print

G1 Z-30

; LED Passover
G1 X162 Y0
G1 Z-5
G92 X10 Y10
M42 P53 S0 ; TURNS LED ON
G1 X10 Y50; Starts extruding outline
G1 X50 Y50
G1 X50 Y10
G1 X10 Y10; end outline

G1 X20 Y20 ; moves to starting point for print
G1 X20 Y40 ;start printing
G1 X40 Y40
G1 X40 Y20
G1 X20 Y20 ; end print
M42 P53 S255 ; TURNS LED OFF

M73 P1 R1 ; notifying printer that the build is starting,sets build percent (P),Time remaining (S) both to 1

; Filament-specific end gcode 
; END gcode for filament
;G01 Z-15; nozzle tip clearance
;G28 X  ; home X,Y axis
;G28 Y
M84     ; disable motors
M73 P100 R0 ; tell printer that print is done

我还在此链接 [https://marlinfw.org/docs/gcode/M042.html] 上看到 M42 命令可以定义为输出(我不必这样做),并且我不知道有没有关系...

抱歉我的冗长,任何帮助或建议将不胜感激。提前致谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)