CS-Lab Support Forum for CNC Community

Help to run this brand-new forum and stay with us.
Ask your questions, we are here to help! 

 

Forum Navigation
You need to log in to create posts and topics.

Pause remain path time / solved with Version 3.600

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

PARTNERS:

 

USA

Germany

Slovenia / Bosnia

Spain

South Africa

UNI-CAM

The Netherlands

Portugal

Greece

  Distrib milionis logo

Hungary

Distrib logot

Bulgaria

Master

Kenya

Proteq Automation

Egypt

Germanelectronix

China

Jun Ma

Serbia

ALCO

Italy

LVL tech r

Denmark

Varntoft Dania

Finland