nka
Posts: 7
Joined: Wed Aug 05, 2015 8:11 am

Re: Tip of the Day 8- Scripts tab, G-Code

Oh amazing, thanks !
Holy1
Posts: 21
Joined: Mon Jul 28, 2014 12:01 pm

Re: Tip of the Day 8- Scripts tab, G-Code

ShaqFoo wrote:
KeyboardWarrior wrote:
Kyuubi wrote:I want post too the LCD "(current layer) of (layers)" on every layer change, is that possible?
Since there isn't a current layer or # of layers variable, this isn't currently doable. If you're looking to do this for time-measurement reasons, I don't think that # of layers is a great indicator of speed by the way, since some layers will take much longer than others.

For instance, a pyramids base layers will print much slower than the layers towards the tip.
Great post but he never asked about time measurement. The single biggest reason to display the layer height on the LCD screen is in the case of failed print so you know where to resume by LAYER #. Yes, you could do it by z height too, but visually seeing the layer number is easier to remember and find in the gCode file that S3D creates. S3D inserts the layer# and z height in the gcode for every layer printed but it puts inserts them as comments.

After reading the post, I was really intrigued by the terminal post processing window and was able to display both the layer # and the Z height on the LCD screen during the print for every layer printed. See attached pictures.

Place the following code in the post processing window and you will get layer number printed on your LCD screen along with the z height. The replace command simply removes the comment and replaces it with the M117 command. The second line is for formatting only it is not needed but tightens things up.

{REPLACE "; layer" "M117 Layer"}
{REPLACE " Z = " " Z="}
Thanks for posting this ^^^^^
Tesse
Posts: 8
Joined: Mon Dec 07, 2015 3:33 pm

Re: Tip of the Day 8- Scripts tab, G-Code

Great tips y'all..

I managed to script this to show the current layer via M117:

Code: Select all

{REPLACE "; layer" "M117 Layer"} 
{REPLACE ", Z =" "; Z ="} 
I only want to display the layer #. So I added the 2nd line to uncomment the z-coordinate. --> replacing the "," with an ";"

Works quite well, just evertime I go back to the scripts tab it looks like this:
script_issue.png
script_issue.png (9.7 KiB) Viewed 20097 times
is this a bug?

Also: is there a post-processing placeholder to show the total # of layers of the print? I would love to display "Layer# of xxx Layers"

Thanks,
tesse
Geoff Sim
Posts: 12
Joined: Sun Oct 04, 2015 6:21 pm

Re: Tip of the Day 8- Scripts tab, G-Code

CompoundCarl wrote:
nka wrote:Can I do calculation, like something like this to raise the nozzle 10mm at the end of a print?

Just use relative mode. See below.

Code: Select all

G90 ; change to relative mode
G1 Z10 F3000 ; raise nozzle 10mm in Z-axis
G91 ; switch back to absolute mode
It's the same thing that S3D uses with their jog controls
Using this code "as is" could/will damage you model and your printer.
G90 is absolute mode, and the G1 Z10 F3000 will ram the extruder down to Z=10 at 50mm/s.

