Page 1 of 1

Postprocessing command does not work

Posted: Sat Feb 03, 2018 6:30 am
by NoisyBoy1308
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

Re: Postprocessing command does not work

Posted: Mon Feb 05, 2018 1:36 pm
by 24c
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.

Re: Postprocessing command does not work

Posted: Thu Feb 08, 2018 10:21 am
by NoisyBoy1308
Yeah, Thank you very much. This does work.
But i encounter another Problem. Is it possible to execute a perl Script as Post processor?

Re: Postprocessing command does not work

Posted: Thu Feb 08, 2018 11:16 am
by arhi
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..

Re: Postprocessing command does not work

Posted: Fri Feb 09, 2018 5:43 am
by NoisyBoy1308
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.

Re: Postprocessing command does not work

Posted: Fri Feb 09, 2018 10:56 am
by arhi
give it full path to perl.exe