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 28, 2012, 02:21:32 PM
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
VB and the development of wizards
The basics of making a switch run a script?
Pages:
1
2
3
»
Go Down
« previous
next »
Author
Topic: The basics of making a switch run a script? (Read 4288 times)
0 Members and 1 Guest are viewing this topic.
Gakiem
Active Member
Offline
Posts: 4
The basics of making a switch run a script?
«
on:
June 28, 2006, 02:34:59 PM »
Hi All
A very new user here, with a big router that has some push-button switches on the gantry. First I'll tell you what took me all day to figure out, so you can see my "expertise"....
Have 4 pushbutton switches and 1 probe (Normally Open). Got the red switch to do E-stop - easy. Then a few hours on getting the Green switch to do equivalent of Alt-R with OEM trig on Ports&Pins and External Buttons-OEM Codes on SystemHotkeysSetup (1000). 5 minutes to setup the Yellow feedhold OEM 1001.
Now to the problem at hand. The last pushbutton must plunge the z and zero the z off the probe switch. I have the probe working in Ports&Pins, and can get an OEM Trig to work off that switch. I have been told I must execute the following script when hitting the black switch:
code "g31 z-10 f50"
While IsMoving()
Wend
code "G92 Z0"
code "G0Z3"
While IsMoving()
Wend
code "g92z0"
Where do I save this code? Is it with the M12**.m1s files? Can I call an M.....m1s file with an OEM trig?
Thanks for any hints!
G
Logged
Brian Barker
Administrator
Offline
Posts: 3,383
Re: The basics of making a switch run a script?
«
Reply #1 on:
June 28, 2006, 06:39:05 PM »
There is a way to call a script from an OEMtrig ... I can't think of it at this point
I will get back to you
Brian
Logged
Fixing problems one post at a time
www.newfangledsolutions.com
www.machsupport.com
Brian Barker
Administrator
Offline
Posts: 3,383
Re: The basics of making a switch run a script?
«
Reply #2 on:
June 28, 2006, 07:24:07 PM »
You need to set the Macro to be called with a VBscript... SetTriggerMacro (450) would set it to M450
And put 177 for the OEM code .. Or 277.. it is one of them ... All this is in the manual if you would like to know more
And if you have any trouble please feel free to ask!
Logged
Fixing problems one post at a time
www.newfangledsolutions.com
www.machsupport.com
Gakiem
Active Member
Offline
Posts: 4
Re: The basics of making a switch run a script?
«
Reply #3 on:
June 29, 2006, 08:29:21 AM »
I feel almost too shy to confess that I understand little of what you said. I went backwards and forwards through Using Mach3 Mill and think I am further lost now. Are you perhaps talking of some other manual?
Logged
fer_mayrl
Global Moderator
Offline
Posts: 452
Re: The basics of making a switch run a script?
«
Reply #4 on:
June 29, 2006, 11:05:40 AM »
I think this should work...
In the Ports and Pins config menu, go to inputs, select an input or an OEM trigger, put your pin and port settings for the switch you are using, and assign a hotkey to that input. Now go and create a button on screendesigner, make that button run the sI thicript you want and assign that buttin the same hotkey you set on the input ports and pins. I think its in the ScanCode box. Now if you dont want that button to show up on your screen use screen designer to drag the button out of the workarea.
I think that might work, havent tried it, please let me know.
Regards
Fernando
Logged
Brian Barker
Administrator
Offline
Posts: 3,383
Re: The basics of making a switch run a script?
«
Reply #5 on:
June 29, 2006, 11:41:46 AM »
Sorry about that
look in the Mach2 Customization manual
thanks
Brian
Logged
Fixing problems one post at a time
www.newfangledsolutions.com
www.machsupport.com
Brian Barker
Administrator
Offline
Posts: 3,383
Re: The basics of making a switch run a script?
«
Reply #6 on:
June 29, 2006, 12:10:59 PM »
The OEM code that you need to put into the OEMTrig box is 301.. This will call the Macro that you set with the Call SetTriggerMacro
IF you upload your XML I will make it work
Logged
Fixing problems one post at a time
www.newfangledsolutions.com
www.machsupport.com
Gakiem
Active Member
Offline
Posts: 4
Re: The basics of making a switch run a script?
«
Reply #7 on:
June 30, 2006, 06:59:08 AM »
Hi Brian
Thanks for the offer! Here is the file:
G
Mach3Mill.xml
(52.03 KB - downloaded 127 times.)
Logged
Brian Barker
Administrator
Offline
Posts: 3,383
Re: The basics of making a switch run a script?
«
Reply #8 on:
June 30, 2006, 07:36:40 AM »
Here you go
Copy in this new XML and copy the M450 and M451 Macros in to the macros/Mach3Mill directory.... The M450 is the one that you can put you VB code in, and I have it set to work with OEMTrig#4
M450.m1s
(0.04 KB - downloaded 213 times.)
M451.m1s
(0.02 KB - downloaded 194 times.)
Mach3Mill.xml
(52.16 KB - downloaded 153 times.)
Logged
Fixing problems one post at a time
www.newfangledsolutions.com
www.machsupport.com
Gakiem
Active Member
Offline
Posts: 4
Re: The basics of making a switch run a script?
«
Reply #9 on:
June 30, 2006, 08:20:40 AM »
Thanks Brian!
G
Logged
Pages:
1
2
3
»
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...