Author Topic: Software  (Read 12217 times)

Stonemull

  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Software
« on: July 20, 2018, 09:48:36 AM »
Plasma cutter is about ready for its first tests, since I wanted this to be a stand alone device working in the shed from an SD card then the easiest way to get the functionality was to use a ramps 1.4 board and a graphic smart controller, all up is was like $22 I think, a no brainer.

https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller

The issue is that I can't be stuffed trying to port grbl-mega to use the display,encoder and SD card so I might as well use ready to go firmware, which leaves me without about 2 options (I know of), Marlin and Repetier firmware.
After playing with Marlin I found it needs 3 home switches or gets all upset and cantankerous (ie .. cannot compile), I originally had none but have since fitted an X and Y home switch, Repetier firmware is happy to have no home switches plus it has a laser and CNC mode, so decided to give it a try first.

So T2laser has no "repetier mode" :) the basic Gcode movements are not recognised, it seems that having a single G1 and lines of X,Y moves works fine with grbl but not repetier. If i do a search and replace in the gcode for " X" and replace it with "G1 X" and carve out most of the init commands (not gone through them all yet to examine) then I get basic movement but laser (plasma) stays on. repetier assumes laser will be off for G0 movements and on for G1,G2 and G3 moves.

I looked at bencut but the first thing it says is you need GRBL.

So question is, anyone found a repetier friendly interface


Note: I wrote the post above yesterday but did more research, my notes for changing t2laser gcode for something that runs on the SD card are..

Quote
issues are that a single G1 does not work, it needs one per line.
an M03 S255 in a line is ignored, needs to be on its own line.
an M03 S0 I am not sure is dealt with the same as a M05 (I have 500mS warmup delay added)



search and replace M03 S255 and replace with nothing

search and replace M03 S0 and replace with M05

with every line with M05 in it, add a line above with M5

with every line with M05 in it, add a line below with M3 S255

search and replace M05 and replace with nothing

search and replace X and replace with G01 X

if required replace Fxxxx with Fyyyy
A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

ThothLoki

  • Hero Member
  • *****
  • Posts: 2200
  • Tinkerer
    • View Profile
Re: Software
« Reply #1 on: July 20, 2018, 10:21:57 AM »
If you can generate the gcode, why not just use Octoprint to send it to the machine? It will handle Repetier or Marlin
Laser: 2x EleksMaker A3s
3D Printer: Monoprice Maker Select v2 / Sovol SV01
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7298
    • View Profile
    • T2Laser
Re: Software
« Reply #2 on: July 20, 2018, 12:01:17 PM »
The Marlin SD post processor does that.

ThothLoki

  • Hero Member
  • *****
  • Posts: 2200
  • Tinkerer
    • View Profile
Re: Software
« Reply #3 on: July 20, 2018, 01:06:29 PM »
You just need a gcode generator then?
Laser: 2x EleksMaker A3s
3D Printer: Monoprice Maker Select v2 / Sovol SV01
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7298
    • View Profile
    • T2Laser
Re: Software
« Reply #4 on: July 20, 2018, 02:17:24 PM »
I may be wrong but I thought one of the existing post processors did exactly what you suggest, if not, it wouldn't be too difficult to create a new one.


ThothLoki

  • Hero Member
  • *****
  • Posts: 2200
  • Tinkerer
    • View Profile
Re: Software
« Reply #5 on: July 20, 2018, 06:18:22 PM »
If you are looking for a way to generate the gcode. Look at Fusion 360. That and an extension can take care of you. A lot of people with the MPCNC use that
Example: https://github.com/martindb/mpcnc_posts_processor

Zax. Might be time to make T3 and end the world. Same thing as T2 but instead of GRBL, use Marlin or Repetier
Laser: 2x EleksMaker A3s
3D Printer: Monoprice Maker Select v2 / Sovol SV01
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

Stonemull

  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Re: Software
