Hello Guest it is March 28, 2024, 05:50:00 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - WhiteRoom Skis

Pages: 1 2 3 »
1
General Mach Discussion / Re: Mach3, Lightburn and GRBL work arounds
« on: October 17, 2023, 08:26:09 PM »
Here is GRBL code generated in lightburn to code that Mach 3 with Ethernet smooth stepper can use including the ability to control power. I use an Endurance 10W diode. This script inserts M11Px Sxx below every G0 move and M10Px above every G0 move.


-- Choose the file to be modified using the Finder
set chosenFile to choose file with prompt "Choose a file to modify:"
set fileReference to open for access chosenFile with write permission

-- Initialize variables
set modifiedLines to {}

-- Define the text to be inserted
set insertLineAbove to "M10P2"
set insertLineBelow to "M11P2 S10"

-- Read and process the file line by line
try
   -- Read the file line by line
   set eofReached to false
   repeat until eofReached
      try
         -- Read the current line
         set currentLine to read fileReference until "
"
         
         -- Check if the line contains "G0"
         if currentLine contains "G0" then
            -- Add M10P2 one line above the G0 command
            set end of modifiedLines to insertLineAbove
            set end of modifiedLines to currentLine
            
            -- Add M11P2 S25 one line below the G0 command
            set end of modifiedLines to insertLineBelow
         else
            -- Keep the line unchanged
            set end of modifiedLines to currentLine
         end if
      on error
         -- End of file reached
         set eofReached to true
      end try
   end repeat
   
   -- Close the file
   close access fileReference
   
   -- Combine the modified lines into a single string
   set modifiedText to (items 1 thru -2 of modifiedLines) as text
   
   -- Write the modified text back to the file
   set fileReference to open for access chosenFile with write permission
   set eof of fileReference to 0
   write modifiedText to fileReference
   close access fileReference
   
   display dialog "File successfully modified and saved." buttons {"OK"} default button "OK"
on error errMsg
   -- Handle any errors that occur
   try
      close access fileReference
   end try
   display dialog "Error: " & errMsg buttons {"OK"} default button "OK"
end try

2
General Mach Discussion / Re: Mach3, Lightburn and GRBL work arounds
« on: October 04, 2023, 09:15:34 AM »
I was able to test multiple power in the same program this morning and it works!

This requires you to have M10/M11 and PWM set up properly in Mach3. In LB use the regular GRBL profile for your machine.

At every G0 move add your M10Px command one line above G0 and your M11Px Sxx command one line below G0. Be sure all M3 and M5 commands are also changed for your M11/M10 code for your system.

The script I had ChatGPT write changes all of this for me. I will have to have it write another one that pays attention to the power level set in each layer so I don’t have to do that manually.

This may unlock some raster engraving for me but I'll have to have ChatGPT write a new script to pay attention to the power levels in each layer so that does not need to be done manually.

I still don't have the rewind/M30 issue figured out. Any help there is appreciated.

3
General Mach Discussion / Re: Mach3, Lightburn and GRBL work arounds
« on: October 03, 2023, 03:03:32 PM »
https://www.machsupport.com/forum/index.php?topic=44155.msg283495#msg283495

This thread has pics of my Mach3 profile screens that detail my M11Px Sxx/M10Px set up. This is unchanged from a few years ago.


4
General Mach Discussion / Mach3, Lightburn and GRBL work arounds
« on: October 03, 2023, 02:50:42 PM »
So I have been using Mach 3 for control of my 10w diode laser for a few years now. I have PWM set up with M11/10 commands to turn the laser on and off. I have been using Lightburn with the GRBL M3 profile to generate code. The code needs to be modified to M11/10 commands to be compatible with my mach3 set up. This is easily done with edit/ find/replace all.

To work with the regular GRBL code you must add M10Px before every G0 move and M11Px Sxx after every G0 move. In GRBL G0 moves trigger the laser on and off with boards that are "compatible" with GRBL. The GRBL M3 does this for you but I am not able to get the M3 GRBL and Mach3 to play nice in controlling the power level. This profile only fires at 100% power for me as do the GRBL LCP and GRBL STM profiles. Regular GRBL is the only profile that I can get to fire at the given Sxx. command.




