webers
Posts: 5
Joined: Tue Sep 05, 2017 11:39 am

G0 code

Tue Sep 05, 2017 11:45 am

Hi,

Is there any possibility to change parameters so Siplify3D generates G code using G0 for non printing moves?
At the moment it uses G1 with Extuder value 0 but I need that it uses G0.



Thanks.

horst.w
Posts: 852
Joined: Fri Oct 17, 2014 5:00 pm

Re: G0 code

Tue Sep 05, 2017 4:01 pm

I see the only solution to implement the required code manually.
GCode is readable e.g. with notepad++ or each other text editor.

regards
horst.w, GER


RepRap GCode Cheat Sheet
Comm.Parameters Description Example

G0 Axis [X/Y/Z] Position Rapid Movement G0 X50
G1 Axis [X/Y/Z/E] Position Feed [F] Controlled Movement G1 F150 X10
G4 Time in ms [P] Dwell / Wait G4 P500
G20 none Set units to inch G20
G21 none Set units to mm G21
G28 <Axis [X/Y/Z]> Home G28 X Y
G90 none Absolute Positioning G90
G91 none Relative Positioning G91
G92 Axis [X/Y/Z/E] Value Set Position to value G92 X5 Y10
Comm.Parameters

webers
Posts: 5
Joined: Tue Sep 05, 2017 11:39 am

Re: G0 code

Wed Sep 06, 2017 6:11 am

If it would be one place then it is possible,but for big parts the code is too long to find all places with non printing moves.

I have tried other software and most of them use G0 but I like the Simplify3D better.

brian442
Posts: 1243
Joined: Mon Nov 28, 2016 5:35 am

Re: G0 code

Wed Sep 06, 2017 6:44 am

You could do this with a single regex command. Just replace G1 with G0 for any line that does not contain an "E".

Then you can run that script or command using the post-processing options in S3D

arhi
Posts: 455
Joined: Thu Oct 06, 2016 5:13 pm

Re: G0 code

Wed Sep 06, 2017 8:32 am

I would love this option too. I have some old printers not yet upgraded to smoothieware that do a different type of move for G0 and G1. not a super important feature but would imo make s3d much more versatile (especially for printers running with emc or similar systems)
gcodestat integrates with Simplify3D and allow you to
Calculate print time accurately (acceleration, max speed, junction deviation all taken into consideration)
Embed M117 codes into G-Code
Upload your G-Code directly to Octoprint
open source and unlicence

webers
Posts: 5
Joined: Tue Sep 05, 2017 11:39 am

Re: G0 code

Wed Sep 06, 2017 8:49 am

I don't have any experience with regex.
Does the S3D can use the same commands in post processing?

horst.w
Posts: 852
Joined: Fri Oct 17, 2014 5:00 pm

Re: G0 code

Wed Sep 06, 2017 1:24 pm

@ webers

Why is the Travelspeed not sufficient? What's your goal?

@ brian442
You mean a negative look-ahead assertion, but how is a complete line to exclude, when "G1" & "E" is true ?

H.

webers
Posts: 5
Joined: Tue Sep 05, 2017 11:39 am

Re: G0 code

Wed Sep 06, 2017 1:48 pm

I have printer with firmware which uses G1 as activation for extruder so I need the G code which uses G0 for non printing moves.

Do you have some samples for Regex script?
I started to look in internet and found example
Is it possible to use something like this to find line which contains G1 but doesn't contain E ? How to replace G1 to G0 ?
-^.*\b(G1|?!E).*$

horst.w
Posts: 852
Joined: Fri Oct 17, 2014 5:00 pm

Re: G0 code

Wed Sep 06, 2017 2:51 pm

webers wrote:I have printer with firmware which uses G1 as activation for extruder so I need the G code which uses G0 for non printing moves.
....

Sorry, I don't understand this. G1 is always the definited movement of the print head to a certain position AND allows extrusion with the parameter "E" ... mm or even no extrusion when "E" stays empty. What do you need more?
G1 Axis [X/Y/Z/E] Position Feed [F] Controlled Movement G1 F150 X10 in this example it is going to X 10 ( Y = 0 ) where ever it starts.
This movement - without the parameter "E" is only used for positioning the print head to begin the extrusion or changing place of extrusion. The next step is the G1 order with "E" parameter for the planed extrusion.
I would say, you cannot use it to reach your goal with a transformation of G1 to G0.

At the moment I have tested a very complex thing with 2.500.000 g-code lines and there is no one line with G0

webers
Posts: 5
Joined: Tue Sep 05, 2017 11:39 am

Re: G0 code

Wed Sep 06, 2017 3:21 pm

Mattercontrol and Cura uses G0 for non-printing moves S3D uses G1 all the time.

G-code with G0 works with this firmware otherwise printing doesn't stop.

I can open G code in notepad ++ and change G1 to G0 in lines without E value like this:

\bG1(?!.*?E\B)
Replace with G0

It would be nice if I can find way to add this in post processing script.

I tried this, but it doesn't work:
{REPLACE "\bG1(?!.*?E\B)" "G0"}

Return to “General Discussion and Tips”