while-loop to track temperature
-
@Jojo-0 for example you could use job.file.fileName however note that this is only valid if there is a job being executed.
for example (untested)
while global.logtemps ==true && job.file.fileName != null echo >>{"0:/sys/templog_"^job.file.fileName^".csv" {state.time}^.....etc G4 S1
not sure if that comparison with null will work. also make sure there are no spaces in your file names.
-
@T3P3Tony Thank you for your support!!!
I tried it that way, but the there is an error with the combination of the folder and the filename.
The file is just called "templog_"I tried different ways to skip that, but the only thing worked with job.file.fileName was to name the file exactly same as the job in a text file or to write it into the gcode.
-
I had a typo in the untested example:
Does this work better?
... echo >>{"0:/sys/templog_"^job.file.fileName^".csv"} {state.time}^.....etc ...
Not there is now a closing curly brace after fileName^".csv"}
-
@T3P3Tony
I saw that already, but the problem is that the daemon.g is not able to create or find the folder.Error: Failed to create folder 0:/sys/templog_0: in path 0:/sys/templog_0:/gcodes/2023-8-10-17-21_230808_7_KF-FDM010_D1_KF-FDM010_JB_155_110_MH-Professional-
Error: in file macro line 5 column 57: meta command: Failed to create or open fileFor better understanding:
-
the Job-Name: 2023-8-10-17-21_230808_7_KF-FDM010_D1_KF-FDM010_JB_155_110_MH-Professional-daemonG.gcode
-
the path of the jobs: 0:/gcodes/
-
-
@Jojo-0 ah yes, the job name is the full path so that wont work.
you could try using the state.upTime e.g.:
... echo >>{"0:/sys/templog_"^state.upTime^".csv"} {state.time}^.....etc ...
-
@T3P3Tony
I guess thats no good idea, cause it will create a seperate file for each second -
@Jojo-0 ah yes, store it in a variable at the start of the print and then use that variable throughout the print?
Parsing the filename to remove the directory section is not going to be something we can implement in 3.5 so we need a solution to work around that for now.
-
@T3P3Tony
Just fpound a way to write it into a c-file stored beneath the job with the same name.
So I can transfer it afterward into a excel file.echo >>{job.file.fileName}^".c" {state....
-
@T3P3Tony Is there any possibility to also write the target temperature the nozzle or bed should reach? As example sth like activated temperature?
My goal is to compare the target temperature with the current afterwards.
-
@Jojo-0 check the OM I think there is the set temperature for each tool.
-
@T3P3Tony
okay, thank you.
I'll search there.