joesoap583
Posts: 98
Joined: Sat Mar 08, 2014 11:01 pm

Scripting Nozzle Position

Tue Mar 03, 2020 5:43 am

I know that I can script nozzle positions using [current_X_position], [current_Y_position] and [current_Z_position], but is there a way of scripting those values to set a new position?

For example, if [current_X_position] returned 50 and I wanted to change the position to [current_X_position] + 75, how can that be scripted?

Also, is it possible to script an IF statement which compares [current_X_position] to a know value, and moves [current_X_position] to a set value?
Posting as a private individual - 3D printing is a hobby activity.
Creality CR-10S owner.

S3D-Jake
Posts: 716
Joined: Wed Jun 20, 2018 12:45 pm

Re: Scripting Nozzle Position

Wed Mar 04, 2020 1:23 pm

To move X Y or Z relative to the current X Y or Z positions you can insert a command that will first place the machine in relative movement mode. More on relative vs absolute movement can be found on our gcode tutorial. https://www.simplify3d.com/support/arti ... l/#G90-G91

As for IF statements, you can see the supported IF functionality in this helpful forum post on the scripts tab. viewtopic.php?f=8&t=1959
"A bird does not sing because it has an answer. It sings because it has a song."

Return to “General Discussion and Tips”