Laser (neje) on Duet2 breakout board
-
I am very new to this so please bear with me. I am adding a NEJE Laser to my workbee running Duet2 with an expansion breakout board and I need some help setting the configuration.I have followed a number of threads but at this stage I have got a little lost
So far I have installed the laser, the laser has an independent power supply so I am not using the Duet2 to control power in any way.My firmware is:
Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.3 (2021-06-15)
System Settings Version: 1.2
I have tested the NEJE laser and it fires up correctly using its test board. I have now connected the laser to heater pin 6 on the breakout board but am getting the following error message:
"Error DueXfan on GPIO pins may not be used to control lasers. Error exactly one of the FHJPSR must be given."
Many thanks for your assistance in advance.
regardsAs a starter here is my config.g also what do I need to put in the laser config file?
code_text ; Configuration file for Duet ; executed by the firmware on start-up ; WorkBee Firmware Version 1.1 global systemSettingsVersion={1.2} ; Configuration files M98 P"config-network.g" M98 P"config-drives.g" M98 P"config-axes.g" M98 P"config-axes-limits.g" M98 P"config-axes-calibration.g" M98 P"config-axes-endstops.g" M98 P"config-probe.g" M98 P"config-spindle.g" M98 P"config-laser.g" ; Other Settings M453 ; Put the machine into CNC Modes G90 ; Set absolute coordinates M140 H-1 ; Disable heated bed M564 S1 H1 ; Disable jog commands when not homed M911 S21.0 R23 P"G91 G1 Z3 F1000" ; Configure power loss resume ; User Configuration files M98 P"config-user-settings.g" M501 ; Load Stored Parameters M950 P0 C"exp.heater6" ; M950 P0 C"exp.heater6" ; M42 P0 S255 turns on laser power supply, M42 P0 S0 turns off M452 C"duex.pwm4" R255 F1000 ; Enable Laser mode, on exp.heater6, with max intensity being 255, and a PWM frequency of 1000
-
Can you share all your nested macro files so we can see everything that's being executed from config.g?
-
I dont have an nested macro files however it looks like I have stumbled on the fix. The Pin on the breakout board is inverted. I turned off M950 and used a standalone macro shown below. The first indication that things were working was no error message and second was Laser kept in standby mode when previously it was kicking out full power when the PWM cable was plugged in. to test
I created a 50mm square in lightburn and ran the Gcode and it worked first time!
I now need to configure a macro for the CNC / laser offset. Ideally I would also like to change the Ooznest Moot_one skin to light when using the Laser and back to dark on CNC mode but that is a nice to have!; Laser mode (switch from CNC to Laser Mode) M452 C"!exp.heater6" R255 F1000 ; laser uses heater6 pin, PWM frequency 1000Hz