sub on timer

More
14 May 2015 16:10 #58667 by albova
sub on timer was created by albova
hi
is it possible, during a long program, to perform a subroutine every 15 minutes and then resume the program from the point where it left off?
My intention is to control the length of the tool during machining with a probe and if everything is ok resume processing.
thanks
Alessandro

Please Log in or Create an account to join the conversation.

More
14 May 2015 17:35 #58668 by BigJohnT
Replied by BigJohnT on topic sub on timer
Not to easy to do based on time but simple to put a subroutine call in your G code and chosen places.

JT

Please Log in or Create an account to join the conversation.

More
14 May 2015 17:47 #58669 by albova
Replied by albova on topic sub on timer
hi
with gcode can not do it, the process involves writing and the machine works for hours.
The timer is the only solution. If there is a method, I can try even if complicated.
thanks
Alessandro

Please Log in or Create an account to join the conversation.

More
14 May 2015 17:57 #58670 by BigJohnT
Replied by BigJohnT on topic sub on timer
The problem using a timer (classicladder has the only timer) is you can't just interrupt the G code from the outside. The planner reads in G code and may be several steps ahead of the actual machine. The only way to call a subroutine is from within the G code. If your G code is generated with CAM software then you can change the post processor to insert the subroutine call at chosen points. Of course knowing more about your machine and how you generate G code will lead to better answers.

JT

Please Log in or Create an account to join the conversation.

More
14 May 2015 19:31 #58677 by andypugh
Replied by andypugh on topic sub on timer

hi
with gcode can not do it, the process involves writing and the machine works for hours.
The timer is the only solution.


I don't think that the timer is a solution at all. because I don't think that it can work.

It is relatively easy to stop the program after a fixed time. But how do you start it again?

I do have one idea: You could write a filter-file that runs through the G-code summing up the movement distances and fed rates. After a predefined estimated time it could insert a subroutine call in the G-code.
It is relatively easy to automatically run a filter file on every G-code file as it is loaded.
www.linuxcnc.org/docs/html/config/ini_co...l#sub:FILTER-Section
The following user(s) said Thank You: BigJohnT

Please Log in or Create an account to join the conversation.

More
15 May 2015 00:05 #58693 by albova
Replied by albova on topic sub on timer
hi
your idea is good
I understand the section filter but do not understand what kind of program put.
Moreover, I could work only on the distance traveled, but I need some more explanation.
regards
Ale

Please Log in or Create an account to join the conversation.

More
15 May 2015 00:47 #58696 by BigJohnT
Replied by BigJohnT on topic sub on timer
You could write the program in just about any language. For me it would be Python. I'd open the file then parse it line by line and insert the sub where it needed to be.

A sample is in the manual.

linuxcnc.org/docs/html/config/ini_config...l#sub:FILTER-Section

JT

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum