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
Portuguese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 24, 2013, 03:33:08 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
G-Code, CAD, and CAM
G-Code, CAD, and CAM discussions
Need to repeat two cutters, but have a popup box for new dim.
Pages:
1
Go Down
« previous
next »
Author
Topic: Need to repeat two cutters, but have a popup box for new dim. (Read 308 times)
0 Members and 1 Guest are viewing this topic.
Aeroshade
Active Member
Offline
Posts: 141
Need to repeat two cutters, but have a popup box for new dim.
«
on:
February 02, 2012, 10:51:59 AM »
Hello all. I have a program I run that uses two cutters. The program is a pattern that is repeated multi times on the same part. I have a VMC with an extra table that extends the X-axis, with a servo (I use the B-axis to control it). The pattern stays the same on all parts but the location on the part changes (B-axis). I need to figure out a way to have Mach3 bring up a popup menu that ask what the B-axis value needs to be then moves to that location and runs the pattern.
The parts are various lengths, so some have 1 pattern up to 10 patterns. Is there a way to make Mach3 ask how many locations for the pattern?
What would be nice is for Mach3 to prompt for the amount of patterns, then ask for each B value for each pattern. This might be asking for to much but this isn't going to be a one part run. I will be making these for years (hopefully).
Here is the program:
N1 G00 G40 G80 G90
T01 M06 (3/16 2 FLUTE CRB EM)
S3200 M03
G00 G54 B0 X0 Y0 (This is the B value I need to change)
G43 Z.1 H01
G01 Z-.245 F4.
G41 D01 X0 Y-.0144 F15.
X.7874 Y-.0144
G03 X.7874 Y.0144 I0 J.0144
G01 X-.7874 Y.0144
G03 X-.7874 Y-.0144 I0 J-.0144
G01 X0 Y-.0144
G40 X-.002 Y.001
G00 Z.1
X-.0547 Y-.0079
G01 Z-.245 F50.
G41 D01 X-.0441 Y-.0185 F15.
G03 X-.03 Y-.0244 I.0141 J.0141
G01 X.7874 Y-.0244
G03 X.7874 Y.0244 I0 J.0244
G01 X-.7874 Y.0244
G03 X-.7874 Y-.0244 I0 J-.0244
G01 X0 Y-.0244
X.7874 Y-.0244
G03 X.7874 Y.0244 I0 J.0244
G01 X-.7874 Y.0244
G03 X-.7874 Y-.0244 I0 J-.0244
G01 X0 Y-.0244
X.03 Y-.0244
G03 X.0441 Y-.0185 I0 J.02
G40 G01 X.0547 Y-.0079
G00 Z6.0
M01
N1 G00 G40 G80 G90
T02 M06 (#19 STUB DRILL)
S3200 M03
G00 G54 B0 X-1.2992 Y0 (This is the B value I need to change)
G43 Z.1 H02
G81 G98 Z-.312 R.1 F10.
X1.2992 Y0
G00 Z6.0
M30
%
Logged
Aeroshade
Active Member
Offline
Posts: 141
Re: Need to repeat two cutters, but have a popup box for new dim.
«
Reply #1 on:
February 02, 2012, 01:12:50 PM »
OK, say I do this:
Mcode M153:
NextPos = Question(“Enter next B position:”)
Mcode M154:
Code “G00 G54 B" & NextPos
Gcode:
N1 G00 G40 G80 G90
T01 M06 (3/16 2 FLUTE CRB EM)
S3200 M03
M153
M154
X0 Y0
G43 Z.1 H01
G01 Z-.245 F4.
G41 D01 X0 Y-.0144 F15.
X.7874 Y-.0144
G03 X.7874 Y.0144 I0 J.0144
G01 X-.7874 Y.0144
G03 X-.7874 Y-.0144 I0 J-.0144
G01 X0 Y-.0144
G40 X-.002 Y.001
G00 Z.1
X-.0547 Y-.0079
G01 Z-.245 F50.
G41 D01 X-.0441 Y-.0185 F15.
G03 X-.03 Y-.0244 I.0141 J.0141
G01 X.7874 Y-.0244
G03 X.7874 Y.0244 I0 J.0244
G01 X-.7874 Y.0244
G03 X-.7874 Y-.0244 I0 J-.0244
G01 X0 Y-.0244
X.7874 Y-.0244
G03 X.7874 Y.0244 I0 J.0244
G01 X-.7874 Y.0244
G03 X-.7874 Y-.0244 I0 J-.0244
G01 X0 Y-.0244
X.03 Y-.0244
G03 X.0441 Y-.0185 I0 J.02
G40 G01 X.0547 Y-.0079
G00 Z6.0
M01
N1 G00 G40 G80 G90
T02 M06 (#19 STUB DRILL)
S3200 M03
M154
X-1.2992 Y0
G43 Z.1 H02
G81 G98 Z-.312 R.1 F10.
X1.2992 Y0
G00 Z6.0
M30
%
Can I repeat M154 and the value will still be the same? Does the Var "NextPos" keep it's value?
Thanks,
Aero
Logged
BR549
Active Member
Offline
Posts: 4,095
Re: Need to repeat two cutters, but have a popup box for new dim.
«
Reply #2 on:
February 02, 2012, 01:58:50 PM »
There are many ways to do what you want here is but 1 way based on your example.
Here is the MACRO, Created and store in the macro directory:
'M153 macro to set B #variable
Bval = Question ("What is the new B variable Value?")
SetVar(1,Bval)
Here is the program:
N1 G00 G40 G80 G90
T01 M06 (3/16 2 FLUTE CRB EM)
M153
S3200 M03
G00 G54 B#1 X0 Y0 (This is the B value I need to change)
G43 Z.1 H01
G01 Z-.245 F4.
G41 D01 X0 Y-.0144 F15.
X.7874 Y-.0144
G03 X.7874 Y.0144 I0 J.0144
G01 X-.7874 Y.0144
G03 X-.7874 Y-.0144 I0 J-.0144
G01 X0 Y-.0144
G40 X-.002 Y.001
G00 Z.1
X-.0547 Y-.0079
G01 Z-.245 F50.
G41 D01 X-.0441 Y-.0185 F15.
G03 X-.03 Y-.0244 I.0141 J.0141
G01 X.7874 Y-.0244
G03 X.7874 Y.0244 I0 J.0244
G01 X-.7874 Y.0244
G03 X-.7874 Y-.0244 I0 J-.0244
G01 X0 Y-.0244
X.7874 Y-.0244
G03 X.7874 Y.0244 I0 J.0244
G01 X-.7874 Y.0244
G03 X-.7874 Y-.0244 I0 J-.0244
G01 X0 Y-.0244
X.03 Y-.0244
G03 X.0441 Y-.0185 I0 J.02
G40 G01 X.0547 Y-.0079
G00 Z6.0
M01
N2 G00 G40 G80 G90
T02 M06 (#19 STUB DRILL)
S3200 M03
G00 G54 B#1 X-1.2992 Y0 (This is the B value I need to change)
G43 Z.1 H02
G81 G98 Z-.312 R.1 F10.
X1.2992 Y0
G00 Z6.0
M30
%
Logged
Aeroshade
Active Member
Offline
Posts: 141
Re: Need to repeat two cutters, but have a popup box for new dim.
«
Reply #3 on:
February 02, 2012, 02:28:39 PM »
I like that better, cleaner and easier. I will give it a try and let you guys know how it works out.
Thanks!!
Aero
Logged
Aeroshade
Active Member
Offline
Posts: 141
Re: Need to repeat two cutters, but have a popup box for new dim.
«
Reply #4 on:
February 02, 2012, 02:42:51 PM »
OK, I tested it in MDI and works GREAT!! Later I need to work on the repeat the pattern in different places part. But this will make this job ALOT easier!!
Thanks so much BR549!!!!
Aero
Logged
BR549
Active Member
Offline
Posts: 4,095
Re: Need to repeat two cutters, but have a popup box for new dim.
«
Reply #5 on:
February 02, 2012, 07:10:37 PM »
Study up on SUB programing. For what you are doing it is the CATS meow.
Use a macro to program the variables and call whatever subs you need to run to make the part.
It makes the Gcoding pretty much a conversational TOOL
(;-) TP
«
Last Edit: February 02, 2012, 07:12:40 PM by BR549
»
Logged
Pages:
1
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> 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
=> CS-Lab
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Mach3 Wizards
=> Newfangled Mill Wizard
=> 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...