NoisyBoy1308
Posts: 12
Joined: Tue Jul 25, 2017 11:51 am

Postprocessing command does not work

Hello everybody.
I want to use the following postprocessing commands, but they are ignored by s3d.

{TOOL0REPLACE "G1 E-4.0000 F6000\n" "T3\n G10\n T0\n"}
{TOOL0REPLACE "G1 E0.0000 F6000\n" "T3\n G11\n T0\n"}
{TOOL0REPLACE "G1 E0.0000 F1800\n" "T3\n G11\n T0\n"}

If I use "REPLACE" instead of "TOOL0REPLACE" it works fine.
What am i doing wrong?

Basicly I try to switch to 4th extruder (which is virtual) , do a firmware Retract and switch back to the previous tool.

Thanks for help in advance,
Philipp
24c
Posts: 21
Joined: Thu Jan 04, 2018 2:37 pm

Re: Postprocessing command does not work

Is it because you are adding a T0, as I'm sure if you do

Code: Select all

{TOOL0REPLACE "G1 E-4.0000 F6000\n" "T3\n G10\n"}
this will work

Another trick I learnt, if you want to invoke an event before a Tool Change in a Tool Change Script add a value like this "XXXX"

Code: Select all

XXXX
G1 B0
T[new_tool]
and then use a post process like this

Code: Select all

{TOOL0REPLACE "XXXX" "G1 D-3 F2000\n"  ; before using T1, retract  filament in T0
{TOOL1REPLACE "XXXX" "G1 E-3 F2000"  ; before using T0, retract filament in T1
and your gcode becomes

Code: Select all

G1 D-3 F2000
G1 B0
T1
I had to use this technique, as I was post processing before this with this line

Code: Select all

{TOOL0REPLACE " E" " D"}	;post process E values to Robox required D values
and if I didn't use this trick, and just put this in the tool change or retraction script it would have converted the retraction on D to E again on post processing. Maybe there are better ways, but it worked for me, and I struggle with the documentation and help on here...sorry.
NoisyBoy1308
Posts: 12
Joined: Tue Jul 25, 2017 11:51 am

Re: Postprocessing command does not work

Yeah, Thank you very much. This does work.
But i encounter another Problem. Is it possible to execute a perl Script as Post processor?
arhi
Posts: 480
Joined: Thu Oct 06, 2016 5:13 pm

Re: Postprocessing command does not work

NoisyBoy1308 wrote:But i encounter anthrazit Problem. Is it possible to execute a perl Script as Post processor?
yes. I call my gcodestat for postprocessing, just go to "Scripts" tab, and change "additional terminal commands for postprocessing".
for example my content of that field is:

Code: Select all

e:\path\to\gcodestat\gs.bat "[output_filepath]" 
so the [output_filepath] will be replaced with where s3d saves the file, after file is saved it will execute this script giving it the path to file and then you can process it and save over it or on other place.

it unfortunately works only "on save" so you can't just slice and play from s3d (I don't play from s3d 'cause I can't have my computer be stuck running print so I use gcodestat to also send the processed file to octoprint ) but if you have you can then load saves g-code file and play it from s3d .. additional step but..
gcodestat integrates with Simplify3D and allow you to
Calculate print time accurately (acceleration, max speed, junction deviation all taken into consideration)
Embed M117 codes into G-Code
Upload your G-Code directly to Octoprint
open source and unlicence
NoisyBoy1308
Posts: 12
Joined: Tue Jul 25, 2017 11:51 am

Re: Postprocessing command does not work

That sounds good. But i cant get it to work.
i use the Code

Code: Select all

perl D:\new1.pl "[output_filepath]"
but it is ignored. If i start it manually with

Code: Select all

perl D:\new1.pl d:\klint.gcode
it runs through perfectly and does exactly what I want. so the script is working.
arhi
Posts: 480
Joined: Thu Oct 06, 2016 5:13 pm

Re: Postprocessing command does not work

give it full path to perl.exe
gcodestat integrates with Simplify3D and allow you to
Calculate print time accurately (acceleration, max speed, junction deviation all taken into consideration)
Embed M117 codes into G-Code
Upload your G-Code directly to Octoprint
open source and unlicence

Return to “Troubleshooting and Bug Reports”