SOLIDWORKS CAM post processor for MPCMC

I know alot of you guys use fusion 360 but there are also free maker licenses available for SOLIDWORKS. I happen to have access to a full license through work. So I thought I’d write a post processor for MPCNC. I just created my first proof of concept and was able to send my gcode to my machine through Repetier Host. If you watch the video I still have some speeds and feeds to work out, I’m guessing the first big jerk at the beginning of my code is the rapid speed needs to be adjusted. Here is the video https://youtu.be/5-vueR-JuzY , it’s just a dry run. And I am still building my machine so no comments on how ugly it is.

MPCNC2-SWCAM-1.zip (27.8 KB)

2 Likes

Cool! When you get it close post some code here and we can look through real quick to check for any issues. Marlin used to need feedrates on every line but we now can use G0 and G1, but because of the Z axis it is still best to use a feedrate for every line and a different rapid for Z.

Hopefully I’ll get some posted for you to check tomorrow. Everything seems to be running fine now. Once I get it all dialed I’ll do a full video on how to use it and maybe even how I made the post processor in another video.

1 Like

Here is an partial example of what I have been running…attached is the full NC file.

O0001
G17 G21 G40 G80
(1/8 EM CRB 4FL 1/2 LOC)
T01 M06
S10000 M03
G54
M08
G90 G00 X71.003 Y51.454
G43 Z2.5 H01
G01 Z-.5 F120.
G02 X70.911 Y51.689 I4.032 J1.704 F300.
G01 X70.624 Y51.454
X71.003
Y50.184
X74.135
G02 X73.928 Y56.063 I.899 J2.974
G01 X75.523 Y56.67
X77.021 Y57.298
X78.459 Y57.991
X79.862 Y58.759
X81.207 Y59.584
X82.472 Y60.478
X83.678 Y61.461
X84.81 Y62.506
X85.841 Y63.618
X86.792 Y64.816
X87.652 Y66.068
X88.394 Y67.372
X89.038 Y68.751
X89.587 Y70.184
X90.035 Y71.663
X90.389 Y73.176
X90.644 Y74.72
X90.82 Y76.372
X91.185 Y79.943
G02 X91.197 Y80.044 I3.091 J-.316
G01 X91.518 Y82.419
G02 X91.541 Y82.562 I3.079 J-.417
G01 X91.973 Y84.92
G02 X92.006 Y85.078 I3.057 J-.56
G01 X92.559 Y87.41
G02 X92.621 Y87.633 I3.024 J-.717
G01 X93.347 Y89.918
G02 X93.411 Y90.1 I2.962 J-.94
G01 X93.844 Y91.218
G02 X93.917 Y91.392 I2.898 J-1.122
G01 X94.418 Y92.481
G02 X94.533 Y92.708 I2.824 J-1.297
G01 X95.121 Y93.753
G02 X95.271 Y93.994 I2.708 J-1.524
G01 X95.952 Y94.98
G02 X96.177 Y95.269 I2.558 J-1.765
G01 X96.969 Y96.168
G02 X97.3 Y96.492 I2.333 J-2.053
G01 X98.217 Y97.265
G02 X98.569 Y97.521 I2.001 J-2.377
G01 X99.076 Y97.838
G02 X99.345 Y97.989 I1.65 J-2.633
G01 X99.883 Y98.255
G02 X100.099 Y98.353 I1.381 J-2.784
G01 X101.402 Y98.879
G02 X101.689 Y98.979 I1.165 J-2.881
G01 X103.038 Y99.377
G02 X103.469 Y99.471 I.878 J-2.981
G01 X104.164 Y99.572
G02 X104.627 Y99.604 I.447 J-3.075
G01 X105.33 Y99.601
G02 X108.419 Y96.377 I-.016 J-3.107
G01 X108.388 Y95.552
X108.415 Y94.889
X108.506 Y94.259
X108.655 Y93.644
X108.857 Y93.082
X109.125 Y92.543
X109.46 Y92.016
X109.856 Y91.514
X110.312 Y91.037
X110.807 Y90.604
X111.344 Y90.218
X111.913 Y89.88
X112.508 Y89.6
X113.145 Y89.366
X113.807 Y89.184
X114.482 Y89.057
X115.19 Y88.985
X115.936 Y88.959
X116.526 Y88.974
X117.051 Y89.026
X118.299 Y89.276
X118.793 Y89.431
X119.314 Y89.637
X119.825 Y89.887
X120.325 Y90.175
X120.807 Y90.502
X121.234 Y90.834
X122.123 Y91.68
X122.423 Y92.041
X122.717 Y92.463
X122.953 Y92.876
X123.137 Y93.301
X123.292 Y93.78
X123.407 Y94.272
X123.472 Y94.751
X123.491 Y95.259
X123.465 Y95.84
X123.393 Y96.393
X123.271 Y96.923
X123.107 Y97.421
X122.91 Y97.852
X122.642 Y98.284
X122.299 Y98.742
X121.933 Y99.155
X121.524 Y99.531
X121.053 Y99.897
X120.513 Y100.257
X119.953 Y100.58
X119.375 Y100.857
X118.767 Y101.1
X118.193 Y101.286
X116.776 Y101.593
X116.174 Y101.674
X115.647 Y101.7
X115.338 Y95.358
X115.392 Y95.347
X115.626 Y95.323
X115.743 Y95.319
X115.676 Y95.334
X115.592 Y95.345
X115.338 Y95.358
X115.4 Y96.626
X114.611 Y96.665
X113.5 Y96.644
G02 X113.496 Y96.186 I-8.186 J-.151

Luke.nc (407 KB)

That is not real close to what we currently use but with the new firmware that might be okay.

Ryan, thanks for looking at it…seems to work just fine so far I haven’t seen any errors from repetier-host.

I am still getting the whole thing figured out, but any errors seem to be operator and machine specific :stuck_out_tongue:

[attachment file=102914]

[attachment file=102913]

I have attached the post processor I am currently using if anyone would like to try it(I am not responsible for any damage caused) Keep in mind you will need to setup a machine in SOLIDWORKS cam that references this post processor and adjust your speeds and feeds. I just copied the default metric and adjusted its settings and the post processor it was set to use.

I might need to try out the new free version, my old SW does not have CAM.

be noted that marlin doesn’t support g40, g43 (tool length compensation). also it seems that g80 have different meaning then in cnc world.

so it will be interesting to see how you solve multitool milling. I guess it possible only with help an external host software like cncjs that will be expand M6 tool change command to appropriate sequence of commands

What does a tool change look like in Estlcam or Fusion? I can probably have the post inject code before or after the tool change. Currently I ha e just been running one tool at a time… would be helpful for the last carve when I had to manually line up my endmill cut.

Check the milling basics page on the site. As i remember it has tool change gcodes

1 Like

Thanks Im looking at the G43 right now and seeing what I can do. Looks like this is why I had the line at the begining of the R on my Ruth sign. Interesting that this doesn’t show as an error when ran.

Adjusted the post, this should work just fine. It looks good in my backplot anyway. I don’t have a z probe setup yet so haven’t worked on adding that yet. My next thing to work on will be tool changes.

 

O0001
G17 G21 G40 G80
G92
G00 Z5.0000 F500
(1/8 60DEG 0.01RAD SCRIBE)
T02 M06
S12000 M03
G54
M08
G90 X6.365 Y99.751
G43 Z5. H02
G01 Z-.794 F144.78
X6.402 Y99.802 F579.12
X16.796 Y104.02
X18.162 Y104.572

[attachment file=103061]

Adjusted the post, this should work just fine. It looks good in my backplot anyway. I don’t have a z probe setup yet so haven’t worked on adding that yet. My next thing to work on will be tool changes.

 

O0001
G17 G21 G40 G80
G92
G00 Z5.0000 F500
(1/8 60DEG 0.01RAD SCRIBE)
T02 M06
S12000 M03
G54
M08
G90 X6.365 Y99.751
G43 Z5. H02
G01 Z-.794 F144.78
X6.402 Y99.802 F579.12
X16.796 Y104.02
X18.162 Y104.572

 

Attached updated Post Processor for SOLIDWORKS CAM. I will try to continue to update this and add features as I see more people using it. I did see a few people are starting to get their Maker Licenses. I will always try to remove the old Post Processor and add a new one at the top.

1 Like

Hi Garrett,

First, thanks for taking the time to develop and post the SW Post files. I’m running SW2019 SP3 (the latest version) and I just tried your file. It accepts the post file as valid in the machine setup screen, but when I click the “play” button in the create post screen, it just sits there. The code doesn’t scroll by in the window on the bottom like it normally would and no file is ever created. Have you run into this problem? I have been using a GRBL post and a Laguna router post with my MPCNC with some luck from SW, but there are quite a few things they both do wrong for MPCNC, so I was really excited to see what you made.

I tried opening the .SRC file in UPG to see if I could figure what was wrong and it said it could find the .LIB file. I’m wondering if that is the problem I am having running the post in SW?

Anyway, thanks again and I look forward to your thoughts,

Dave

 

Thanks for the reply, I added the .LIB file to the ZIP at the top. Hope it works out well for you, It still needs some work but you can use the UPG to add or remove whatever you like.

The decision to build a post processor SW for Marlin is great.
I have SW Cam 2019 SP 01.
I have the same problem with code generation.

Is there a solution to the problem?
Thanks you.

I figured out what was causing my SolidWorks to freeze and crash with the MPCNC-SW Post. If you open the file MPCNC-SOURCE.SRC in the EControl editor, click to the Library Files drop down and correct the library location for the Mill.lib location to where it is on your machine. That worked for me at least. I am trying to recall if I opened the file back up in UPG and recompiled it or not…I got a little lost in changing multiple things. Anyway, this changing of the path definitely made everything happy again. The only challenge now is that the post still outputs G81, 82, 83 drill commands and Marlin doesn’t support them (although I see a lot of traffic about people working on that). When it gets to drill operations, it just stops and homes.
Dave

In MPCNC-SOURCE2.SRC to change the path here?
Which one?
I did not find the Mill.lib file on the system at all.

In another post processor in the .SRC file.
Also, the road is not real, and it works, but also not as it should marlin…