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 命令可以定义为输出(我不必这样做),而我没有知道会不会跟那个有关系...

抱歉冗长,任何帮助或建议将不胜感激。先感谢您!

4

0 回答 0