Does the M2 work in non-cumulative mode with the G-code?

Ask the MakerGear community for assistance...
Post Reply
swbluto
Posts: 215
Joined: Mon May 25, 2015 7:09 pm

Does the M2 work in non-cumulative mode with the G-code?

Post by swbluto » Mon Oct 19, 2015 4:27 am

My makerbot replicator 2x work in non-cumulative mode (Basically just tells the printer how much it's going to extrude going from this point to the next on each line), but I noticed the m2 works in cumulative mode (At least that's what s3d outputs). Can I get the m2 to work in non-cumulative mode?

My software that makes detailed models /possible/ to print out only works on non-cumulative mode g-code (And, thus, it only works on my makerbots currently); rearranging cumulative mode gcode would be programmatic gymnastics I don't think I have the kung fu nor patience for. Thus, currently, I can't print out detailed bottom layers on the M2 because s3d is retarded (It has a tendency to print the shortest paths first, which lift so easily. Printing the longest paths first effectively solves this problem, as by the time the shortest paths are printed, it has the long paths to stick to.).

User avatar
Jules
Posts: 3144
Joined: Wed Jan 21, 2015 1:36 am

Re: Does the M2 work in non-cumulative mode with the G-code?

Post by Jules » Mon Oct 19, 2015 5:00 am

I was reading the other day that the marlin firmware relies on a cumulative process. (S3D can be made to work in a non-cumulative g-code mode with other printers.) :|

jsc
Posts: 1864
Joined: Thu Apr 10, 2014 4:00 am

Re: Does the M2 work in non-cumulative mode with the G-code?

Post by jsc » Mon Oct 19, 2015 5:21 am

G90: absolute positioning.
G91: relative positioning.

swbluto
Posts: 215
Joined: Mon May 25, 2015 7:09 pm

Re: Does the M2 work in non-cumulative mode with the G-code?

Post by swbluto » Mon Oct 19, 2015 5:51 am

jsc wrote:G90: absolute positioning.
G91: relative positioning.
Wait, so all I have to do is (somehow get S3D to output non-cumulative code) and change G90 to G91 in the M2 gcode?

Wait, just found it!

In S3D -> FFF settings -> G-code -> Check "relative extrusion distances".

And, then in the g-code, I'm guessing you just have to change the G90 on the top line to G91?

Man, this sounds like an easy solution. I hope I'm not missing something, looks rather too easy...

swbluto
Posts: 215
Joined: Mon May 25, 2015 7:09 pm

Re: Does the M2 work in non-cumulative mode with the G-code?

Post by swbluto » Mon Oct 19, 2015 10:13 pm

Just tried the above method and yeah, the printer started printing, but it was printing in mid-air off to the right side the whole time, leaving plastic string everywhere, lol. So, kind of looks like it doesn't work unless there's some kind of parameter tweaks I need to do.

lem
Posts: 162
Joined: Thu Jan 15, 2015 6:44 pm

Re: Does the M2 work in non-cumulative mode with the G-code?

Post by lem » Tue Oct 20, 2015 3:53 am

[Edit] Hold the phone. It may be very simple. If you tell S3D to generate relative addressing then you shouldn't have to change anything in the G code that it generates. The G90 at the beginning (assuming that it generates a G90) is most likely a move to place Work Zero in the appropriate location in the Machine co-ordinate system. Check to see if you have a G91 in the file a little after the G90 appears. [End Edit]

My guess is that you have a disconnect between Machine Zero and Work Zero when you tell S3D to use relative positioning. Your model will be designed assuming a point in 3D space that is Work Zero unless you specifically tell it that Work Zero is going to be at a particular place on the model. For 3D printing it seems that the default Work Zero location is at 0,0.0

When you tell your G code to use relative positioning then it assumes that Work Zero is located at the Machine Position wherever the print head is located when the G code file starts executing.

So, you can either use absolute positioning to move the print head to the correct location to start the print and then switch to relative positioning , or you can physically move the print head to the place you want Work Zero to be before you start the relative positioning code executing.

User avatar
innkeeper
Posts: 266
Joined: Fri Jun 26, 2015 3:56 am
Location: New Windsor, NY

Re: Does the M2 work in non-cumulative mode with the G-code?

Post by innkeeper » Tue Oct 20, 2015 4:52 am

ah so thats whats meant by cumulative and non cumulative.... i was tring to figure out what that translated to in gcode :)

you might want to take a look at the start code for the replicator under s3d... it might help
i use s3d for both..and know the custom start geode is different. so that might be a quick leg up..on helping resolve the start postion issue.
M2 - MKS SBase w Smoothieware, GLCD, 24v, Upg Z & extruder stepper - IR bed leveling, Astrosyn dampers X/Y/Z, MIC 6, Zebra, PEI, & glass Build Plates - E3D, V3B Hotends, & more - many other 3d printers - production printing.

swbluto
Posts: 215
Joined: Mon May 25, 2015 7:09 pm

Re: Does the M2 work in non-cumulative mode with the G-code?

Post by swbluto » Sat Oct 24, 2015 8:23 am

lem wrote:[Edit] Hold the phone. It may be very simple. If you tell S3D to generate relative addressing then you shouldn't have to change anything in the G code that it generates. The G90 at the beginning (assuming that it generates a G90) is most likely a move to place Work Zero in the appropriate location in the Machine co-ordinate system. Check to see if you have a G91 in the file a little after the G90 appears. [End Edit]
Just checked, nope.

I should just try printing without changing the gcode. Maybe it'll print?

Edit: Wow, it was really that simple. Take the m2's normal profile and just checkmark "Use relative e-distances" and the g-code uses non-cumulative mode and, more importantly, it works right out of the box (In G90 mode and all). YAY! Now I can /finally/ print detailed bottom layers on the M2. :D

I'm thinking the G90/G91 mode is really referring to relative x/y coordinates/movements, not the e-distances. I.e.,

G90 -> x & y
G91 -> dx & dy

User avatar
ednisley
Posts: 1133
Joined: Fri Apr 11, 2014 5:34 pm
Location: Halfway up the Hudson
Contact:

Re: Does the M2 work in non-cumulative mode with the G-code?

Post by ednisley » Sat Oct 24, 2015 2:03 pm

swbluto wrote:G90/G91 mode is really referring to relative x/y coordinates/movements
In the world of subtractive CNC machining, the G90/G91 commands switch all coordinates between absolute and relative mode. In G91 mode, all commands must use relative coordinates from the current location.

RepRap firmware added M82/M83 to switch only the extruder coordinate, probably to solve the integer overflow problem with the total filament length.

I've used G91 to get full-relative XYZE coordinates in startup G-Code routines, but AFAICT no slicers generate relative XYZ coordinates.

Post Reply