Home
Downloads
Mach and LazyCam
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
German Forum
Italian Forum
Portugese Forum
Resources
Links
User Reviews
User Videos
Contact Us
CNCZone
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
November 20, 2008, 08:05:16 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
Terminate a brain with "run macro M650.m1s" ???????
Pages:
1
2
»
Go Down
« previous
next »
Author
Topic: Terminate a brain with "run macro M650.m1s" ??????? (Read 1304 times)
0 Members and 1 Guest are viewing this topic.
Greolt
Global Moderator
Online
Posts: 351
Terminate a brain with "run macro M650.m1s" ???????
«
on:
February 20, 2008, 06:42:45 PM »
Can I terminate a brain with "run macro M650.m1s" ?
I want a simple LPT input to trigger a macro. Are brains the way to do this?
Greg
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Online
Posts: 760
Briceville, TN, USA
Re: Terminate a brain with "run macro M650.m1s" ???????
«
Reply #1 on:
February 20, 2008, 11:39:26 PM »
Yes, but you will have to use brains and macropump
in brains:
InputX >NOP>UserLED1500 (save as name it, and turn it on in Brain config).
open up VB editor:
put thiis in and Save as "Macropump.m1s":
'Macropump.m1s
X=GetUserDRO(1500)
If GetUserLED(1500) and X=0 Then
code "M650"
SetUserDRO(1500,1)
end If
If Not(GetUserled(1500)) and X>0 Then
SetUserDRO(1500,0)
End If
'remember after you save it as your macropump, then turn on macro pump under general, close and reopen mach, make sure you enabled your triggger brain.
'scott
Logged
All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
Greolt
Global Moderator
Online
Posts: 351
Re: Terminate a brain with "run macro M650.m1s" ???????
«
Reply #2 on:
February 21, 2008, 06:05:24 AM »
Thanks very much Scott.
I have read through your post about ten times.
Mostly it makes sense. Couple of questions,
The purpose of the brain? Is that just because I asked how to do it with a brain or is there a purpose for it? Why not a macro pump alone?
UserLED and UserDRO. Do they need to actually exist on the screen? Or can they just be phantoms in the background?
Next question, the purpose of this is to trigger a Auto Tool Zero routine with an external button press.
Do I need to build in protection against accidental activation while Mach is doing something else? Running a program or whatever. Or is Mach going to protect itself from that automatically?
If you have read this far thanks again.
Greg
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Online
Posts: 760
Briceville, TN, USA
Re: Terminate a brain with "run macro M650.m1s" ???????
«
Reply #3 on:
February 21, 2008, 10:16:09 PM »
I did it with Brian becuase you wanted to do it that way.........hehehehe
You can do it with a Macropump alone if you want.
Yes the Dros and Leds can be invisibable.
No safeties are in it, you would need to put them there.
Scott
Logged
All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
Greolt
Global Moderator
Online
Posts: 351
Re: Terminate a brain with "run macro M650.m1s" ???????
«
Reply #4 on:
February 22, 2008, 12:11:50 AM »
Thanks Scott
I'll have to get back to this in a couple of days.
We have our Melbourne Australia CNC BBQ on tomorrow and I have stuff to get ready.
Will have some more questions then.
Greg
Logged
Greolt
Global Moderator
Online
Posts: 351
Re: Terminate a brain with "run macro M650.m1s" ???????
«
Reply #5 on:
February 25, 2008, 05:02:33 AM »
Scott
I have looked at this macro till my old brain hurts and I just can't get my head around it.
What is the purpose of reading and setting "UserDRO (1500)" ?
If I could grasp that the rest looks easy.
X=GetUserDRO(1500)
If GetUserLED(1500) and X=0 Then
code "M650"
SetUserDRO(1500,1)
end If
If Not(GetUserled(1500)) and X>0 Then
SetUserDRO(1500,0)
End If
Despite searching for a while, I don't understand the "If Not" . Perhaps if I did the rest would make sense.
Greg
«
Last Edit: February 25, 2008, 07:19:33 AM by Greolt
»
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Online
Posts: 760
Briceville, TN, USA
Re: Terminate a brain with "run macro M650.m1s" ???????
«
Reply #6 on:
February 25, 2008, 11:51:58 AM »
DRO 1500 is a "Lock out", it only allows the code to run ONE time in the macro pump per push and release of the button. Otherwize the macropump would hit the command several times before you could remove your finger.........
scott
Logged
All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
Greolt
Global Moderator
Online
Posts: 351
Re: Terminate a brain with "run macro M650.m1s" ???????
«
Reply #7 on:
February 25, 2008, 05:34:49 PM »
OK let me ask about the "If Not"
It is this that is a sticking point in my grasping it.
This is my best guess at what it is,
If Not(GetUserled(1500)) and X>0 Then
Means
If GetUserLed(1500) is zero and X > zero Then
Is that right?
Greg
«
Last Edit: February 25, 2008, 06:01:58 PM by Greolt
»
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Online
Posts: 760
Briceville, TN, USA
Re: Terminate a brain with "run macro M650.m1s" ???????
«
Reply #8 on:
February 25, 2008, 08:26:29 PM »
hehehehe isnt logic FUN!!!!
the If Not looks to see if it is OFF and if it is off that condition is TRUE cause the NOT inverts the logic............
Scott
Logged
All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
Greolt
Global Moderator
Online
Posts: 351
Re: Terminate a brain with "run macro M650.m1s" ???????
«
Reply #9 on:
February 25, 2008, 09:00:22 PM »
So then I gather my example , the second one, is sort of right?
I know that it is not usable VB, but is that what the first one means?
Thanks, Greg
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.
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*e*i*n*g
=> Mach Screens
=> Feature Requests
=> Non English Forums
=> FAQs
===> Finished Plugins for Download
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
-----------------------------
*****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
=> Lazy Cam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> dspMC/IP motion controller
=> Third party software and hardware support forums.
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Promote and discuss your product .
=> Sieg Machines
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
=> One on one phone support.
=> Forum suggestions and report forum problems.
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
Loading...