Hello Guest it is March 28, 2024, 03:15:46 PM

Author Topic: how to use macropump  (Read 13100 times)

0 Members and 1 Guest are viewing this topic.

how to use macropump
« on: June 12, 2010, 01:30:31 AM »
HI ALL:
     how to use macropump.MLS?Give me a explain.
THANKS
  GYS16435@SINA.COM

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: how to use macropump
« Reply #1 on: June 13, 2010, 04:44:03 AM »
Hi Allen - I was going to point you at the tutorial video for using the macropump but it's way out of date. You may still want to take a look at it though. But here's the basics.

1) write your VB macro
2) save it as macropump.m1s in your profile. (take a look under c:\mach3\macros)
3) Tick (main menu) Config/General Config/Run Macro Pump
4) Restart Mach (you may need to do this a couple of times. I've known Mach to not run it first restart)
Now your VB macro runs automatically when Mach starts. After it finishes, Mach waits 1/10th of a second and runs it again. etc. etc. forever.
A basic rule of thumb - don't use the macropump to command machine movement.
« Last Edit: June 13, 2010, 04:45:34 AM by stirling »
Re: how to use macropump
« Reply #2 on: June 13, 2010, 10:22:43 AM »
Quote
Mach waits 1/10th of a second
are you sure ?

Amir
« Last Edit: June 13, 2010, 10:24:34 AM by manmardam »
**Even a clock that does not work is right twice a day**

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: how to use macropump
« Reply #3 on: June 13, 2010, 11:02:06 AM »
YEP the macropump samples at 10hz or ten times per sec.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: how to use macropump
« Reply #4 on: June 13, 2010, 12:40:03 PM »
are you sure ?
Well according to Art's video - although he says the wait is 1/5th but I think that's changed since he did the vid. If you're asking because of what I told you in your previous thread - I've corrected myself there.

Ian

EDIT: Terry - to be fair not least to myself I think there's a bit of confusion around this not least because Art I think contradicts himself a bit. The general view is that the macropump runs 10 times a second. Well it DOES if the code in the macro lasts less than a 10th. If say the code lasts a second (to take an extreme to make the point), then the better description is that Mach then waits a 10th before running it again. i.e. Mach will not run a second copy of the macro whilst it's still running the existing one.
« Last Edit: June 13, 2010, 12:59:58 PM by stirling »

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: how to use macropump
« Reply #5 on: June 13, 2010, 01:12:22 PM »
HIYA IAN, (;-) Are you sure? I have seen mach skip over code instead of holding until it is done. I have also seen mach HOLD code and run it many cycles later.

But I promised myself not to go there (;-)

Note: I don't think Art envisioned the macro side to used as we have found ways to use it(;-) So it may not have been fully integrated into mach as a realtime function.

JMOP (;-)
« Last Edit: June 13, 2010, 01:18:15 PM by BR549 »
Re: how to use macropump
« Reply #6 on: June 13, 2010, 03:12:29 PM »
Quote
Mach waits 1/10th of a second and runs it again

Quote
ten times per sec.

this two is different.
i think The second case is correct.and mach Will not wait.

Amir
**Even a clock that does not work is right twice a day**

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: how to use macropump
« Reply #7 on: June 13, 2010, 04:50:48 PM »
Terry and Amir - well no I'm not sure. Up until today I allways thought that Mach ran the macropump at 10Hz and therefore the macro - macropump.m1s - was run at 10Hz. (which seems to be the popular opinion). I'd therefore assumed that if macropump.m1s took longer than a 10th of a sec then it seemed logical that there would be "issues" as I've read countless times here on the forum that Mach can't run more than one macro at a time. I know the macropump macro is pre-compiled (I read that here too - maybe that's bollox as well  :-\) as opposed to interpreted at run time but anyway.

With regards this OP I was going to just advise that ALLEN watch the macropump video. But having first checked it was still there and watched a bit myself I decided to not just do that as it's obviously a bit out of date regarding how to turn it on. BUT Art clearly says right at the beginning firstly that the macropump runs 5 times/sec and that if a macro takes longer than a 5th sec then it will finish naturally and then a 5th of a sec later will run it again etc. etc. I assumed the 5th has at some point changed to a 10th. But anyway - take a look at the video. Maybe I've fallen foul of yet another piece of outdated info on Mach but there you go :'( - You guys tell me.

Cheers

Ian
« Last Edit: June 13, 2010, 04:55:04 PM by stirling »

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: how to use macropump
« Reply #8 on: June 13, 2010, 09:18:35 PM »
(;-) That makes 2 of us that really don't have a clue. I was told by Art that it was 10hz BUT he never was clear how it handled a delayed macro. In some functions you have to add a tremendous amount of wait states just to make it happy and that time is well over the 10hz rate.

I have seen evidence that it cycles at 10 hz when it can AND waits on a completed cycle such as while do.  AND I have seen it skip over code and store it????.

I have a feeling it just cycles as fast as it can(code dependant) up to 10hz.

SO it is a DARN good question as to HOW it actuallly works (;-) IF you ever get a clear answer please let us know.
Re: how to use macropump
« Reply #9 on: July 12, 2010, 10:54:11 PM »
THANK ALL THE GUYS!