Variables?

212 views
Skip to first unread message

Rick Zehr

unread,
Feb 11, 2014, 7:20:08 PM2/11/14
to kisslicer-r...@googlegroups.com
I've got a guide to the variables one can use in KS - things like change the extruder temperature at a specific layer, but it appears that the Material GCODE n(*) layers only works every N layers.

I'd like to adjust the extruder temp at a specific layer, but not again - like raise the temp at layer 45, but not again at layer 90, 135, etc.

Anyone have a clue how this might be done?


toranarod

unread,
Feb 11, 2014, 8:27:04 PM2/11/14
to kisslicer-r...@googlegroups.com
I am totally with you on this.  This is the kind of G code writer the community needs if you are going to manufacture any thing of real importance.
There are G coders on the KISSlicer  forum that do know.   I havens seen them guys here.   

Try to find PenskeyGuy?

cheers

funBart

unread,
Feb 12, 2014, 4:28:07 PM2/12/14
to kisslicer-r...@googlegroups.com
I've got a guide to the variables one can use in KS - things like change the extruder temperature at a specific layer, but it appears that the Material GCODE n(*) layers only works every N layers.

 Hi, I'm not sure what you mean: there is Gcode for every N [*] layers to be inserted, and the Matl G-code <MATL> belonging to each material of the Material tab.

N[*] layer Gcode
As for the N[*] layer Gcode: for me it would be a better idea as well to change it to only insert Gcode at a given layer, and not repeated every N layers. But maybe others have more use of the repetitive Gcode insert. 
Regarding your setting: what would be the problem when inserted a temp Command as M104 S220 T0 on, say, layer 45, and it will be repeated at 90 /135? It is resulting on a temp change on layer 45, and only 'confirmed' at the above layers?
Another solution would be to add it manually in a text editor / ReplicatorG or so, to manually add that command at the wanted position.
When using commands like: M104 S<TEMP> T<EXT+0> in the N[*] layer Gcode, you have to be careful (with dual extrusion) , as it reads out at the inserted position the temperature settings of the active extruder and belonging material.
Another option for this [N] layer Gcode is to add a longer cool periode each N layers, while lifting the toolhead a little, so it wouldn't melt the print, like:
G1 Z<Z+5>
G4 P60000 (wait for 1 minute)
G1 Z<Z>



Matl G-code tab <MATL>
Regarding the Gcode belonging to a material: each material has it's own specific Material Gcode. I used it for example to define extra retractions at extruder change for the support extruder, like this:
;*******Matl oranje 1
G92 E0
G1 E-2
G92 E0

As such this Gcode does nothing: it has to be inserted at one of the PtrGcode tabs as <MATL> command

When using it for example on the "deselect extruder" tab, like this:
(**** DeSelect Gcode extruder change***)
G1 F3600
M104  S<TEMP> T<EXT+0> 
<MATL>
It's resulting first in lowering of the temp of the inactive extruder, and then in the extra retraction as defined by the <MATL> command.
Wit dual extrusion: when inserted the <MATL> and other commands on the 'deselect extruder" Gcode tab: it reads out the temp material settings of the deselect extruder from the "keep warm" setting.
And when inserted on the 'select extruder' Gcode tab: it reads out all the settings of the active toolhead to start printing with (The Main temp of that material).

I used the <MATL> command a lot, for dual extrusion, when adding a long sequence of commands to do a extruder wipe next to the build platform, and pressuring the active extruder, and wipe it again at a toolchange. It took some time each extruder change, but resulted in an almost Ooze free dual extruder print.
In that way the variable as <X>, <Y> and <Z> are nice to use as well, to be able to do a wipe sequence and returning to the 'active' point of print.

Hope this helps a little.
Bart













 



Rick Zehr

unread,
Feb 12, 2014, 5:34:52 PM2/12/14
to kisslicer-r...@googlegroups.com
This was copied from the original site - written by Jonathon - I couldn't find the information here.
------------------------------- 
Kisslicer tokens

Most parameters can have an offset, parsed as any number after the TOKEN
 
<TOKEN> is the same as <TOKEN0> is the same as <TOKEN+0> is the same as <TOKEN-0>
E.g. If <TOKEN> is valued at 100, then <TOKEN15> = <TOKEN+15> = 115
 
Some offsets are parsed as integers, specifically the extruder <EXT>, temperature <TEMP>, and bed temp <BED> tokens
the Material token <MATL> does not have an offset
 
Position tokens
<X> is the current X position, and so on for <Y> and <Z>
<E> is the current extruder's position
these are useful for making small relative adjustments...move up a bit, retract a bit, etc.
because KISSlicer does not know if these values have been modified by the G-code includes, it will reset the values right after the include code is inserted
 
Extruder and Temperature control
<EXT> is the extruder
this is base 0, as in the 1st extruder is 0.  If you need it to be a 1, you can use <EXT+1>
'Prefix' and 'Select Extruder' will have <EXT> evaluate to the next extruder to be used
All other inserts will have <EXT> evaluate to the just used extruder
<TEMP> is the temperature of the extruder
'Select Extruder' KISSlicer will substitute the correct temp (first layer or regular) as needed
'Deselect Extruder' will select the Keep-Warm temp if the extruder will be used again, or 0 if it just finished it's final extrusion of the print
if the final 0 is undesired (like you want to keep your extruder hot for the next print), you can hack around it by using <TEMP+100> or something, with the material settings being 100C less than you actually want to use.
 <BED> is the bed temperature in the material settings
If used in 'Prefix' it will resolve to the material of the first extruder to be used in the print
if used in 'Select Extruder' it will resolve to the material that is about to be used
in all other G-code inserts, it will resolve to the most recently used material
 
Other
<%> will resolve to the percent done estimate at that point in the print (using the timing estimates, so it should be decently accurate).  It will have one decimal place (e.g. 17.3), and will be 0 in 'Prefix', 100 in 'Postfix', and guaranteed to be between those for all other inserts.  Also, for some reason, I allow an offset
<MATL> is inserts the include text in the Material settings 'Matl G-code'
This lets you do something custom for each material type
Any G-code tokens inside it will also be replaced (I have not tried recursive <MATL> tokens, but I think KS will ignore them)

Rick Zehr

unread,
Feb 12, 2014, 5:45:21 PM2/12/14
to kisslicer-r...@googlegroups.com
Right you are - I had been thinking of <TEMP+2> rather than setting the absolute temperature - thanks!@

SuperDave

unread,
Jun 17, 2014, 12:22:10 PM6/17/14
to kisslicer-r...@googlegroups.com
Does anyone know how the dual extruder, with a single STL works, using the N-layer scripts.

I read above that the <EXT+0> only works in the Select and Deselect.  This is working, and switches nicely.

I am trying to switch the extruders at every 10 layers, using cooldown and warm up.
Reply all
Reply to author
Forward
0 new messages