Hello Guest it is March 29, 2024, 09:32:50 AM

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

0 Members and 1 Guest are viewing this topic.

Offline Zaae

*
  •  120 120
    • View Profile
Developing new macropump, faster way to retest?
« on: June 14, 2010, 04:53:46 PM »
Like the title says, I'm working on changes to the macropump, but all this restarting mach to test stuff is wearing on my nerves. Is there a faster way to restart the macropump code from inside mach3 without restarting?

Thanks :)

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #1 on: June 14, 2010, 05:08:36 PM »
Afraid not, Mach loads the macropump at startup and it constantly runs, only a restart will load any changes you have made.
Depending on your macropump it may be possible for you to test by stepping through the code in the VB window or even just clicking the run arrow.

Hood

Offline Zaae

*
  •  120 120
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #2 on: June 14, 2010, 06:04:34 PM »
Solved. Wrote an autohotkey script to restart :)

Thanks

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #3 on: June 14, 2010, 06:06:21 PM »
Solved. Wrote an autohotkey script to restart :)

Thanks

To restart Mach or to somehow reload the macropump? If the latter care to share ;)
Hood

Offline Zaae

*
  •  120 120
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #4 on: June 14, 2010, 06:13:15 PM »
Autohotkey is a freebie macro program I've come to love. All it does is restart mach, but it takes care of the "are you sure?" menu, the restart, and the profile choice screen at the beginning. Still have to wait for mach to restart though.

Even so, Autohotkey is worth looking into for people who like to automate things, and aren't afraid of code. Everything it does is scripted, but it's extremely flexible, and can interact with most windows forms without the messy automated mouse clicking strategy.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #5 on: June 14, 2010, 06:20:58 PM »
Ah ok, thanks for the info, worth looking into :)
Hood

Offline Zaae

*
  •  120 120
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #6 on: June 14, 2010, 06:31:45 PM »
No problem. I do have another question though, is there a way to trigger a script when an input goes high?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #7 on: June 14, 2010, 06:51:30 PM »
Not really sure what you mean but maybe this?

If IsActive (Input1) Then
Code("M1234")
End If

Hood

Offline Zaae

*
  •  120 120
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #8 on: June 14, 2010, 07:02:51 PM »
Sorry, I should have been more clear. I meant to actually run a separate macro file, but to somehow have it triggered by an input going high. Maybe I'm being too conservative when it comes to putting code into the macro pump. I don't have any loops or anything in there, but I'm aware that since that code is run all the time, it could eventually affect performance. I have some code that runs when the digitize signal goes high, but I was hoping to get it out of the macropump code.

Offline Zaae

*
  •  120 120
    • View Profile
Re: Developing new macropump, faster way to retest?
« Reply #9 on: June 14, 2010, 07:05:50 PM »
Also, since the machines are running in the shop, and I'm usually in the office, I run a series of video monitors. I was considering things like, writing to a file when it's time for a blade / program change, current program line, etc. Something that I could read at regular intervals from different pc's on the network to get info about the machines.