Hello Guest it is October 22, 2019, 09:45:34 PM

Author Topic: how to avoid T/M commands execution delay  (Read 8182 times)

0 Members and 1 Guest are viewing this topic.

Offline nik

*
  •  69 69
    • View Profile
Re: how to avoid T/M commands execution delay
« Reply #10 on: March 08, 2013, 03:14:04 PM »
I dont think there is much difference in versions, if absolutely no delay as you say then a G code with 20 lines only M8/M9 should be executed instantly.....

just checked:

M8
M9
...
...
(20 times m8 and 20 times m9 total)
M02
M30

this G code is executed for 6 seconds

T0101
T0202
T0303
.....
(20 tool changes total)
M02
M30

also executed for 6 seconds

I just counted in my G code I have total around 23 M commands (including tool changes/coolant/spindle) which mean this is roughly 6 seconds delay caused my M commands
« Last Edit: March 08, 2013, 03:31:13 PM by nik »

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: how to avoid T/M commands execution delay
« Reply #11 on: March 08, 2013, 05:20:45 PM »
We noticed the delay working with plasma cutting. Brian fixed the M3/M5 for verion .067.
Can't say about the rest of the Mcodes.

Just a thought, (;-) TP

Offline nik

*
  •  69 69
    • View Profile
Re: how to avoid T/M commands execution delay
« Reply #12 on: March 08, 2013, 06:11:56 PM »
I tried 2 other versions after mine, but they dont work on my motherboard, some driver issues, Im not sure but parallel is not working
if he can confirm that all M codes are fixed I can change the PC and use the last version
I hope he will read that

Offline nik

*
  •  69 69
    • View Profile
Re: how to avoid T/M commands execution delay
« Reply #13 on: March 08, 2013, 06:45:16 PM »
just tested with latest version 066 and also do delay on m8/m9/tool change so it look like not fixed :(
ooops you are talking for 067 which is not lock down yet.... Im going to test it now...
« Last Edit: March 08, 2013, 06:54:51 PM by nik »

Offline nik

*
  •  69 69
    • View Profile
Re: how to avoid T/M commands execution delay
« Reply #14 on: March 08, 2013, 07:08:06 PM »
unfortunately exactly same with 067 :(
Re: how to avoid T/M commands execution delay
« Reply #15 on: March 08, 2013, 09:14:35 PM »
ah, ok did some testing and foud the delay you talking about. 0.166 sec. per M8/M9 in my case
you can reduce the delay about 33% creating e.g M800 and M900  to turn coolant on/off
or about 85 % by using a brain.

Alex

Offline nik

*
  •  69 69
    • View Profile
Re: how to avoid T/M commands execution delay
« Reply #16 on: March 09, 2013, 05:47:25 AM »
I cant find any documentation about brains
I made a brain by using LED as input but same delay, I cant find anything about local variables or what can I use for input
what about tool change delay? actually my lathe do not physically change the tools, they are next to each other on X axis so just need to load compensations from tool table without delay
thanks
Re: how to avoid T/M commands execution delay
« Reply #17 on: March 09, 2013, 10:06:58 PM »
Have tried a few things and have found out the delay for the T command is also about 0.166 sec.
I doent read brains documentation, i did that learning by doing.
You can't use a LED in the Brain, because you have to turn it on from your G code with a M command and then you will have the delay.
Let the Brain " watch " for an Axis position. This works here. I activated the B axis. Tuned it to 100 Steps per Unit Max Vel  Max Accel.
You can use G10 to shift your tool without delay. ( easy if you have a gang tool lathe ) all other things have the same delay ( G52 , G54 ...)


T0101
M3 S3000
G0 Z20
G10 L1 P1 X#520 Z#521 ; shift to the next tool
X10
Z-5
G0B1      ; Coolant on
G1 X9 F500
Z-20
X8
Z15
G0B0      ; Coolant off
G0 X10
Z20
M30

or something like this

T0101
M3 S3000
G0 Z[20+#511]
X[20+#510]
Z[-5+#511]
G0B1      ; Coolant on
G1 X[9+#510] F500
Z[-20+#511]
X[8+#510]
Z[15+#511]
G0B0      ; Coolant off
G0 X[10+#510]
Z[20+#511]
             ; next tool
G0 Z[20+#521]
X[20+#520]
Z[-5+#521]
G0B1      ; Coolant on
G1 X[9+#520] F500
Z[-20+#521]
X[8+#520]
Z[15+#521]
G0B0      ; Coolant off
G0 X[10+#520]
Z[20+#521]
M30

Alex

Offline nik

*
  •  69 69
    • View Profile
Re: how to avoid T/M commands execution delay
« Reply #18 on: March 10, 2013, 07:21:03 AM »
wow
this is really "out of the box" approach
I will try it soon but I guess it will work, thank you very much for your help

about the tool change - yes it is gang tool lathe, but I wanted to show me the tool number, because some time I stop the program in the middle, then move away manually, select tool manually, move again, make adjustments in G code or tool offset and star over, which using G10 is a bit complicated, but I will think again about that if it is worth
I really appreciate your help, usually nobody care about any software issues







Offline nik

*
  •  69 69
    • View Profile
Re: how to avoid T/M commands execution delay
« Reply #19 on: March 10, 2013, 08:39:49 AM »
yes, it is working, coolant on/off executed instantly, only the relay click with a delay, I think longer than before, but that is not a problem at all
that was just a test G code only on/off where normally 0.166 seconds delay

in the real G code where 4 times coolant is used now is executed 3 seconds faster
and another G code where 6 times coolant is used now is executed 5 seconds faster !!! 13% faster !!!

this is only coolant modified, it is so good and Im going to think for the tool change now....

is there any other way(except G10) to change tools, without delay? actually only tool number must be changed and load tool compensations, it is gang tool lathe
thanks

PS:
it look like M3/4/5 execution is not fixed in version 067 and also cause delays
what can I do for spindle start/stop without delay in M commands, step/dir servo motor spindle is used
thanks
« Last Edit: March 10, 2013, 08:45:47 AM by nik »