Swap the 90/91 around.
(I'd also reduce the amount raised and pull some extrusion back into the nozzle to reduce threading):

Code: Select all

G91 ; relative mode
G1 Z5 E-2 F3000 ; raise nozzle 5mm and take pressure off the extruder
G90 ; absolute mode
JATMN
Posts: 27
Joined: Mon Jul 13, 2015 12:09 pm
Location: Orange County, CA, USA
Contact: Website

Re: Tip of the Day 8- Scripts tab, G-Code

All my searches send me back to this post. So I will ask here..

Is there a [ ] code for estimated print time and material usage?
So I can add my estimated "build time" etc.. stats from the preview screen to my comments on my gcode?
Jack of All Trades Master of None
Wanhao Duplicator 4 (MFG 2013) + Simplify3D v3
Ultimaker v2 + Simplify3D v3
Ultimaker v2 - Aluminum - Remix By JAT.MN + Simplify3D v3
User avatar
dkightley
Posts: 2405
Joined: Tue Mar 10, 2015 4:09 pm

Re: Tip of the Day 8- Scripts tab, G-Code

The gcode file already has stats at the bottom. Here's an example of the last six lines in one of my gcode files:

Code: Select all

; Build Summary
;   Build time: 0 hours 38 minutes
;   Filament length: 2682.5 mm (2.68 m)
;   Plastic volume: 6452.26 mm^3 (6.45 cc)
;   Plastic weight: 8.07 g (0.02 lb)
;   Material cost: 0.37
Doug Kightley
Volunteer at the National Tramway Museum http://www.tramway.co.uk
Railway modeller and webmaster at http://www.talkingtgauge.net
JATMN
Posts: 27
Joined: Mon Jul 13, 2015 12:09 pm
Location: Orange County, CA, USA
Contact: Website

Re: Tip of the Day 8- Scripts tab, G-Code

I want to move that to the top though and manipulate it.
Jack of All Trades Master of None
Wanhao Duplicator 4 (MFG 2013) + Simplify3D v3
Ultimaker v2 + Simplify3D v3
Ultimaker v2 - Aluminum - Remix By JAT.MN + Simplify3D v3
MP_Maastricht
Posts: 1
Joined: Thu Feb 18, 2016 7:17 am

Re: Tip of the Day 8- Scripts tab, G-Code

blaknite7 wrote:This is an awesome post! I did have a couple questions though:

I've been working a lot with dual head prints and I am trying the tweak in the settings... With regard to the tool change g-code and reducing temperatures of the inactive extruder, is it not possible to reference the extruder temperature variable and use it in the tool change g-code?

For example I mean this:
From:
G1 X0 Y40 F4000 ; move to wait for temperatures
{IF NEWTOOL=0}M104 S165 T1; set T1, inactive extruder to 165 C
{IF NEWTOOL=0}M109 S205 T0; Set T0, new active extruder to T0 Temperature and wait for it to reach temperature before proceeding.
{IF NEWTOOL=1}M104 S165 T0; Cool T0 to 165
{IF NEWTOOL=1}M109 S205 T1; set T1, Heat T1 to T1 Temperature


To:

G1 X0 Y40 F4000 ; move to wait for temperatures
{IF NEWTOOL=0}M104 S165 T1; set T1, inactive extruder to 165 C
{IF NEWTOOL=0}M109 S[extruder0_temperature] T0; Set T0, new active extruder to T0 Temperature and wait for it to reach temperature before proceeding.
{IF NEWTOOL=1}M104 S165 T0; Cool T0 to 165
{IF NEWTOOL=1}M109 S[extruder1_temperature] T1; set T1, Heat T1 to T1 Temperature

The reason for doing this is to have different temperatures at different layers that are controlled by the temperature tab in the settings... It didnt seem to work for me when i tried it so i was curious if there is another way to reference the temperature/layer tables defined?

Also, there seems to be a slight pause when switching tools prior to the move "G1" code in the tool change script. is there a way to minimize this/eliminate this? Normally its not so bad but if you have a small feature you are trying to print the dwell tends to screw up the finish.

thanks for the input. Hopefully someone figured this out already.


Advice for those that want to use this functionality, you may want to change the order from the original post of what tools are activated and when. if you command it to wait for temperature (M109) first and then set the inactive extruder to a lower temperature it will operate in that order. Its more often best to always command the inactive extruder to the lower temp first and then the active extruder to the target temp/stabilize. This prevents extra ooze from the soon to be inactive extruder while the new tool head is warming up.
Is there already more info on this? I have the same problem.
CompoundCarl
Posts: 2005
Joined: Wed Aug 05, 2015 7:23 am

Re: Tip of the Day 8- Scripts tab, G-Code

The only variables I see are for the first layer temperatures. There are no variables for temperatures on previous layers. So there's your answer.

If you feel like that's something you need, then you can make a feature request for it in the other sub-forum
Fraeser
Posts: 1
Joined: Tue Feb 23, 2016 3:08 pm

Re: Tip of the Day 8- Scripts tab, G-Code

blaknite7 wrote:This is an awesome post! I did have a couple questions though:

I've been working a lot with dual head prints and I am trying the tweak in the settings... With regard to the tool change g-code and reducing temperatures of the inactive extruder, is it not possible to reference the extruder temperature variable and use it in the tool change g-code?

For example I mean this:
From:
G1 X0 Y40 F4000 ; move to wait for temperatures
{IF NEWTOOL=0}M104 S165 T1; set T1, inactive extruder to 165 C
{IF NEWTOOL=0}M109 S205 T0; Set T0, new active extruder to T0 Temperature and wait for it to reach temperature before proceeding.
{IF NEWTOOL=1}M104 S165 T0; Cool T0 to 165
{IF NEWTOOL=1}M109 S205 T1; set T1, Heat T1 to T1 Temperature


To:

G1 X0 Y40 F4000 ; move to wait for temperatures
{IF NEWTOOL=0}M104 S165 T1; set T1, inactive extruder to 165 C
{IF NEWTOOL=0}M109 S[extruder0_temperature] T0; Set T0, new active extruder to T0 Temperature and wait for it to reach temperature before proceeding.
{IF NEWTOOL=1}M104 S165 T0; Cool T0 to 165
{IF NEWTOOL=1}M109 S[extruder1_temperature] T1; set T1, Heat T1 to T1 Temperature

The reason for doing this is to have different temperatures at different layers that are controlled by the temperature tab in the settings... It didnt seem to work for me when i tried it so i was curious if there is another way to reference the temperature/layer tables defined?

Also, there seems to be a slight pause when switching tools prior to the move "G1" code in the tool change script. is there a way to minimize this/eliminate this? Normally its not so bad but if you have a small feature you are trying to print the dwell tends to screw up the finish.

thanks for the input. Hopefully someone figured this out already.


Advice for those that want to use this functionality, you may want to change the order from the original post of what tools are activated and when. if you command it to wait for temperature (M109) first and then set the inactive extruder to a lower temperature it will operate in that order. Its more often best to always command the inactive extruder to the lower temp first and then the active extruder to the target temp/stabilize. This prevents extra ooze from the soon to be inactive extruder while the new tool head is warming up.

I agree to this post,
for dual head printing it is necessary to have the variable [extruderX_temperature] to be postprocessed.
It would help to postprocess all available system variables in each script.
So the scripts can really configured to all wishes of the users.

Thank you for your help
Fraeser

Return to “General Discussion and Tips”