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 25, 2012, 01:55:23 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
Can the M3/4 macros be edited
Pages:
1
Go Down
« previous
next »
Author
Topic: Can the M3/4 macros be edited (Read 780 times)
0 Members and 2 Guests are viewing this topic.
Cncman2nv
Active Member
Offline
Posts: 67
Can the M3/4 macros be edited
«
on:
December 26, 2009, 07:13:01 PM »
I would like to find a way to edit the way Mach does the M3,M4 macros
What I want to do is put a lever switch on the Back gear lever of a Bridgeport mill to tell Mach to reverse the output from the M code call
I tired this in the M3 macro but Didn't Work
IF IsActive (input1) then
DoSpinCWW()
Else
DoSpinCW()
End If
Logged
Adam
melee
Guest
Re: Can the M3/4 macros be edited
«
Reply #1 on:
December 29, 2009, 11:06:06 AM »
Hi
This brought back vague memories of when I tried something similar a couple of years ago, to overcome a logic problem on a machine, which I eventually cured the proper way by rewiring.
The answer is yes you can edit the macros, but you have to go outside the DoSpinC(C)W() functions if you want to change rotation direction from M3.m1s
I don't know exactly where the macro comes in the chain of processing a M3 GCode call, but as you say, simply substituting DoSpinCCW() does not produce the desired effect, albeit commenting out the command will prevent any rotation, so Mach does look for it in the macro.
I set the contents of M3.m1s as
If IsActive (input1) Then
code "M4"
Else
DoSpinCW()
Message "CW Rotation"
End If
and M4.m1s as
DoSpinCCW()
Message "CCW Rotation"
This gives me the desired effect in simulation, depending upon the state of input1 and a visible confirmation that the M4 call went through on the message line.
Hopefully will work for you
regards
Melee
Logged
Cncman2nv
Active Member
Offline
Posts: 67
Re: Can the M3/4 macros be edited
«
Reply #2 on:
December 29, 2009, 09:40:07 PM »
I keep getting Scripter errors when using code in the M3.m1s getting a syntax error to the words then,else,if when stepping thru the code
«
Last Edit: December 29, 2009, 09:42:57 PM by Cncman2nv
»
Logged
Adam
Overloaded
Global Moderator
Online
Posts: 3,072
Re: Can the M3/4 macros be edited
«
Reply #3 on:
December 29, 2009, 10:30:52 PM »
MeLee's code works fine here, did you copy/paste ?
If IsActive (input1) Then
code "M4"
Else
DoSpinCW()
Message "CW Rotation"
End If
Russ
Logged
"I haven't failed. I've just found 10,000 ways that won't work." Edison
"You cannot help men permanently by doing for them what they could and should do for themselves."
Abe Lincoln
Cncman2nv
Active Member
Offline
Posts: 67
Re: Can the M3/4 macros be edited
«
Reply #4 on:
December 30, 2009, 07:47:16 PM »
In my original post as you can see i didn't indent from the then,else,end if, statements I now no that makes all the difference
so Thanks for all the help!
Logged
Adam
Overloaded
Global Moderator
Online
Posts: 3,072
Re: Can the M3/4 macros be edited
«
Reply #5 on:
December 30, 2009, 08:40:24 PM »
Hi Adam,
I believe you had a different syntax problem.
The indent doesn't really matter. I think that's just an easy way for a programmer to read or work with the script.
These work just as well .
Russ
ScreenHunter_02 Dec. 30 20.35.gif
(7.07 KB, 335x173 - viewed 98 times.)
ScreenHunter_01 Dec. 30 20.30.gif
(5.77 KB, 398x184 - viewed 77 times.)
Logged
"I haven't failed. I've just found 10,000 ways that won't work." Edison
"You cannot help men permanently by doing for them what they could and should do for themselves."
Abe Lincoln
Cncman2nv
Active Member
Offline
Posts: 67
Re: Can the M3/4 macros be edited
«
Reply #6 on:
December 30, 2009, 08:54:25 PM »
Ya your right Russ the indent doesn't make any difference so I don't what I had going on but it seem to work now
Logged
Adam
Overloaded
Global Moderator
Online
Posts: 3,072
Re: Can the M3/4 macros be edited
«
Reply #7 on:
December 30, 2009, 08:56:56 PM »
Another problem with your original,
you have DoSpinCWW(),
instead of CCW
Glad it's working for you now though.
Logged
"I haven't failed. I've just found 10,000 ways that won't work." Edison
"You cannot help men permanently by doing for them what they could and should do for themselves."
Abe Lincoln
Pages:
1
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...