Hello Guest it is April 24, 2019, 12:51:11 PM

Author Topic: M3 / M5 execution delay  (Read 6552 times)

0 Members and 1 Guest are viewing this topic.

M3 / M5 execution delay
« on: August 13, 2008, 07:33:25 PM »
I have noted the command pair
M3
M5
takes ca. 600 ms to execute if it controls 'DoSpin CW' 'DoSpin Stop'
and ca. 300 ms if is says 'ActivateSignal (7)' 'DeActivateSignal(7)'
I tested this with printer port mode and with DSPmc and the delay seems to be equal ie. the delay comes from Mach3.

Is there any possibility to make this delay smaller or some other way to give out faster commands from Mach3 R2.63 /XP 1.6G ?

Br. Arto

Offline Hood

*
  •  25,784 25,784
  • Carnoustie, Scotland
    • View Profile
Re: M3 / M5 execution delay
« Reply #1 on: August 13, 2008, 08:10:18 PM »
have a look and see if there is a delay set in your spindle settings.
Hood
Re: M3 / M5 execution delay
« Reply #2 on: August 13, 2008, 08:15:25 PM »
No.

Offline Hood

*
  •  25,784 25,784
  • Carnoustie, Scotland
    • View Profile
Re: M3 / M5 execution delay
« Reply #3 on: August 13, 2008, 09:08:29 PM »
Maybe its just normal, never really noticed it but then again its a lathe I use and wouldnt notice such a small delay unless I was paying attention specifically to it. Will check tomorrow if i get back to the workshop, I am working away and dont know what time I will get finished.
Hood
Re: M3 / M5 execution delay
« Reply #4 on: August 14, 2008, 04:45:29 AM »
So you saw my short video and some hole cutting in there. There are no piercing or end delays in the G-code. Just the M3/M5 delays.

They are not important in lathes or mills. You might think this is not important but please compare these two videos:

This is still not the fastest machine:
http://www.youtube.com/watch?v=80-ZIWDNfIE

And this is what I have now
http://www.youtube.com/watch?v=36wVkDoE9AQ

Can you see my point?

Br. Arto

Offline jimpinder

*
  •  1,233 1,233
  • Wakefield, West Yorks, UK
    • View Profile
Re: M3 / M5 execution delay
« Reply #5 on: August 14, 2008, 09:54:38 AM »
Why not just use a macro to turn on your relay or whatever.

Instead of M3 and M5 use M*** and M*** to turn it on and off. The other alternative is to use the coolant outputs - there is no delay on that (that I know of).

The delay, however, might be due to the visual basic interpreter. What about a brain (which are much quicker)
« Last Edit: August 14, 2008, 09:56:27 AM by jimpinder »
Not me driving the engine - I'm better looking.
Re: M3 / M5 execution delay
« Reply #6 on: August 14, 2008, 12:18:16 PM »
How about using a spare axis

Your machine seems to be two axis "Say X & Y"

So using metric as an example Z is always 0 = M5 Turn Off when Z becomes 0.01 = M3 Turn On

Example cut out square 100x100

G0 Z0 its off
G0 X100 Y100
G0 Z.01 Turns On
G1 X200
G1 Y200
G1 X100
G1 Y100
G0 Z0 Turns Off

You would need some sort of custom electronics to interface with the pulses but people do make there own drivers so it should be possible ?

HTH
Phil_H

The Good Thing About Mach3, Is It's very Configurable

The Bad Thing About Mach3, Is It's Too Configurable
Re: M3 / M5 execution delay
« Reply #7 on: August 14, 2008, 12:31:22 PM »
Ahhh. Do you mean just use the axis Dir pin. Axis + would be on... and Axis - would be off. might work, it would be instantaneous. Good Idea
rc

Hmmm...might not be safe. If it were on, and then hit a limit or EStop, when reset it would still be on..I think.
Better check with the Gurus.


« Last Edit: August 14, 2008, 12:56:14 PM by Overloaded »

Offline Hood

*
  •  25,784 25,784
  • Carnoustie, Scotland
    • View Profile
Re: M3 / M5 execution delay
« Reply #8 on: August 14, 2008, 12:55:38 PM »
Br. Arto
 I hope you didn't think I was saying it was unimportant, I wasn't, I can see exactly why you would need quick execution of these commands. It just so happens that Art has mentioned that he noticed a delay and thinks he can fix it, I mentioned that you had asked about it so hopefully in the next revision it will be cured.
Hood
Re: M3 / M5 execution delay
« Reply #9 on: August 14, 2008, 04:13:26 PM »
Hi All!

Some comments.

1. The delay with M8/M9 is the same as with M3/M4 when I change those to command a output - not saying 'DoSpinCW' etc. That seems to do other things too (spending time). Looks like the IO-handling takes time and the delay is varying from command to command.

2. Using direction line would be instant but I'm using DSPmc which controls AC servo's with analog +-10V signal. Mach pulsing engine is not running. This is also a bit unsecure way to use a 300W cutting laser.

3. About brain output speed I don't have experience.

I could also use a optoswitch in Z-axis to switch laser on and off but I'm not so willing to use such workaround yet. (The machine has 4 axises, X, Y+slave A, Z).
The next thing on my wish list would be a programmable output to give pulsing with frequency f and with ontime t which can be set as a parameter (beam modulation).

Sorry about my rude reply earlier - was written too early in the night (2-3 AM)..   ::)

So. Still wishing miracles with this delay problem :)

***

A bit easier question - is there a good way to limit speed in small radiuses - except acceleration which I´d like to raise?

BR. Arto