« Reply #6 on: July 20, 2018, 07:12:02 PM »
It does need a little bit of CAM work to generate a tool path as it does have width, not sure what it is yet, so need to follow inside of interior cuts and outside of exterior. obviously.
I will have a better look at freecad, I looked at using it before but didn't particularly like the method.
I think I may have to go to Marlin yet, I added 2 home switches and could easily short out a Z one.
This not pausing at the start of every cut is a deal breaker, plasma (laser) only comes on during a G1,2,3 move and it appears adding a pause is a total pain, I will have a look at CNC mode first, maybe spindle mode is more useful.
A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

ThothLoki

  • Hero Member
  • *****
  • Posts: 2200
  • Tinkerer
    • View Profile
Re: Software
« Reply #7 on: July 20, 2018, 09:38:14 PM »
If you can enable spindle mode, you should be able to use GRBL
Laser: 2x EleksMaker A3s
3D Printer: Monoprice Maker Select v2 / Sovol SV01
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

Stonemull

  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Re: Software
« Reply #8 on: July 21, 2018, 07:56:17 AM »
huh ?
controller is a mega2560 with graphical lcd, totary encoder and SD card, if you know a version of grbl that runs on it please tell me :)

any version of grb that can run standalone from an SD card is suitable, I will buy the applicable controller, they don't exist though.

hence repetier or marlin, neither of which function well with grbl gcode.

A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7298
    • View Profile
    • T2Laser
Re: Software
« Reply #9 on: July 21, 2018, 08:50:54 AM »
@Stonemull Send me an example of the G-code that works (if you can point out the required changes from one of my other post processors that would be even better) and I will create a post processor for your firmware, would that be Repetier correct?

ThothLoki

  • Hero Member
  • *****
  • Posts: 2200
  • Tinkerer
    • View Profile
Re: Software
« Reply #10 on: July 21, 2018, 03:43:31 PM »
Laser: 2x EleksMaker A3s
3D Printer: Monoprice Maker Select v2 / Sovol SV01
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

Stonemull

  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Re: Software
« Reply #11 on: July 21, 2018, 09:45:45 PM »
@Stonemull Send me an example of the G-code that works (if you can point out the required changes from one of my other post processors that would be even better) and I will create a post processor for your firmware, would that be Repetier correct?

Oop, when you mentioned "existing post processors" in the last post I thought you meant some program online like on github or something and went searching for "gcode post processors" lol, I had not been going into the machine control area so totally forgot that existed. Are those post processors active from gcode export from the main screen or on gcode exported from the machine control screen ? I couldn't tell.

The main thing that changes with repetier is it needs a G1 or G0 for every movement line and M03 S255 or M03 S0 or M05 needs to be on its own line, once that is performed though the laser/spindle/plasma will activate on every G1 command and turns off for every G0 move.
So the ideal way to do it I think is to do a single M03 S255 at the top of the code and then perform a G0 for a laser off move and a G1 for a laser on move.
The alternative (which I use below) is to only use G1 and turn off laser before G1's .. M5 is the correct method to turn it off instead of M03 S0 as far as i can see, I thought it allowed the warm up time to be used but it doesn't.


My notes to edit a file suitable (not saying perfect, but it works)

search and replace M03 S255 and replace with nothing
with every line with M03 S0 in it, add a line above with M5
with every line with M03 S0 in it, add a line below with M3 S255
search and replace M03 S0 and replace with nothing
search and replace X and replace with G01 X


a sample file I made for a steel case to house the ramps electronics (not cut it yet but it seems to turn plasma output on and off as required and do the right moves) is attached and also the dxf file I created in designspark mechanical to produce it.

@loki .. I looked at that one a year or so ago, its ported from grbl 1.0 so a bit dated with no laser mode, then no SD card and no display support.

A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

Stonemull

  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Re: Software
« Reply #12 on: July 21, 2018, 09:48:56 PM »
not sure whats going on ..

