topic_unsolved RRF2 to RRF3 and Laser
So for the most part I have successfully converted to RRF3. I just completed a print. Now I am trying to get the laser to work as I had with RRF2. I cannot get the Duet to control the laser. What I used to do was have a directory under sys named laser. When I wanted to use the laser I would switch to this directory and run the config.g file in that directory. This is the entry in that file to run the laser using Fan2
; Laser Fan
M106 P2 I-1 ; Disable Fan2 for laser PWM control
M452 P2 R255 F4000 ; switch to laser mode using the FAN-2 output pins to control the laser
In RRF3 I am trying to do it a little differently. First I designated a tool "Laser" in the config.g with this entry:
M563 P2 S"Laser" ;Define tool 2 as laser
Then I have a macro to go into Laser mode with this:
; Switch to Laser control
M452 F2 Q4000 ; laser uses Fan2 pin, PWM frequency 4000Hz
It switches to Laser mode ok but does not control it. I cannot turn it on (M3 Sxx ) or turn it off (M5 or M3 S0). It stays on constantly. I also tried inverting Fan2 but it did not make any difference.
I know I am missing something but I don't know what.
Just to clarify, are you using M505 to switch configs?
Part of the problem is probably
M106 P2 I-1 ; Disable Fan2 for laser PWM controlas the inversion of pins is now controlled by M950 in RRF3.
I was probably confusing.
I was using M505 in V2 using a sub directory. However I am now trying to accomplish this without using a sub-directory by creating a tool called laser and then using a macro to switch to laser mode. In all this I want to use Fan2 to use the PWM control form 0 to 255.
Alright, so where is the M950 command to define the pin you want to use?
Its in the config.g file:
; Configuration file for Duet WiFi (firmware version 3)
; executed by the firmware on start-up
; generated by RepRapFirmware Configuration Tool v3.1.3 on Mon Jun 15 2020 11:14:50 GMT-0600 (Mountain Daylight Time)
; General preferences
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"My Printer" ; set printer name
M669 K1 ; select CoreXY mode
M552 S1 ; enable network
M586 P0 S1 ; enable HTTP
M586 P1 S0 ; disable FTP
M586 P2 S0 ; disable Telnet
M569 P0 S0 ; physical drive 0 goes backwords
M569 P1 S0 ; physical drive 1 goes backwards
M569 P2 S0 ; physical drive 2 goes backwards
M569 P3 S1 ; physical drive 3 goes forwards
M569 P4 S0 ; physical drive 4 goes backward
M584 X0 Y1 Z2:4 E3 ;two Z Motors connected to driver outputs A and E1
M671 X-20:310 Y0:0 S2 ;Leadscrew at left (connected to Z) and right connected to E1) of X axis
M350 X16 Y16 Z16 E16 U16 I1 ; configure microstepping with interpolation
M92 X101.84 Y104.96 Z402.42 U402.42 E2892.00 ; set steps per mm
M566 X500.00 Y500.00 Z100.00 U100.00 E60.00 ; set maximum instantaneous speed changes (mm/min)
M203 X10000.00 Y10000.00 Z6000.00 U6000.00 E8000.00 ; set maximum speeds (mm/min)
M201 X800.00 Y800.00 Z30.00 U30.00 E120.00 ; set accelerations (mm/s^2)
M906 X1200.00 Y1200.00 Z800.00 U800.00 E500.00 I30 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout
; Axis Limits
M208 X-25 Y-15 Z0 S1 ; set axis minima
M208 X330 Y340 Z300 S0 ; set axis maxima
M574 X1 S1 P"xstop" ; configure active-high endstop for low end on X via pin xstop
M574 Y1 S1 P"ystop" ; configure active-high endstop for low end on Y via pin ystop
M574 Z1 S2 ; configure Z-probe endstop for low end on Z
M950 S0 C"exp.heater3" ; create servo pin 0 for BLTouch
M558 P9 C"^zprobe.in" H3 F120 T4800 ; set Z probe type to bltouch and the dive height + speeds
G31 P25 X30 Y-10 Z.48 ; set Z probe trigger value, offset and trigger height
M557 X15:285 Y15:275 P5:5 ; define mesh grid ; define mesh grid
M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 R4700 ; configure sensor 0 as thermistor on pin bedtemp
M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0
M307 H0 B1 S1.00 ; enable bang-bang mode for the bed heater and set PWM limit
M140 H0 ; map heated bed to heater 0
M143 H0 S120 ; set temperature limit for heater 0 to 120C
M308 S1 P"e0temp" Y"thermistor" T100000 B4725 C7.06e-8 ; configure sensor 1 as thermistor on pin e0temp
M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1
M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency
M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency
M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on
M950 F2 C"!fan2" Q1000 ; create fan 2 on pin fan1 and set its frequency
M106 P2 S255 H-1 ; set fan 2 value. Thermostatic control is turned off
M563 P0 S"E3D_V6" D0 H1 F0 ; define tool 0
G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets
G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C
M563 P2 S"Laser" ;Define tool 1 as laser
; Custom settings are not defined
Unfortunately I'm not familiar enough with laser to say what should or shouldn't work in RRF3 or not.
I'll move this to the general discussion area for some more visibility.
Thanks. I was going to try that today