Loading

Showing Layer number in generated GCode

From Ultimaker Wiki
Jump to: navigation, search

Sometimes its handy to stop the printer to be able to add a nut or something. There is a simple way to do that in the GCode:

M1(Do something and press Yes to continue)

What is harder to do is finding the place where to put that line. Its very practical if the layer numbers are added to the GCode. The layers have a constant distance so you can calculate where the printer should stop if you know how many layers there will be printed and if you know the distance from the bottom to that specific point.

A small modification to one of the files in skeinforge will give the answer:

The file and its position:

replicatorg-0024\skein_engines\skeinforge-31\skeinforge_application\skeinforge_plugins\craft_plugins\Fill.py

The change: Line nr: 865;
self.distanceFeedRate.addLine('G92 ; Layer %s ' % layerIndex )

the result will be... (with the line before and the line after...):
...
self.distanceFeedRate.addLine('(<layer> %s )' % rotatedLayer.z )
self.distanceFeedRate.addLine('G92 ; Layer %s ' % layerIndex )
layerRotation = self.getLayerRotation(layerIndex)
...

Add these changes to the file and (re)start ReplicatorG. Now you can find the layer start position by going to the GCode and find Layer <<LayerNumber>>
At this moment I don't know a better way to communicate software changes. In the future I hope to put a zip with source file somewhere.

Rudolf Everts