Quote from
Dobbelju on 12 November 2025, 12:31
Hello!
I am currently trying to adjust the remain path time function in SimCNC.
Is it possible to pause the remain path time running while an macro is running?
Or maybe give an offset of XY seconds/minutes when a macro is called?
Regards
Dobbelju
Edit from patch notes:
Added machine parameter #4290 – adding extra time to the predicted program execution time
It can be used, for example, to add extra time for executing macros in G-code.
thanks!
Edit2:
#Beta - Set Offset to remaining path time
import time
OffsetTime = d.getMachineParam( 4290 ) #get actual Offset Time
# Start time measurement
start_time = time.perf_counter()
print("Turn Material Table to the Outside.")
pos = d.getPosition(CoordMode.Machine) #get actual position of A Axis
a_current = pos[Axis.A.value] #turn the actual A Axis position to a varialbe
if a_current == 0: #check if Material is allready moved to the outside
print("Material is allready at the outside.")
else:
d.executeGCode("G0G53 A0") #move A Axis to 0
print("Material turned to the outside.")
# calculate elapsed time of macro excution in seconds
elapsed_seconds = int(time.perf_counter() - start_time) # calculation elapsed time
AddTime = elapsed_seconds #turn the calculated time to a variable
print(f"AddTime={AddTime} Seconds")
OffsetCalc = OffsetTime + AddTime #add the actual offset time to the total offset time
d.setMachineParam( 4290, OffsetCalc ) #set the newest offset value
As an example macro, with this new added option i can get nearly the exact remaining path time (toolchange times are different depending on pot positions, but this fixed it for me).
Nice addition, also when an customer is asking why the time gets far into minus on bigger nc programs, this comes handy 🙂
regards Dobbelju
Hello!
I am currently trying to adjust the remain path time function in SimCNC.
Is it possible to pause the remain path time running while an macro is running?
Or maybe give an offset of XY seconds/minutes when a macro is called?
Regards
Dobbelju
Edit from patch notes:
Added machine parameter #4290 – adding extra time to the predicted program execution time
It can be used, for example, to add extra time for executing macros in G-code.
thanks!
Edit2:
#Beta - Set Offset to remaining path time
import time
OffsetTime = d.getMachineParam( 4290 ) #get actual Offset Time
# Start time measurement
start_time = time.perf_counter()
print("Turn Material Table to the Outside.")
pos = d.getPosition(CoordMode.Machine) #get actual position of A Axis
a_current = pos[Axis.A.value] #turn the actual A Axis position to a varialbe
if a_current == 0: #check if Material is allready moved to the outside
print("Material is allready at the outside.")
else:
d.executeGCode("G0G53 A0") #move A Axis to 0
print("Material turned to the outside.")
# calculate elapsed time of macro excution in seconds
elapsed_seconds = int(time.perf_counter() - start_time) # calculation elapsed time
AddTime = elapsed_seconds #turn the calculated time to a variable
print(f"AddTime={AddTime} Seconds")
OffsetCalc = OffsetTime + AddTime #add the actual offset time to the total offset time
d.setMachineParam( 4290, OffsetCalc ) #set the newest offset value
As an example macro, with this new added option i can get nearly the exact remaining path time (toolchange times are different depending on pot positions, but this fixed it for me).
Nice addition, also when an customer is asking why the time gets far into minus on bigger nc programs, this comes handy 🙂
regards Dobbelju