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:28:07 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
VB and the development of wizards
speed of execution of macro
Pages:
«
1
2
Go Down
« previous
next »
Author
Topic: speed of execution of macro (Read 845 times)
0 Members and 3 Guests are viewing this topic.
moorea21
Active Member
Offline
Posts: 88
Re: speed of execution of macro
«
Reply #10 on:
December 24, 2010, 04:55:00 PM »
Erm...
not heard of gcode sub program. Can you direct me to any documentation on that? The documentation doesn't have a search facility. Thanks
Logged
BR549
Active Member
Offline
Posts: 2,555
Re: speed of execution of macro
«
Reply #11 on:
December 24, 2010, 05:48:00 PM »
I am not sure there is a good example or explaination in the manual.
But basically it is a process that allows you to call a subset of Gcode from inside a running Gcode program from somewhere else in the program OR from an outside source stored away as a reference.
IF you could post your Gcode needed in the order it is needed maybe someone here can help you sort out what you may need. There are people here that are very good at that sort of thing
(;-) TP
Logged
moorea21
Active Member
Offline
Posts: 88
Re: speed of execution of macro
«
Reply #12 on:
December 24, 2010, 07:43:40 PM »
okay, thanks. And merry christmas to you! I'm following another thread on the same subject, I'll cut n paste the code suggested by someone there, for anyone following this thread to see:-
Sub run101()
While IsMoving()
Sleep 10
Wend
Code “G1 A2.5”
Code “G1 A0”
Code “G1 A1.7”
end sub
G01 X2 Y0 run101
G01 X9 run101
G01 X14 run101
G01 X15 Y5 run101
G01 X0 Y4 run101
G01 X1 run101
Thanks 5ms for that.
Does this look right? Syntax wise?
Thanks,
Rich
Logged
BR549
Active Member
Offline
Posts: 2,555
Re: speed of execution of macro
«
Reply #13 on:
December 24, 2010, 08:11:22 PM »
I am not sure what you have going with teh code you posted But I get the general idea of what you are trying to do. You application is really simple and really you won't save time either way. The straight Gcode would be the best approach .
Straight Gcode Example:
F20
G01 X2 Y0
A2.5
A0
A1.7
G01 X9
A2.5
A0
A1.7
G01 X14
A2.5
A0
A1.7
G01 X15 Y5
A2.5
A0
A1.7
G01 X0 Y4
A2.5
A0
A1.7
G01 X1
A2.5
A0
A1.7
M30
%
SUB program approach: THe M98 calls the sub by the o word and name o100 the L paramter tells how many times to run the sub. At the end of the sub the M99 returns to the call line then advances to the next line. At teh end of the program the M30 ends the program
F20
G01 X2 Y0 M98 P100 L1
G01 X9 M98 P100 L1
G01 X14 M98 P100 L1
G01 X15 Y5 M98 P100 L1
G01 X0 Y4 M98 P100 L1
G01 X1 M98 P100 L1
M30
o100
G1 A2.5
G1 A0
G1 A1.7
M99
%
Hope that helps, (;-) TP
«
Last Edit: December 24, 2010, 08:15:28 PM by BR549
»
Logged
moorea21
Active Member
Offline
Posts: 88
Re: speed of execution of macro
«
Reply #14 on:
December 25, 2010, 07:03:38 AM »
Thanks, yes, that helps a bit. Part of the reasoning of the subroutine was because it makes the whole file size smaller than putting 2 extra lines into the gcode all the time. My maximum gcode file size ( I forget what it was) caused Mach to crash. I'll try the subroutine when the festivities are over, and post the results...
Logged
BR549
Active Member
Offline
Posts: 2,555
Re: speed of execution of macro
«
Reply #15 on:
December 25, 2010, 10:49:16 AM »
You can also do it one more way to save a little more space. It is the remote call method. You store your sub in the sub directory then call it with the M98.
Save the sub as a program file:
(Sub 100.tap)
o100
G1 A2.5
G1 A0
G1 A1.7
M99
%
Then you Gcode file would look like this:
F20
G01 X2 Y0 M98 C:\mach3\sub\ProgramName.tap
G01 X9 M98 C:\mach3\sub\ProgramName.tap
G01 X14 M98 C:\mach3\sub\ProgramName.tap
G01 X15 Y5 M98 C:\mach3\sub\ProgramName.tap
G01 X0 Y4 M98 C:\mach3\sub\ProgramName.tap
G01 X1 M98 C:\mach3\sub\ProgramName.tap
M30
(;-) TP
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...