Jump to content

Simplify3D hidden / undocumented Placeholders for post-processing scripts


neotko

Recommended Posts

Posted (edited) · Simplify3D hidden / undocumented Placeholders for post-processing scripts

Hi,

I posted this on S3D forum, but seems that the moderators don't want this posted (It's been 2 weeks) so, well.

Just in case someone it's interesting on doing something more advanced on the scripts tool change or just any area in general that allows scripts in Advanced, there are quite a bunch of placeholders that work and that ain't documented anywhere.

[toolchange_retract_distance]

[toolchange_prime_distance]

[retract_distance]

[prime_distance]

[retract_speed]

[travel_speed]

[current_position_x]

[current_position_y]

[current_position_z]

[next_position_x]

[next_position_y]

[next_position_z]

[previous_direction_x]

[previous_direction_y]

[previous_direction_z]

[next_direction_x]

[next_direction_y]

[next_direction_z]

[average_direction_x]

[average_direction_y]

[average_direction_z]

{MATH } <-- This one I have not been able to make it work, probably it's not active atm and might work on latter versions.

I got all the placeholders editing in hex the app file.

Example of stuff that you can do with this:

G0 Z100 ; Move Z to another position

G0 [currect_position_z] ; Restore correct position

(this adding more stuff in the middle it's how I'm doing my hotend wiper.

You could also send info to the ulticontroller on Layer change script area:

M117 [current_position_z] etc etc etc

The most interesting for me it's the MATH, but I had zero success in making it work.

I posted this on S3D forum https://forum.simplify3d.com/viewtopic.php?f=8&t=3550 it's hidden, because S3D forum it's worse than... Crap? :)

Edited by Guest
  • Like 4
Link to post
Share on other sites

Posted · Simplify3D hidden / undocumented Placeholders for post-processing scripts

Other posible placeholders, that I haven't test:

[fan_speed_percentage][fan_speed_pwm][bed0_temperature][bed1_temperature][bed2_temperature][bed3_temperature][bed4_temperature][bed5_temperature]#[extruder0_temperature][extruder1_temperature][extruder2_temperature]

  • Link to post
    Share on other sites

    • 11 months later...
    Posted · Simplify3D hidden / undocumented Placeholders for post-processing scripts

    For scripting, in addition to NEWTOOL you can just use TOOL

    ie

    {IF TOOL = 1}G1 ASDF

    {IF TOOL=0}G1 not ASDF

    Found this helpful for custom mixing extruder profile.

  • Link to post
    Share on other sites

    • 1 year later...
    Posted · Simplify3D hidden / undocumented Placeholders for post-processing scripts

    Hello Any news on this topic?

    I mean, does S3D 4.0 have these same placeholders?

    Is there some way to get the temperature at current layer to make a tool change script?

    Thanks

  • Link to post
    Share on other sites

    Posted · Simplify3D hidden / undocumented Placeholders for post-processing scripts

    I found this in 4.0 app

     

    [toolchange_retract_distance]

    [toolchange_prime_distance]

    [retract_speed]

    [travel_speed]

    [current_position_x]

    [current_position_y]

    [next_position_x]

    [next_position_y]

    [next_position_z]

    [previous_direction_x]

    [previous_direction_y]

    [previous_direction_z]

    [next_direction_x]

    [next_direction_y]

    [next_direction_z]

    [average_direction_x]

    [old_tool]

    [new_tool]

    [toolchange_retract_speed]

    [extruder0_temperature]

    [extruder1_temperature]

    [extruder2_temperature]

    [extruder3_temperature]

    [extruder4_temperature]

    [extruder5_temperature]

    [bed0_temperature]

    [bed1_temperature]

    [bed2_temperature]

    [bed3_temperature]

    [bed4_temperature]

    [bed5_temperature]

    [total_filament_used]

    [extruder0_filament_used]

    [extruder1_filament_used]

    [extruder2_filament_used]

    [extruder3_filament_used]

    [extruder4_filament_used]

    [extruder5_filament_used]

    [total_filament_weight]

    [extruder0_filament_weight]

    [extruder3_filament_weight]

    [extruder4_filament_weight]

    [extruder5_filament_weight]

    [total_filament_cost]

    [extruder0_filament_cost]

    [extruder1_filament_cost]

    [extruder2_filament_cost]

    [extruder3_filament_cost]

    [extruder4_filament_cost]

    [extruder5_filament_cost]

    [total_print_time_sec]

    [build_size_x]

    [build_size_y]

    [build_size_z]

    [total_layer_count]

    [fan_speed_percentage]

    [progress]

    [current_Z_position]

    [current_layer]

    • Like 1
    Link to post
    Share on other sites

    Posted · Simplify3D hidden / undocumented Placeholders for post-processing scripts
    12 hours ago, pieri70 said:

    I found this in 4.0 app

     

    Bel lavoro Pieri70! These extruder[K]_filament_used are interesting, but in my opinion the most interesting are those with the = => =< and other simbols after the placeholders.

    @neotko posted some screenshots some time ago, I tried to use some of those but without results, without a serious documentation it is quite hard to improve the profiles and the prints.

    • Like 1
    Link to post
    Share on other sites

    Posted · Simplify3D hidden / undocumented Placeholders for post-processing scripts

    I recently discovered another thing by trial and error...you can do logic operations with "&&" and also inequalities work. For example:

    {IF NEWTOOL=1 && [current_layer] = 1}  Gxxxx whatever Gcode you want, will be inserted only if both conditions are met.  I didn't try || as a logical "OR" operator, but I would guess if && works then || also works.   Also, inequalities do work, for example:

     

    {IF NEWTOOL=1 &&  [current_layer] < 10}  Gxxxx

     

    Also, I tried several ways of referencing the Primary Layer Height, and struck out on all of them.  I don't know if that exists as a variable, but I can tell you these are NOT valid variables: [primary_layer_height];  [layer_height]; [first_layer_height]; [prime_layer_height]; [layer_height_z]; [delta_z] (OK clearly I was getting desperate here).   

     

     

     

     

    • Thanks 1
    Link to post
    Share on other sites

    Posted · Simplify3D hidden / undocumented Placeholders for post-processing scripts

    I discovered something else very bizarre.   MERELY REFERENCING A VARIABLE NAME CAN ALTER THE GCODE.   In other words, you might think that if your toolchange_prime_distance is a certain number, then you can type that number, or type [toolchange_prime_distance], and either way, that number will get inserted into the Gcode.   And that generally works for that immediate variable reference.  BUT ...it can cause the slicer SW to behave differently later.  In other words, it "remembers"  the fact that it resolved the variable name, and that memory might cause it to do something else.   

     

    In my particular case, referencing [toolchange_prime_distance] caused the software to believe that it had done a prime movement.  If I merely put G1 E12 for example, this was not "remembered" as a prime movement.  But if I put equivalently G1 E[toolchange_prime_distance}, then the software counted this as a prime movement, and behaved differently later (in my case, deleting a different, later prime movement).

     

    The whole sad story is posted here:

    https://forum.simplify3d.com/viewtopic.php?f=9&t=12966&p=49691#p49691

     

    So - beware variable names.  They are useful, but you have to verify they aren't messing up anything.  The only way I know to do that is case-by-case, generate Gcode with and without the variable name and compare them.  

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 18 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...