@mintytrebor You are fast! I will try new version of plugin tomorrow.
Here is my actual status that still needs some fine tuning.
I really like the flexibility given by the plugin.
@mintytrebor You are fast! I will try new version of plugin tomorrow.
Here is my actual status that still needs some fine tuning.
I really like the flexibility given by the plugin.
Here is a piece of software as DC42 suggested. Thanks! An Arduino Nano is connected to the Panel-Due serial interface. Hidden in a box it works to move the tool head of my CNC-Mill controlled by Duet2 Ethernet.
Arduino is 5 V, Duet2 interface is 3.3V. Serial connection is done via 3,3 V to 5 V level shifter!
This line is added to my config.g : M575 P1 B57600 S0 to set communication without CRC check.
Push button for directions, continuous move(Fortl.), homing and a switch to start jog mode in general are connected to the input pins of Arduino.
Pushing a "direction button" moves the head a step with the configured distance. Pressing the "Fortl.(Continuous)" button simultaneous with a "direction button" moves the tool head continuously as long as both buttons are down.
A "Home" button does the expected job.
Values for distance, feed rate and timers can be modified to match software to your machine.
A limitation at my machine: Continuous moves are singel steps fired continuously by Arduino. First steps fired are slowed down at the end a little bit until enough commands are buffered. Movement sounds a bit strange.
I transferred this code is to Arduino via "B4R" form Anywhere Software. Download of B4R is free.
B4RNanoJog.b4r.txt
B4R needs extension ".B4R". Please remove extension ".TXT" from filname.
Enjoy.
Hermann
@FelixH said in NEJE-like Laser as CNC upgrade:
- If I understand that correctly, the laser I ordered accepts 3v3 PWM signals, so I do not know if I need to prepare a breakout board as the one described there.
I use my Duet2 Ethernet running Firmware Version 3 without breakout board to control same laser as you ordered. The Laser needs 12V Power supply continuously and Laser beam is controlled by PWM-signal.
Heater 3 pin controls Spindel- and Laser Power. Heater 6 pin is output of Laser PWM signal.
This is my code to switch to laser mode:
; Configuration file for Duet Ethernet (firmware version 3.1.1)
; executed at Startup of Laser mode
;
;
G54 ; 1. Koordinatensystem anwählen
M208 X550 Y1200 Z230 S0 ; Set axis maximum
;
M453 C"nil" ; CNC-Modus Pin für Spindel abwählen
M950 P0 C"exp.heater3" ; M42 P0 S255 schaltet Laser Spannungsversorgung ein, M42 P0 S0 schaltet aus
M42 P0 S0 ; Laser Power Ausschalten
M452 C"exp.heater6" R500 S1 Q20000 ; laser uses heater3 pin, PWM frequency 100Hz;
;
; Tools
M140 H-1 ; Heizbett aus
M563 P0 D-1 H-1 ; Tool0 abwählen
M563 P1 D-1 H-1 ; Tool1 abwählen
M563 P0 S"Laser" ; Define tool 0
G10 P0 X-7 Y-45 Z-68.5 ; Set tool 0 axis offsets vs. Headposition -68.5 Z-Achse Nullpunkt (Laser Fokus)
T0
M42 P0 S0 ;Laserpower aus nach Werkzeuganwahl.
This code switches to CNC-Mode
; Configuration file for Duet Ethernet (firmware version 3.1.1)
; executed at start-up of CNC mode
;
;
G54 ; 1. Koordinatensystem anwählen
M950 P0 C"nil" ; falls Laser-Modus Aktiv war, Pin freigeben
M453 C"exp.heater3" R500 ; spindle forward on heater 3 pin, R=Max Spindeldredzahl
; Tools
;M140 S-274 ; Heizbett aus
M140 H-1 ; Heizbett aus
M563 P0 D-1 H-1 ; Tool 0 abwählen
M563 P1 D-1 H-1 ; Tool 1 abwählen
M563 P0 S"Spindel" ; Define tool 0
G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets vs. Headposition
M208 X550 Y1200 Z230 S0 ; Set axis maxima
Switching between modes I have to redefine Heater 3 pin.
G-code at beginning of work file is:
G90
T0
M42 P0 S255 ; switches Laser Power on
G04 2000 ; wait until Laser power is stabilised
M05
G55
trailing code is:
M05
G04 3000
T-1
M42 P0 S0
G54
G0 X5 Y5 Z220
@felixh This is my code for testing laser with 1% power. No need to switch to LASER mode. Just directly control pins. Maybe this code helps for testing.
M950 P3 C"nil" ; free P3
M950 P3 C"exp.heater3" Q200 ; Laser control to P3
M42 P3 S0 ; laser control off
M106 P2 S255
G04 P1000 ; Breake stabilizing laser power supply
M42 P3 S0.01 ; Laser on with 1% power
G04 P3000 ; wait 3 seconds, then
M42 P3 S0 ; turn off laser control and power supply
M106 P2 S0
Here are my commands -with my pin configuration- to switch to laser mode:
M950 R0 C"nil" ; free R0, coming fron CMC-Mode, not working properly in the moment
M950 P0 C"exp.heater3" ; M42 P0 S255 Laser Power Supply on, M42 P0 S0 Laser Power off
M42 P0 S0 ; Laser Power Ausschalten
M452 C"exp.heater6" R255 S0 F20000 ; laser uses heater6 pin for control, 255 is max power in M3 SXXX command, not sticky, PWM frequency 20kHz;
Laser power is switched on in Gcode job file.