Stop and restart program

More
10 years 10 months ago #66202 by albova
Replied by albova on topic Stop and restart program
Hi,
the command (DEBUG, # <_line>) works correctly in the main gcode
obviously it does not work in sub but solve my case.
many thanks to all for the help
Alessandro

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

More
10 years 10 months ago #66206 by andypugh
Replied by andypugh on topic Stop and restart program

albova wrote: the command (DEBUG, # <_line>) works correctly in the main gcode
obviously it does not work in sub but solve my case.


In that case, you could replace every call to the sub
Code:
O<ctrl_tool> CALL
with
Code:
O<ctrl_tool> CALL [#<_line>]
Then in the sub
Code:
O<ctrl_tool> SUB (DEBUG, subroutine called by line #1)

ie, pass the number of the calling line to the subroutine. You could extend this to suggest a spindle speed to set before restart too,

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

More
10 years 10 months ago #66207 by albova
Replied by albova on topic Stop and restart program
Hello
the system works
to restore the speed of work I thought of using the mdi simply entering "Fxxx" , but when I restart the program "run from here", do not seem to have it loaded
Fxxx command is not read by the operator mdi?
regards

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

More
10 years 10 months ago #66208 by andypugh
Replied by andypugh on topic Stop and restart program
I wonder if M70 is any help in your situation?

linuxcnc.org/docs/2.7/html/gcode/m-code.html#mcode:m70

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

More
9 years 5 months ago #93444 by albova
Replied by albova on topic Stop and restart program
hi to all,
Resuming this discussion.
I entered the M30 interruption in the sub control tool (ctrlut).
I know, you should not do this, but it seems to work.
The code is this:
o<ctrlut> sub
o300 if [#100 gt #200]
#100=0
g53 z0
m5
g4 p 3
g53 g0 x11 y-21 z0 (si alza fino a z zero macchina)
g0 z[#31+0.5] (si sposta in rapido fino a 2mm sopra lo zero utensile nuovo)
g38.2 z[#31-#35-1.0] f20 (esegue il controllo con max -1mm)
; (DEBUG,5063 = #5063)
#32=#5063 (#32 misura rilevata dal tastatore)
#33=[#31-#32] (#31 zero utensile nuovo su tastatore)
#34=[#32-#31] (#33 e #34 differenze positive e negative)
(nel caso del #34 si controlla che il motore z non )
(si sia spostato in basso rispetto allo zero macchina)
; (DEBUG,31 = #31)
; (DEBUG,32 = #32)
; (DEBUG,33 = #33)
; (DEBUG,34 = #34)


o200 if [#33 gt #35] (#35 tolleranza impostata per controllo utensile)
(DEBUG, FUORI TOLLERANZA -)
(DEBUG,LINEA = #101)
g53 g0z0 (se fuori tolleranza si alza fino a zero z macchina)
M30 <<<<<<=====================================================
o200 endif

o201 if [#34 gt #35] (#35 tolleranza impostata per controllo utensile)
(DEBUG, FUORI TOLLERANZA +)
(DEBUG,LINEA = #101)
g53 g0z0 (se fuori tolleranza si alza fino a zero z macchina)
M30 <<<<<======================================================
o201 endif
g53 g0 z0
m3
g4 p 3
o300 endif
o<ctrlut> endsub
M2

What are the problems that might come out?
regards
Ale

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

Time to create page: 0.247 seconds
Powered by Kunena Forum