Hello Guest it is April 19, 2024, 03:47:55 AM

Author Topic: Running a Script from a Brain in MACH3 - is this fixed?  (Read 15232 times)

0 Members and 1 Guest are viewing this topic.

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Running a Script from a Brain in MACH3 - is this fixed?
« on: January 08, 2015, 01:04:54 PM »
I read an old thread here which described using 1034 and/or 301 calls but as with the posters in that thread, I cannot get this to work. I followed the  examples exactly with no success,
so I assume it is broken.

Mach ver .66 or .67 does not run the trigger macro using 1034 call nor can I do the OEM Trigger method described.
What does work is setting the trigger macro and running doOEMbutton301 from VB script. This runs the trigger script, but this choice is not on the list of EOM button choices in the Brain editor.

Using a macropump got the task working, but would prefer to trigger a macro from the Brain (initiated via Modbus register).

I'm hoping the methods described in the old thread have been superseded by something new. Can anyone provide a current, functional way tom accomplish this task?
 
Re: Running a Script from a Brain in MACH3 - is this fixed?
« Reply #1 on: January 16, 2015, 10:54:36 AM »
Hi !
just type 301 in the field.
is working here.
Alex

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Running a Script from a Brain in MACH3 - is this fixed?
« Reply #2 on: January 16, 2015, 06:04:02 PM »
Thanks Alex,

I'll give that a try. Not sure if I did exactly that or not.

Pretty quiet over here in Brain Town . . . .

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Running a Script from a Brain in MACH3 - is this fixed?
« Reply #3 on: January 16, 2015, 06:46:16 PM »
It would be NICE IF the brains were fixed to trigger a button from a HOTKEY call like in a screen button.

Create a button with the script then assign a keyboard hotkey. Then have the brain issue the hotkey sequence.

Just a thought, (;-) TP
« Last Edit: January 16, 2015, 06:56:10 PM by BR549 »

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Running a Script from a Brain in MACH3 - is this fixed?
« Reply #4 on: January 17, 2015, 04:35:25 AM »
I notice 2 things odd about this method and wonder if anyone can confirm this behavior, please.

1) Estop seems to suspend all macros with the exception on the macro pump

2) Using the 301 button as a terminator in a brain only works with nop. If inverted, no dice.

I am trying to use an ESTOP event (captured by the brain) to run a macro to turn off the 4th axis spindle and if the above are ture, it would explain why I had no success.

Offline mbele

*
  •  58 58
    • View Profile
Re: Running a Script from a Brain in MACH3 - is this fixed?
« Reply #5 on: January 17, 2015, 06:10:16 AM »
Hi, just thought...

brain -> set user led
macropump: if user led set then do custom script;

or

brain -> do button
button on click: do custom script

or

brain -> do button
button on click: set flag
macropump: if flag set then do custom script
customscript: reset flag

sorry if that was obvious, or proven not to work...
Mihael
Re: Running a Script from a Brain in MACH3 - is this fixed?
« Reply #6 on: January 17, 2015, 12:17:54 PM »
Quote
1) Estop seems to suspend all macros with the exception on the macro pump
same behavior here.
Quote
2) Using the 301 button as a terminator in a brain only works with nop. If inverted, no dice.
is working here in ver .062  ==>  Uled > invert > 301
Alex

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Running a Script from a Brain in MACH3 - is this fixed?
« Reply #7 on: January 19, 2015, 03:46:52 AM »
is working here in ver .062  ==>  Uled > invert > 301

Thanks for the Info. Starting with a source like Uled, on my development system (64 bit Win7 pro) invert will work sometimes and sometimes not. Pretty random with no obvious cause. I do not know if the behavior is the same on 32 bit.

In any case, my application is to use ESTOP (OEMled800), and with this source, it does not work inverted at all and with nop the macro does not run until Estop is released (reset).  The macro seems to get 'qued up', but does not execute until reset, so it is not useable in my application because I want the action to take place ON estop, not after.

Using a macro pump seems to be working fine, but the concern there is that a customer may already have one running. Can more than one Macropump run simultaneously?
Running a Script from a Brain in MACH3 - is this fixed?
« Reply #8 on: January 19, 2015, 05:19:31 AM »
Hi Simpson36,
If the customer has a Macropump running, include your pump in there file. I have done it successfully on my machine with several totally unrelated things.


Alan