@dc42
Thank you so much!
For the first time I feel I have understanding of the revised gcode and post processor and therefore full control of my laser - really only now for the first time.
Tomorrow will be busy. Thanks again
Posts made by woodworksimon
-
RE: M950 and Pin Names
-
RE: M950 and Pin Names
@dc42
I have to be able to adjust the focus of the laser onto the surface - may be different heights depending on job - (turn it to low power and adjust Z height), before starting to etch a design on low power or cut through.With the cutting, as it is only a 10 watt diode, it relies on a critical focus to cut, I have heard that I should move the z down slightly during a multiple pass cut to achieve the most accurate cut. Will I have to do this manually?
I'll try out the new pp now and report back, if I may. -
RE: M950 and Pin Names
@dc42
done some digging - ascii codes to replace the quote marks.
Putting it all together, have I understood it correctly please:...- ######## RepRap 3 NEW COMMANDS #########
+--------------------------------------------------- - Command output after the header to switch LASER on
+---------------------------------------------------
+====================================================== - CLEAR FAN PIN OUTPUT BUFFER
- release DUET pins 'fan 2' from FAN output
"M950 f2 c[34]nil[34]" - DOUBLE CHECK: RELEASE MAPPED GPIO OUTPUT P4
"M950 P4 C[34]NIL[34]" - PREPARE GPIO output 'p4' ONTO FAN2 PINS AT 50HZ
"M950 P4 C[34]Fan2[34] Q50" - ====================================================================
- switch to LASER MODE on fan 2 logical pin 4, 20/255ths power @50Hz
"M452 C[34]fan2[34] r20 Q50" - ====================================================================
"G0 [XH] [YH]" - Rapid Home x&y axis
-
"G0 [ZH]"
- Rapid Home z axis
-
commented out to prevent z movement #### WORKING
+---------------------------------------------------
- Commands output for rapid moves
+---------------------------------------------------
begin RAPID_MOVE
"G0 [X] [Y] [Z]"
+--------------------------------------------------- - Commands output for the first feed rate move
+---------------------------------------------------
begin FIRST_FEED_MOVE - ####### RepRap 3 NEW COMMAND #########
"M42 P4 S0.5" -
Switch i/o pin P4 to 50%
- ########## END RepRap 3 NEW COMMAND #######
- ######## RepRap 3 NEW COMMANDS #########
-
RE: M950 and Pin Names
Syntax query for the new M452 - was originally embedding it in Vectric post processor to automatically switch to laser mode. Ie "M452 P2 R50 F500" (Quotes are expected).
New M452 ie: "M452 C"fan2" R50 F500" errors because of the two sets of quotes I assume. Any thoughts as to a work around? -
RE: M950 and Pin Names
@dc42
'gpio port has no pin' - so why has the m950 p4 line not mapped onto fan2? -
RE: M950 and Pin Names
@dc42
Been trying for the last hour or so, briefly got it responding, but would give me output in laser mode using M42 without the m452 command?Stubbornly refuses to release in either laser mode or cnc mode.
So put this macro together to try... if I am missing something, I apologise, but the comments are how I understand the logic... still not releasing!; RRF3 fan ON test
;################### HALF POWER AT 50HZ ##################; SET CNC MODE
M453;======================================================
; CLEAR FAN PIN OUTPUT BUFFER
;======================================================; release DUET pins 'fan 2' from FAN output
m950 f2 c"nil"; DOUBLE CHECK: RELEASE MAPPED GPIO OUTPUT P4
M950 P4 C"NIL"; PREPARE GPIOO output 'p4' ONTO FAN2 PINS AT 50HZ
m950 p4 c"fan2" Q50; SWITCH output ON p4 at HALF power 125/255
m42 p4 s125 -
RE: M950 and Pin Names
@dc42 Ok - Can use a macro to laser engrave after setting up first in cnc mode.
Will still need to send output to Fan 2 - how can I release the pins for output if NOT in M452 mode (nil doesn't work) -
RE: M950 and Pin Names
@woodworksimon
Re the output from Fan2, (when we get it working) is it available to manually control as intended from a macro when stationery? BTW, am getting a steady 0.2v across the heater pins - correct? -
RE: M950 and Pin Names
As I am double handling the CNC, I call the laser with a macro and return it (for safety) to cnc from the macro when when finished. The above settings were made in cnc mode (M453) and the m452 was only called after the M950 line.
If I run P4 C"nil" does that not release the pin anyway? -
RE: M950 and Pin Names
@dc42
1: Fan 2 (left hand pwm fan output on board) working before upgrade.
2: M950 P4 C"fan2" gives: Pin Fan2 is not free, so sent P4 C"Nil" , but still not free.
3: M452 is set to c"fan2" Q2000, and I have also prefixed the lines in my macro with M950 P4 C"nil" and M950 P4 c"fan2" to double check. -
RE: M950 and Pin Names
@jay_s_uk
By my understanding, the rrf3 strips away the intended pin out use and replaces with up to 10 device outputs.
Logically, if I can repurpose heater pins to a pwm output, I should be able to do the same to any of the other configurable ports, irrespective of their original purpose. The proposed use seems to be specified with H(eater), F(an), P(General Purpose port), or S(ervo).
Hence my choice of P.
I'll try 'F' anyway, thanks for the suggestion. -
RE: M950 and Pin Names
@woodworksimon STILL STRUGGLING!
Custom Config reads:; #####OLD#### RepRap 2.04 ############
; CONVERT HEATERS OUTPUT INTO SWITCHED OUTPUTS
M307 H1 A-1 C-1 D-1
M307 H2 A-1 C-1 D-1
; FANS ON
; M42 P1 S1; ##### NEW #### RepRap3.0 beta12 ############
; ASSIGN OUTPUT PIN
M950 P0 C"E0HEAT"
M950 P1 C"E1HEAT"M950 P2 C"FAN0" M950 P3 C"FAN1" M950 P4 C"FAN2"
; FANS ON - works
M42 P0 S1
; LED Spindle light ON - works
M42 P1 S1; RRF3 fan output FULL POWER AT 2000HZ
M42 p4 s1No voltage out - (tried p2 and p3 as well). Intend running laser off p4, I assume when I change to laser mode I am unable to get output unless G1 is called? So to set up focus position, I would have to return to CNC mode - First things first, why no output on these pins?
-
RE: M950 and Pin Names
@dc42 Brilliant! Totally missed that. Now to get started. thanks
-
RE: M950 and Pin Names
@Danal Thanks for your quick response - had a quick look but am still unsure where you got the names of your pins from? Your heater names for example: 1out0 and 1out1 where are they specified - it's not knowing what the firmware recognises that does my head in!
-
M950 and Pin Names
Just upgraded to RRf 3.12 and trying to get my head around M950 and Pin names on Duet 2 wifi.
Looked everywhere but cannot seem to find a list of pin names for heaters E0 and E1, fans 0,1 and 2. Getting 'Unknown pin name error' when running: M950 P0 C"Heater0" (Supplying power to Duet board cooling fans) for example. Followed by M42 P0 S1 to switch on 100%. Nothing!
Must be doing something wrong, but going round and round!
Got to understand as I have a laser diode on fan0 and unable to control successfully, so upgraded to vs3. Christmas is fast approaching...…….
Using M452 and previous version 2.04 Cutting great, but engraving rubbish - skipping and burning heavily
Help please -
RE: Settings for laser diode
@woodworksimon
sorry, lost the question - try again...
If I have understood it correctly, then from the code above, the G1 command controls the laser power output and the M106 controls the frequency of that output. So for my example, in the header I use M452 P2 without the r255, still use the M106 p2 S0 to direct the output to 5v fan output, but I don't then need the M106 P2 S0.1 in the first feed move, but replace it with G1 X Y F S25 for a laser power of 25/255ths. Thereafter would the s25 be inherited in the begin feed moves. Is that power modulated to suit the xy speed to avoid overburning, and is it down to the software used to modulate output ie if you are burning a halftone image?
So many questions - apologies! -
RE: Settings for laser diode
@dc42
So in example above, if I understand correctly, you use the G1 command for the laser power output, but still the M106 for the PWM pulse frequency - so I would transfer to laser mode in the header with: M452 p2 (without the r255), still enable the laser on fan pin with M106 p2 S0, but remove the FIRST_FEED_MOVE M106 P2 S0.1 line and replace with G1 [X] [Y] [F] S25 (for a laser power of 25/255ths). Thereafter would G1 [X] [Y] [F] [S] inherit the laser power? -
RE: Settings for laser diode
@droftarts
Hi Ian, thanks for reply.
Workbee is running Duet2 wifi RepRap version 2.03 firmware.
At this stage I'm really trying to establish whether my post processor editing is correct.
If it is, then could the burning be down to an intermittent delay between actuating the Laser Diode and moving the head...?
Currently still trying to get my head around the differences between M106 and M452 - IE once the board is switched into laser mode with M452, do I control output with M452 commands, or M106 fan output? What does the M452 actually do to the controller? I suspect it tightens up the timing as there is no inertia from the spindle to take account of? Anyone put me straight on this please -
RE: Settings for laser diode
@Phaedrux
Sorry- my mistake - ancient "newbie" brain fade!
Board: Duet2 WiFi
Laser: Endurance 10w pro
Workbee 1000x750 Updated firmware V1.07
Software: Vectric V-carve pro
Set up using modified Post processor (suspect my error somewhere here! I added comments to each line to try to get my head around the commands, but may have muddled them????)
Thanks for your assistance.+================================================
+- Grbl - Vectric LASER output configuration file
+================================================
+- History
- Who When What
- ======== ========== ===========================
- JTechP 03/28/2016 Added laser commands to
-
every line. Changed laser
-
OFF command to both M03 S0 and
-
M05.
- PaulW 01/20/2016 turn Spindle off during rapids
- EdwardP 11/02/2015 Written from Grbl_mm.pp but
-
set G20
- EdwardP 11/02/2015 Commented out arcs as these
-
slow GRBL performance appear
-
interpolated anyway
- JayJ 3/10/2017 Changed for 3D printer fan
-
control of laser
- Simon N 15/11/2019 altered laser settings
-
hopefully to suit duet reprap
+================================================
- "laser on fan output M106-M107 duet3d (MM) (.gcode)"
POST_NAME = "*** LASER post low power ****"
FILE_EXTENSION = "gcode"
UNITS = "MM"
+------------------------------------------------
- Line terminating characters
+------------------------------------------------
LINE_ENDING = "[13][10]"
+------------------------------------------------
- Block numbering
+------------------------------------------------
LINE_NUMBER_START = 0
LINE_NUMBER_INCREMENT = 10
LINE_NUMBER_MAXIMUM = 999999+================================================
+- Formating for variables
+================================================
VAR LINE_NUMBER = [N|A|N|1.0]
VAR SPINDLE_SPEED = [S|A|S|1.0]
VAR FEED_RATE = [F|C|F|1.1]
VAR X_POSITION = [X|C|X|1.4]
VAR Y_POSITION = [Y|C|Y|1.4]
+VAR Z_POSITION = [Z|C|Z|1.4]
VAR ARC_CENTRE_I_INC_POSITION = [I|A|I|1.4]
VAR ARC_CENTRE_J_INC_POSITION = [J|A|J|1.4]
VAR X_HOME_POSITION = [XH|A|X|1.4]
VAR Y_HOME_POSITION = [YH|A|Y|1.4]
+VAR Z_HOME_POSITION = [ZH|A|Z|1.4]+================================================
+- Block definitions for toolpath output
+================================================
+---------------------------------------------------
- Commands output at the start of the file
+---------------------------------------------------
begin HEADER
"M452 p2 r255"
- switch to laser mode on fan heater logical pin 2 at max output of 255=10 watts
"G17"
- set arc plane to xy
"G90"
- set absolute co-ordinates relative to origin
"G21"
- set to metric (mm)
"G0 F500"
- Rapid move speed to 400
"G0[ZH]"
- Rapid Home z axis
"G0 [XH] [YH]"
- Rapid Home x&y axis
+---------------------------------------------------
- Command output after the header to switch LASER on
+---------------------------------------------------
"M106 p2 S0"
- enable fan heater laser output 0%
+---------------------------------------------------
- Commands output for rapid moves
+---------------------------------------------------
begin RAPID_MOVE
"G0 [X] [Y] [Z]"
+---------------------------------------------------
- Commands output for the first feed rate move
+---------------------------------------------------
begin FIRST_FEED_MOVE
"M106 P2 S0.1"-
"M106 P2 [S] [F]"
- laser controlled by fan pin at set output and set frequency
"G1 [X] [Y] [F]"
- controlled move to X & Y at set feed rate
+---------------------------------------------------
- Commands output for feed rate moves
+---------------------------------------------------
begin FEED_MOVE
"G1 [X] [Y] [F]"
- controlled move to X & Y at set feed rate
+---------------------------------------------------
- Commands output for the first clockwise arc move
+---------------------------------------------------
begin FIRST_CW_ARC_MOVE
"G2 [X] [Y] [I] [J] [F]"
+---------------------------------------------------
- Commands output for clockwise arc move
+---------------------------------------------------
begin CW_ARC_MOVE
"G2 [X] [Y] [I] [J]"
+---------------------------------------------------
- Commands output for the first counterclockwise arc move
+---------------------------------------------------
begin FIRST_CCW_ARC_MOVE
"G3 [X] [Y] [I] [J] [F]"
+---------------------------------------------------
- Commands output for counterclockwise arc move
+---------------------------------------------------
begin CCW_ARC_MOVE
"G3 [X] [Y] [I] [J]"
-
- Commands output for Retract Moves
-
begin RETRACT_MOVE
"M106 P2 S0"
- reduce output on fan pin to 0 (LASER OFF)
+---------------------------------------------------
- Commands output at the end of the file
+---------------------------------------------------
begin FOOTER
"M106 p2 S0"
"M107 p2"- Laser off
"G0 [ZH]"
- Rapid home Z
"G0 [XH] [YH]"
- Rapid home X&Y
"M453"
- Switch back to CNC
-
Settings for laser diode
Hi - hope you can assist with setting up my 10w laser diode from endurance. Thought I had figured the post processor to run the pwm from the heater 5 volt, but attached photo shows uneven burning - must have got something wrong, but not sure where to look first. Help please!)