Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: lfleiva on August 29, 2011, 01:32:30 PM

Title: Queue not refilling... why?
Post by: lfleiva on August 29, 2011, 01:32:30 PM
Hi,
I have this problem: the queue is not refilling while running the g-code. It just empties an then stops movement for a couple seconds refills and continues until the queue empties.  I am using 40 in lookahead.

The machine worked fine until last week, so I though maybe could be a virus or something from Windows so I reinstalled the whole windows and reused the XML file: same thing.  So now I think it must be a configuration somewhere but just can't find it.  I've never seen this behaviour before.

Someone has the answer??

Thanks
Luis
Title: Re: Queue not refilling... why?
Post by: Hood on August 29, 2011, 02:05:59 PM
Attach your xml and maybe the problem can be found.
Hood
Title: Re: Queue not refilling... why? (SOLVED)
Post by: lfleiva on August 29, 2011, 02:16:12 PM
Found the problem!

I have an M-code to remove the menu from screen, so I entered it to the macropump.m1s as a line:
code "M1000"

It turned out this was the problem.
Solved it removing the Code"M1000" and entering the line DoOEMButton(348),  which is the only line in M1000.m1s

Hood, do you know why this happens?

Luis

Title: Re: Queue not refilling... why?
Post by: HimyKabibble on August 29, 2011, 04:06:14 PM
You really should not put something like that into the macropump, as the macropump is executed ~10X/second.  You should not need to execute that command more than once.  The macropump should also NEVER be used for anything that takes any significant time to execute.

Regards,
Ray L.
Title: Re: Queue not refilling... why?
Post by: Hood on August 29, 2011, 04:21:01 PM
If you want that macro to run on startup then add it to the initialisation line on the General Config page.
Hood
Title: Re: Queue not refilling... why?
Post by: lfleiva on August 29, 2011, 07:06:08 PM
I'll do that Hood.
Ray: I do have a sleep(1000) in the macropump so it is not executing that much.
Thanks to both.
Luis
Title: Re: Queue not refilling... why?
Post by: HimyKabibble on August 29, 2011, 09:30:37 PM
You should NEVER put a Sleep into a macropump!  Macropumps are for simple functions that can be completed QUICKLY, and without ANY delay.  Putting a Sleep in completely defeats the purpose, and WILL cause problems.
Title: Re: Queue not refilling... why?
Post by: stirling on August 30, 2011, 05:06:23 AM
Not sure I can see the point of putting this in the init string either. When you turn off the menu it's state is stored in the xml anyway. Once it's off - it's off accross all future sessions - until you turn it back on again.

Ian
Title: Re: Queue not refilling... why?
Post by: Hood on August 30, 2011, 05:11:47 AM
That is true but it may be it is turned on and forgotten to again turn off before  Mach is. If that happened then the next start they would be available and it may be desired that operators can not access them so if its in the initialisation string it will automatically hide them on the reset.
Hood
Title: Re: Queue not refilling... why?
Post by: stirling on August 30, 2011, 05:29:15 AM
A good point well made  :P

Ian
Title: Re: Queue not refilling... why?
Post by: Hood on August 30, 2011, 05:35:26 AM
A good point well made  :P

Ian

Not so sure about that, reading again the punctuation is non existent ;D

I had initially thought the same as you as to why it would thought it needed in the macropump then  thought that would be one reason. Possibly its not but..... well it could be ;D

Hood
Title: Re: Queue not refilling... why?
Post by: stirling on August 30, 2011, 06:01:25 AM
Yes - I wondered if the macropump idea was to turn it off "immediately" if someone knew how to turn it back on via CB. I dismissed that as a "good" idea as I reckon that anyone who knew how to turn the menu on via CB would presumably know how to edit the macropump as well. Anyway that's all academic - as has been said - it's really not a good idea to hose Mach with a constant assault from the macropump.

Ian