I usually cut thin wood veneers with my laser and this method works great as I am usually firing the laser at 100% power. Recently I discovered that no matter what Sxx command I put into my code, mach3 would ignore this and only fire at 100% power.

With some testing and manual edits as described above, I was able to get the regular GRBL profile in LB to give me code that mach3 would accept and fire the laser at the appropriate Sxx command. There are still a couple issues with this that I was hoping someone here might have an idea about.

Once I have a modified code that runs at the correct power output, if I REWIND this in mach3, it will go back to firing the laser at 100% power. Or if I add M30 to the end of the code and re-run it it also fires only at 100% power.

To work around this the only way to get it back to firing at the correct Sxx power level is to manually CLOSE G-CODE and LOAD G-CODE within mach3.

Does anyone here have an idea about why this might be happening?



I'm hoping that my discovery here might also help someone else and might even unlock pic engraving but I have not yet been able to test a code with different S commands in the same code yet.

Somewhere on this forum is my mach3 set up for PWM/M11/M10. I will try to find it and link to it just in case there are clues there.

5
General Mach Discussion / Re: Early laser off with PWM
« on: January 01, 2023, 06:01:37 PM »
It is possible to use a relay and use M10/M11. You need to figure out your ports and pins setting. I use it this way and it works well.

6
General Mach Discussion / Laser S commands with decimal???
« on: January 31, 2021, 04:08:16 PM »
Can Mach 3 read S commands for laser with a decimal? For example Does the S command need to me a whole number like S20, S25 S50 etc or can they have a decimal like S20.55 or S50.75 etc?

The reason I ask is I have purchased an app for laser raster that outputs S commands with a decimal point. Mach 3 doesn't seem to like this but I am not sure that is the issue.

Does anyone have any info that might help. The app author would likely be able to work with me on this if it needs to be changed but I thought I would do some research first.

Thank you for you help.

7
General Mach Discussion / Re: Switching between laser and router profiles
« on: January 25, 2021, 07:43:27 AM »
Ok those things make sense. I generate router code with Fusion360 and laser code with Inkscape. I also set my router speed manually.

I guess the only thing left is to measure the offset and test.

8
General Mach Discussion / Re: Switching between laser and router profiles
« on: January 24, 2021, 05:52:13 PM »
I don't know if it's any help but I use the same profile for both router and laser but I manually switch the power to either the Spindle VFD or the Laser PSU as required on start-up. This switching could be done in software but the current method works OK for me.
My X-Y Zero for the spindle and laser are slightly different so they are individially set before use. So far I have not had the occasion to use Laser and Spindle on the same workpiece but I expect it will come one day and then I will tackle using the different offsets in software.

Tweakie.

So do you just enable/disable the Spindle (laser) in ports and pins as needed?

This seems like this might work. Are there any other setting that would significantly effect the use of the router if my laser profile is a clone of my router profile?

Do any of the other spindle(laser PWM) set up modifications change how the router would work?

9
General Mach Discussion / Re: Switching between laser and router profiles
« on: January 22, 2021, 03:33:27 PM »
Tweakie, I’m not familiar with the setting to make that change with start up of Mach 3.

I think I’m going to have to play with my profiles some. Right now if I switch profiles I have to home the unit before loading the gcode.

I guess what I need to know is if I ref all home, then load a router program, run it  note the x0y0 work coordinates and then switch profiles, ref all home and load the laser program at the previously noted x0 y0 will it run in the correct location?

Seems logical that is should. If it doesn’t what factors would cause it to be generated in the wrong location?

10
General Mach Discussion / Switching between laser and router profiles
« on: January 21, 2021, 09:29:40 PM »
I recently installed a laser on my cn router frame. To set the laser up I used a clone of my router profile and modified it.

As I am learning about how,to use my laser I am thinking that I'd like to use both the router and the laser on some projects.

What would be the easiest way to do this? Do need to have a single profile that will run both applications? I don't imagine that Mach 3 will remember my zero from one profile to another.

I guess I could write down my zero and use that if I switch profiles.....

Any infor is appreciated.

Pages: 1 2 3 »