Hello Guest it is April 19, 2024, 05:57:48 PM

Author Topic: Developing new macropump, faster way to retest?  (Read 12763 times)

0 Members and 1 Guest are viewing this topic.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #10 on: June 14, 2010, 07:20:11 PM »
I use Scott Schaefers MachMad plugin to watch a user LED and when it sees the LED it will trigger a macro. I also need to have a Brain to look at the OEMTrigger and when its seen switch the User LED on.
Bit clunky but works well for the custom start button and Ref All button and a few others that I use on my machines.
Rev4 of Mach will hopefully support this type of thing natively.
Hood

Offline Zaae

*
  •  120 120
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #11 on: June 14, 2010, 07:32:24 PM »
I'll have to look into that, do you think MachMad will still trigger if the LED being watched isn't on the current screen?

Also, why is it, when I read your posts, I read them in my head with a Scottish accent?  :D

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #12 on: June 14, 2010, 07:42:54 PM »
Ye dinnae need LEDs at a on ony screen, ye  just hae the brain switch it an the plugin spies it.

Now you can say it with a real Scottish accent ;D

Just in case you didnt get what I said it is.
You dont need the LEDs on any screen, the brain switches it on when it sees an OEM trigger and the Plugin sees the LED and triggers the macro.

Hood

Offline Zaae

*
  •  120 120
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #13 on: June 14, 2010, 07:51:17 PM »
Thanks for the help, Hood, I appreciate it.

I read through the post about MachMAD and decided to order it, what's to lose at $10 ?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #14 on: June 14, 2010, 07:55:02 PM »
The plugin does a lot more than I use it for but for me the trigger macro is worth the cost alone.

Hood

Offline Tweakie.CNC

*
  • *
  •  9,198 9,198
  • Super Kitty
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #15 on: June 15, 2010, 02:31:07 AM »
Hi Zaaephod,

Quote
No problem. I do have another question though, is there a way to trigger a script when an input goes high?

This thread, I think, answers your question here.

http://www.machsupport.com/forum/index.php/topic,918.0.html

Tweakie.
PEACE

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #16 on: June 15, 2010, 07:39:28 AM »
You basically have 2 choices for monitoring mach functions. The macropump or the brains.

The macropump has more functionality but the brains are faster and take up less cpu time.

Offline Zaae

*
  •  120 120
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #17 on: June 15, 2010, 09:22:43 AM »
Thanks guys :)

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Developing new macropump, faster way to retest?
« Reply #18 on: June 17, 2010, 04:49:37 AM »
No problem. I do have another question though, is there a way to trigger a script when an input goes high?
Triggers do exactly this but unfortunately IMHO are not very well documented nor particularly intuitive in the way they're implemented. I think this is why we see a lot of macropumps monitoring inputs and it's just not the best way to do it - again just MHO. The link Tweakie's pointed at covers it but makes a bit of a meal of it I think. Here's a quick guide.

Let's assume you want three active input pins to fire 3 different actions.
1) In ports n pins set up your pin assignments for OEM trigger #1, #2, #3.
2) in Config/system hotkeys set Trigger # OEM code to 301 for all three triggers.
3) Create a macro e.g. M665.m1s with the one line of SetTriggerMacro(666) Note: any free numbers you like will do for 665 and 666.
4) Add M665 preceeded by a space to the initialization string on the Config/General Config page
5) Now the buisness end - Create macro M666.m1s - something like:

If isActive(OEMTRIG1) Then
  message "trig 1"
End If

If isActive(OEMTRIG2) Then
  message "trig 2"
End If

If isActive(OEMTRIG3) Then
  message "trig 3"
End If

Now when you activate the appropriate input pins you'll get the appropriate message. Change M666.m1s to suit.

Hope this helps

Cheers

Ian

Offline Tweakie.CNC

*
  • *
  •  9,198 9,198
  • Super Kitty
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #19 on: June 17, 2010, 05:25:08 AM »
Excellent Ian - nice, concise explanation.

Tweakie.
PEACE