Home
Downloads
Mach3
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portugese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 27, 2012, 09:58:03 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
Brains Development
Execute Button Script - how do you use it?
Pages:
1
2
Go Down
« previous
next »
Author
Topic: Execute Button Script - how do you use it? (Read 1696 times)
0 Members and 1 Guest are viewing this topic.
Rademacher
Active Member
Offline
Posts: 25
Give it a try! How hard can it be?
Execute Button Script - how do you use it?
«
on:
November 24, 2010, 07:24:45 PM »
I have been attempting to write a brain that will trigger my auto Z script when a Pokey55 button is pushed. Can't seem to find a way to make scripts run from brains.
Does any one know how to implement the Execute Button Script? I am thinking this maybe the solution to my problem.
thanks,
Wayne
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Execute Button Script - how do you use it?
«
Reply #1 on:
November 24, 2010, 07:58:31 PM »
Set Trigger Macro using “Push User Button” in Brians:
First, you dont put the code in a button, you put it in a macro file. For
example file: m600.m1s
SetMessage( "This is a macro call..")
Then , you have to set that macro to be the default macro call with a call to
SetTriggerMacro( 600 ) at some point in the program, an init string could do
that if the SetTriggerMacro call were in another macro file that is called on
startup. Then the brain will execute m600 whenever that brain termination code is
called.
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
BR549
Active Member
Online
Posts: 2,555
Re: Execute Button Script - how do you use it?
«
Reply #2 on:
November 24, 2010, 08:40:08 PM »
HIYA SCOT, I must have fallen off the pumpkin wagon and bumped my head. Could you explain that again???
(;-) TP
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Execute Button Script - how do you use it?
«
Reply #3 on:
November 25, 2010, 10:23:11 AM »
Sure....
Quote
Set Trigger Macro using “Push User Button” in Brians:
First, you dont put the code in a button, you put it in a macro file. For
example file: m600.m1s
SetMessage( "This is a macro call..")
Then , you have to set that macro to be the default macro call with a call to
SetTriggerMacro( 600 ) at some point in the program, an init string could do
that if the SetTriggerMacro call were in another macro file that is called on
startup. Then the brain will execute m600 whenever that brain termination code is
called.
hehehehe.......... sorry couldn't resist...
Ok Make the "Macro" that you want to be triggered, for instance M600 as above this macro does what ever....
then if you want it to auto trigger you have to set it using the set macro call. this will be a SEPERATE macro call.
So under General cfg, in the Init Put your set trigger macro in the init line, call it M1000.m1s
in that macro put the set trigger macro call:
'M1000.m1s (in the init line)
SetTriggerMacro( 600 )
//////////////////////////
When Mach starts up, it runs the "Init" line, which in turn runs the SetTriggerMacro call and sets which macro number will trigger
i.e. M600.m1s
So, in Brains..... you have your even that triggers your "Trigger Macro button" termination.......
for aurguments sake, lets say you use ULED 2000 to trigger that function.
so your rung would look like: NOTE!! You may, or may not have to make an invert OP call after the ULED
depending on where it is coming from.
ULED 2000->Invert OP->Trigger Macro Button
so when ULED 2000 turns on, it will run the function that runs the macro you have set in the trigger.....
see!!!! Simple as PIE!!!!!!!! hehehhehehehe ( NOT!!!!! )
scott
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
BR549
Active Member
Online
Posts: 2,555
Re: Execute Button Script - how do you use it?
«
Reply #4 on:
November 25, 2010, 11:04:19 AM »
oK so it was NOT the bump on the head, maybe just blind but I don't see ANY button push in Brians that will terminate with a macro call. Can you give me the button number(;-)
Up to now I had to set a user led and then monitor the led from the macropump to make it work(Not a good way as it eats up resources)
(;-) TP
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Execute Button Script - how do you use it?
«
Reply #5 on:
November 25, 2010, 07:28:34 PM »
? in brains 1034
s.
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
BR549
Active Member
Online
Posts: 2,555
Re: Execute Button Script - how do you use it?
«
Reply #6 on:
November 25, 2010, 09:51:05 PM »
BOY someone needs to rename that button(;-)
So does that mean you can only have one button and call one macro??
(;-) TP
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Execute Button Script - how do you use it?
«
Reply #7 on:
November 25, 2010, 10:09:24 PM »
yeap
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
Greolt
Global Moderator
Offline
Posts: 872
Re: Execute Button Script - how do you use it?
«
Reply #8 on:
November 26, 2010, 01:13:31 AM »
Thanks for that info Scott
I presume that button press is
"1034 - Execute Button Script"
Greg
Logged
Rademacher
Active Member
Offline
Posts: 25
Give it a try! How hard can it be?
Re: Execute Button Script - how do you use it?
«
Reply #9 on:
November 26, 2010, 09:16:16 AM »
Wow, so intuitive....can't believe I missed it;)
Seriously, really appreciate the help, I was really stuck.
Wayne
Logged
Pages:
1
2
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
-----------------------------
Mach4
-----------------------------
=> Mach4 pre-Alpha Testing
Loading...