Conditional end gcode #1680
Unanswered
Tinchus2009
asked this question in
Q&A
Replies: 2 comments 3 replies
-
while isn't possible as you can't store any value. you have to do something like:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
ok. But then Im making an extra unnecessary coding, because it would be more simple to just write each gcode line with the reduced temperature setting for each step. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. A newbie here in terms of programming.
Im trying to create a conditional gcode so I cand cool down my enclosed heated chamber slowly once the print has finished.
So I was thinking if it is posible to create a loop in order to do this and avoid to have to make it manually.
For example if my heated chamber is at 100 degrees, once print is finished I want to cool it down slowly, 2 degrees each step, each step waiting 4 minutes in each step before reducing the temp 2 more degrees. I tried but failed doing something like this:
while {(chamber_temperature[0] >50)}
M141 P0 S{(chamber_temperature[0] >50)} ? M141 P0 S{chamber_temperature[0] -2} M141 P1 S{chamber_temperature[0] -2} M116 G4 S240 : M141 P0 S0 M141 P1 S0
This is not working. What this code gives me is this gocode:
while true
M141 P0 Strue ? M141 P0 S98 M141 P1 S98 M116 G4 S240 : M141 P0 S0 M141 P1 S0
Anyone can help on creating this code?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions