mmcginnis9272
Posts: 18
Joined: Fri Jun 26, 2015 5:44 pm

Scripting placeholder not working

Thu Jul 09, 2015 6:32 am

So I have a CubePro Trio with the following in the Tool Change Script. When the Final .gcode is created, everywhere that [current_Z_position] apears, it is not being converted to the z position. The string [current_Z_position] remains in the gcode. Is there a trick to getting Simplify 3D to actually convert the placeholder into the Z value? I have attached my Factory file as well.

Code: Select all

^Changing Tools
^ABS_Temp_220_250
^ABS_Temp_220_250
^Current_Tools 1-ABS
^2-ABS
^3-ABS
^Shut off old tools
{IF NEWTOOL=1}M204 S0 P1
{IF NEWTOOL=1}M304 S0 P1
{IF NEWTOOL=2}M104 S0 P1
{IF NEWTOOL=2}M304 S0 P1
{IF NEWTOOL=3}M104 S0 P1
{IF NEWTOOL=3}M204 S0 P1
^Turn on new tool
^set a P1 preheat without wait
{IF NEWTOOL=1}M104 S220 P1
{IF NEWTOOL=1}M104 S250 P1
{IF NEWTOOL=2}M204 S220 P1
{IF NEWTOOL=2}M204 S250 P1
{IF NEWTOOL=3}M304 S220 P1
{IF NEWTOOL=3}M304 S250 P1
^Move the printhead to the priming bay
{IF NEWTOOL=1}G1 X108.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=1}G1 X108.000 Y161.000 [current_Z_position] F9000.0
{IF NEWTOOL=1}G1 X108.000 Y157.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y161.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y157.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y161.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y157.000 [current_Z_position] F9000.0
^Set temp to target temp
{IF NEWTOOL=1}M104 S250
{IF NEWTOOL=2}M204 S250
{IF NEWTOOL=3}M304 S250
^Perge on the new tool 250 spans at a rate of 50
M55[new_tool] P250 S50
^Retract the plastic
M103
^Pause for 5 seconds
G4 P5
^Clean the print head
{IF NEWTOOL=1}G1 X108.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=1}G1 X108.000 Y161.000 [current_Z_position] F9000.0
{IF NEWTOOL=1}G1 X108.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=1}G1 X108.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y161.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y161.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y136.000 [current_Z_position] F9000.0
^set the overall flow control
M108 S20
^ToolChange Finished
^Set the cooling fan to 100pct
M106 100
Attachments
CubeProTrio.factory
(1.18 MiB) Downloaded 222 times

JoeJ
Posts: 1435
Joined: Sun Feb 16, 2014 10:52 am

Re: Scripting placeholder not working

Thu Jul 09, 2015 6:55 am

I believe there were some changes to this in v3. Try [current_position_z] instead.

mmcginnis9272
Posts: 18
Joined: Fri Jun 26, 2015 5:44 pm

Re: Scripting placeholder not working

Thu Jul 09, 2015 7:16 am

JoeJ wrote:I believe there were some changes to this in v3. Try [current_position_z] instead.
I just tried changing all instances of [current_Z_position] to [current_position_Z] and it does the same thing. The placeholder is not being converted to the Z position.

JoeJ
Posts: 1435
Joined: Sun Feb 16, 2014 10:52 am

Re: Scripting placeholder not working

Thu Jul 09, 2015 9:44 am

Maybe it's case sensitive. Make sure you are trying [current_position_z] in all lowercase.

mmcginnis9272
Posts: 18
Joined: Fri Jun 26, 2015 5:44 pm

Re: Scripting placeholder not working

Thu Jul 09, 2015 12:17 pm

JoeJ wrote:Maybe it's case sensitive. Make sure you are trying [current_position_z] in all lowercase.
That was the problem. The 'z' had to be lower case. so the working placegolder is [current_position_z].... just like you said.
Thanks for your help.

MichaelHerron
Posts: 112
Joined: Mon Mar 16, 2015 2:36 pm

Re: Scripting placeholder not working

Thu Jul 09, 2015 3:34 pm

mmcginnis9272 wrote:So I have a CubePro Trio with the following in the Tool Change Script. When the Final .gcode is created, everywhere that [current_Z_position] apears, it is not being converted to the z position. The string [current_Z_position] remains in the gcode. Is there a trick to getting Simplify 3D to actually convert the placeholder into the Z value? I have attached my Factory file as well.

Code: Select all

^Changing Tools
^ABS_Temp_220_250
^ABS_Temp_220_250
^Current_Tools 1-ABS
^2-ABS
^3-ABS
^Shut off old tools
{IF NEWTOOL=1}M204 S0 P1
{IF NEWTOOL=1}M304 S0 P1
{IF NEWTOOL=2}M104 S0 P1
{IF NEWTOOL=2}M304 S0 P1
{IF NEWTOOL=3}M104 S0 P1
{IF NEWTOOL=3}M204 S0 P1
^Turn on new tool
^set a P1 preheat without wait
{IF NEWTOOL=1}M104 S220 P1
{IF NEWTOOL=1}M104 S250 P1
{IF NEWTOOL=2}M204 S220 P1
{IF NEWTOOL=2}M204 S250 P1
{IF NEWTOOL=3}M304 S220 P1
{IF NEWTOOL=3}M304 S250 P1
^Move the printhead to the priming bay
{IF NEWTOOL=1}G1 X108.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=1}G1 X108.000 Y161.000 [current_Z_position] F9000.0
{IF NEWTOOL=1}G1 X108.000 Y157.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y161.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y157.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y161.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y157.000 [current_Z_position] F9000.0
^Set temp to target temp
{IF NEWTOOL=1}M104 S250
{IF NEWTOOL=2}M204 S250
{IF NEWTOOL=3}M304 S250
^Perge on the new tool 250 spans at a rate of 50
M55[new_tool] P250 S50
^Retract the plastic
M103
^Pause for 5 seconds
G4 P5
^Clean the print head
{IF NEWTOOL=1}G1 X108.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=1}G1 X108.000 Y161.000 [current_Z_position] F9000.0
{IF NEWTOOL=1}G1 X108.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=1}G1 X108.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y161.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=2}G1 X118.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y161.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y136.000 [current_Z_position] F9000.0
{IF NEWTOOL=3}G1 X128.000 Y136.000 [current_Z_position] F9000.0
^set the overall flow control
M108 S20
^ToolChange Finished
^Set the cooling fan to 100pct
M106 100
The good news with 3.0 is that you may not need any of this code anymore! Enabling the priming pillar on the cubepro should eliminate all of the tool-change wierdness that required all of this code.

mmcginnis9272
Posts: 18
Joined: Fri Jun 26, 2015 5:44 pm

Re: Scripting placeholder not working

Thu Jul 09, 2015 6:56 pm

MichaelHerron wrote:
The good news with 3.0 is that you may not need any of this code anymore! Enabling the priming pillar on the cubepro should eliminate all of the tool-change wierdness that required all of this code.
Seriously!? <said with both anger and excitment>

That would be cool..... <as I stare in to trash can at all the wasted jobs and filament lying there as I consider all of the wasted days I've spent on this.....>

Return to “Troubleshooting and Bug Reports”