I had "The attachments upload directory is not writable. Your attachment or avatar cannot be saved." on the last post and had to remove attachments, then if I try to edit the post to mention that it tells me I have already submitted the post and will not accept an edit.
A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

Stonemull

  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Re: Software
« Reply #13 on: July 21, 2018, 09:51:01 PM »
if I cant attach it .. here it is in text..

Code: [Select]
( Generated by T2Laser )
(  DG01 XF2Gcode for Grbl  )
( Start Point: LL      )
( Frame Mode : Abs.    )
( G01 X MaG01 Ximum  : 217.6   )
( Y MaG01 Ximum  : 179.3   )
( Laser Power: 255     )
( Vector Rate: 700     )
( Rapid Feed : 2000    )
( Tools Used : 2       )
( Vector Name: ramps_case.dG01 Xf )
G21
G90
F700
M05
G01 G01 X58 Y121.3 F2000
M6 T4
M5

M3 S255
M5
G01 X72 Y68  F2000
M03 S255
G01 X72 Y70.5 F700
M5
G01 X73.5 Y70.5  F2000
M03 S255
G01 X73.39 Y71.09 F700
G01 X73.06 Y71.56 F700
G01 X72.59 Y71.89 F700
G01 X72 Y72 F700
G01 X71.41 Y71.89 F700
G01 X70.94 Y71.56 F700
G01 X70.61 Y71.09 F700
G01 X70.5 Y70.5 F700
G01 X70.61 Y69.91 F700
G01 X70.94 Y69.44 F700
G01 X71.41 Y69.11 F700
G01 X72 Y69 F700
G01 X72.59 Y69.11 F700
G01 X73.06 Y69.44 F700
G01 X73.39 Y69.91 F700
G01 X73.5 Y70.5 F700
G01 X73.5 Y70.5 F700
M5
G01 X72 Y70.5  F2000
M03 S255
G01 X73.3 Y70.5 F700
M5
G01 X74.8 Y118.8  F2000
M03 S255
G01 X74.69 Y119.39 F700
G01 X74.36 Y119.86 F700
G01 X73.89 Y120.19 F700
G01 X73.3 Y120.3 F700
G01 X72.71 Y120.19 F700
G01 X72.24 Y119.86 F700
G01 X71.91 Y119.39 F700
G01 X71.8 Y118.8 F700
G01 X71.91 Y118.21 F700
G01 X72.24 Y117.74 F700
G01 X72.71 Y117.41 F700
G01 X73.3 Y117.3 F700
G01 X73.89 Y117.41 F700
G01 X74.36 Y117.74 F700
G01 X74.69 Y118.21 F700
G01 X74.8 Y118.8 F700
G01 X74.8 Y118.8 F700
M5
G01 X149.7 Y118.8  F2000
M03 S255
G01 X149.59 Y119.39 F700
G01 X149.26 Y119.86 F700
G01 X148.79 Y120.19 F700
G01 X148.2 Y120.3 F700
G01 X147.61 Y120.19 F700
G01 X147.14 Y119.86 F700
G01 X146.81 Y119.39 F700
G01 X146.7 Y118.8 F700
G01 X146.81 Y118.21 F700
G01 X147.14 Y117.74 F700
G01 X147.61 Y117.41 F700
G01 X148.2 Y117.3 F700
G01 X148.79 Y117.41 F700
G01 X149.26 Y117.74 F700
G01 X149.59 Y118.21 F700
G01 X149.7 Y118.8 F700
G01 X149.7 Y118.8 F700
M5
G01 X156.02 Y70.5  F2000
M03 S255
G01 X155.91 Y71.09 F700
G01 X155.59 Y71.56 F700
G01 X155.11 Y71.89 F700
G01 X154.52 Y72 F700
G01 X153.94 Y71.89 F700
G01 X153.46 Y71.56 F700
G01 X153.14 Y71.09 F700
G01 X153.02 Y70.5 F700
G01 X153.14 Y69.91 F700
G01 X153.46 Y69.44 F700
G01 X153.94 Y69.11 F700
G01 X154.52 Y69 F700
G01 X155.11 Y69.11 F700
G01 X155.59 Y69.44 F700
G01 X155.91 Y69.91 F700
G01 X156.02 Y70.5 F700
G01 X156.02 Y70.5 F700
M5
G01 X52 Y70.17  F2000
M03 S255
G01 X41 Y70.17 F700
M5
G01 X52 Y70.17  F2000
M03 S255
G01 X52 Y81.06 F700
G01 X41 Y81.06 F700
M5
G01 X52 Y99.38  F2000
M03 S255
G01 X52 Y112.81 F700
G01 X47.2 Y112.81 F700
G01 X40 Y112.81 F700
M5
G01 X52 Y99.38  F2000
M03 S255
G01 X40 Y99.38 F700
M5
G01 X52 Y99.38  F2000
M03 S255
G01 X47.2 Y99.38 F700
M5
G01 X39 Y112.81  F2000
M03 S255
G01 X39 Y99.38 F700
M5
G01 X40 Y81.06  F2000
M03 S255
G01 X40 Y70.17 F700
M5
G01 X39 Y112.81  F2000
M03 S255
G01 X40 Y112.81 F700
M5
G01 X40 Y99.38  F2000
M03 S255
G01 X39 Y99.38 F700
M5
G01 X41 Y81.06  F2000
M03 S255
G01 X40 Y81.06 F700
M5
G01 X41 Y70.17  F2000
M03 S255
G01 X40 Y70.17 F700
M5
G01 X68 Y123.3  F2000
M03 S255
G01 X78 Y123.3 F700
M5
G01 X88 Y123.3  F2000
M03 S255
G01 X98 Y123.3 F700
M5
G01 X108 Y123.3  F2000
M03 S255
G01 X118 Y123.3 F700
M5
G01 X128 Y123.3  F2000
M03 S255
G01 X138 Y123.3 F700
M5
G01 X148 Y123.3  F2000
M03 S255
G01 X155 Y123.3 F700
M5
G01 X161.6 Y117.3  F2000
M03 S255
G01 X161.6 Y109.3 F700
M5
G01 X161.6 Y101.3  F2000
M03 S255
G01 X161.6 Y91.3 F700
M5
G01 X161.6 Y81.3  F2000
M03 S255
G01 X161.6 Y71.3 F700
M5
G01 X161.6 Y61.3  F2000
M03 S255
G01 X161.6 Y66.3 F700
M5
G01 X62 Y56  F2000
M03 S255
G01 X68 Y56 F700
M5
G01 X78 Y56  F2000
M03 S255
G01 X88 Y56 F700
M5
G01 X98 Y56  F2000
M03 S255
G01 X108 Y56 F700
M5
G01 X118 Y56  F2000
M03 S255
G01 X128 Y56 F700
M5
G01 X138 Y56  F2000
M03 S255
G01 X148 Y56 F700
M5
G01 X158 Y56  F2000
M03 S255
G01 X153 Y56 F700
M5
G01 X56 Y58  F2000
M03 S255
G01 X56 Y66.3 F700
M5
G01 X56 Y71.3  F2000
M03 S255
G01 X56 Y81.3 F700
M5
G01 X56 Y91.3  F2000
M03 S255
G01 X56 Y101.3 F700
M5
G01 X56 Y107.3  F2000
M03 S255
G01 X56 Y117.3 F700
M5
G01 X79.5 Y161.3  F2000
M03 S255
G01 X79.39 Y161.89 F700
G01 X79.06 Y162.36 F700
G01 X78.59 Y162.69 F700
G01 X78 Y162.8 F700
G01 X77.41 Y162.69 F700
G01 X76.94 Y162.36 F700
G01 X76.61 Y161.89 F700
G01 X76.5 Y161.3 F700
G01 X76.61 Y160.71 F700
G01 X76.94 Y160.24 F700
G01 X77.41 Y159.91 F700
G01 X78 Y159.8 F700
G01 X78.59 Y159.91 F700
G01 X79.06 Y160.24 F700
G01 X79.39 Y160.71 F700
G01 X79.5 Y161.3 F700
G01 X79.5 Y161.3 F700
M5
G01 X139.5 Y161.3  F2000
M03 S255
G01 X139.39 Y161.89 F700
G01 X139.06 Y162.36 F700
G01 X138.59 Y162.69 F700
G01 X138 Y162.8 F700
G01 X137.41 Y162.69 F700
G01 X136.94 Y162.36 F700
G01 X136.61 Y161.89 F700
G01 X136.5 Y161.3 F700
G01 X136.61 Y160.71 F700
G01 X136.94 Y160.24 F700
G01 X137.41 Y159.91 F700
G01 X138 Y159.8 F700
G01 X138.59 Y159.91 F700
G01 X139.06 Y160.24 F700
G01 X139.39 Y160.71 F700
G01 X139.5 Y161.3 F700
G01 X139.5 Y161.3 F700
M5
M03 S255
M05
M5
G01 G01 X58 Y121.3  F2000
M03 S255
M6 T1
M5
M03 S255
M5
G01 X161.6 Y123.3  F2000
M03 S255
G01 X211.6 Y123.3 F700
M5
G01 X161.6 Y123.3  F2000
M03 S255
G01 X161.6 Y173.3 F700
M5
G01 X161.6 Y56  F2000
M03 S255
G01 X161.6 Y6 F700
M5
G01 X161.6 Y56  F2000
M03 S255
G01 X211.6 Y56 F700
M5
G01 X56 Y56  F2000
M03 S255
G01 X6 Y56 F700
M5
G01 X56 Y56  F2000
M03 S255
G01 X56 Y6 F700
M5
G01 X56 Y123.3  F2000
M03 S255
G01 X56 Y173.3 F700
M5
G01 X56 Y123.3  F2000
M03 S255
G01 X6 Y123.3 F700
M5
G01 X161.6 Y173.3  F2000
M03 S255
G01 X161.6 Y179.3 F700
G01 X56 Y179.3 F700
G01 X56 Y173.3 F700
M5
G01 X211.6 Y123.3  F2000
M03 S255
G01 X217.6 Y123.3 F700
G01 X217.6 Y56 F700
G01 X211.6 Y56 F700
M5
G01 X56 Y6  F2000
M03 S255
G01 X56 Y0 F700
G01 X161.6 Y0 F700
G01 X161.6 Y6 F700
M5
G01 X6 Y56  F2000
M03 S255
G01 X0 Y56 F700
G01 X0 Y123.3 F700
G01 X6 Y123.3 F700
M5
M03 S255
M05
M5
G01 G01 X58 Y121.3  F2000
M03 S255
M05
G00 G01 X0 Y0

« Last Edit: July 21, 2018, 09:52:08 PM by Stonemull »
A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7298
    • View Profile
    • T2Laser
Re: Software
« Reply #14 on: July 22, 2018, 04:34:23 AM »
OK, first an explanation of what T2Laser does.

The post processor only modifies what is sent to the COM port or saved using the Save Machine G-Code option. If you load G-code with invalid Grbl commands for example, the Grbl post processor will strip these out, remove unnecessary data and also compress the text before sending it - this reduces the buffers and improves performance.

Have you tried the combination of both Marlin post processors (yes you can check them both), it will add the G01 to every applicable line and also split power changes to different lines. It uses the fan power instead of S values, not sure if that does anything with Repetier or if you only get on and off using the G00 / G01 method.

I can create a new post processor to replicate the modifications you are making manually, that way you just save the machine G-code.

Note: I'm getting the same error on attachments.