CNC Machine Logo
CNC Machine forum Logo
Last update: 05/17/12 14:11
CNC Machine RSS Feed

'Macro B Variable' CNC Programming

Post your related message now.
All listings are the responsiblity of the posters; keep in mind, anyone can post anything!
, any: Hyp 600
us





Advertisement:
Your advertisement here



Recent Notes and Tags
Search Tags:


Top Searches: • macro b programming • macro b • cnc macro programming • cnc macro programming examples • cnc macro variables • mazak macro programming • haas macro programming • cnc variables • cnc macro • macro b examples • cnc macro programs • how to cnc variables • mazak macro • cnc macros • cnc macro b • cnc macro examples • cnc macro program • mazak system variables • macro programming cnc • variable cnc • cnc variable programming • cnc macro programming software • cnc macro program examples • macro variable programming • mazak variables • cnc macro programing • mazak programming examples • macro b cnc • variables cnc • mazak macro program • mazak macros • cnc macro program example •

Macro B Variable

This forum post has messages dated from 01/30/09 through 01/05/11, please be sure to read all the messages. If you feel it is old or outdated, please follow up with a question or comment and someone may be able to update it, or reply with newer information if you have it.

- CNC Programming

Macro B Variable

Can anyone help me with a MACRO B VARIABLE program?

I need to do a pocket route on a CNC Router

Heian.


Thank author of this post/commentThis should get you what you need. What kind of control are you working on? I write all macros for my machines and this one works like a charm.

Stevo

Q=(PICK SIZE #17)

W=(STARTING DEPTH #23)

E=(DIAMETER TO SPIN #8)

K=(DIAMETER OF CUTTER #6)

Z=(FINAL DEPTH #26)

T=(TOOL NUMBER #20)

M=(COOLANT COMMAND #13)

X=(X COORD. OF HOLE #24)

Y=(Y COORD. OF HOLE #25)

O0001(MAIN PROGRAM)

#500=3(CLEARANCE PLANE)

G65P8001Q.025W.1E1. K.75Z1.T20M8Z5.3Y1.5

M30

O8001(SPINS C-BORE RAMPING ROUTINE 5-27-08)

#2=10000(ROUNDING)

#12=#17

#13=#23

M6T#20

#8=#8/2

#6=#6/2

#1=0

#15=[#8+#6]/2(ARC IN)

N100

IF[#6GE#8]GOTO260

G0G90G55G80

X#24Y#25Z#500

Z[#23+.1]

G1Z#23

G91G1X[#8-#15] Y-[#15-#6]M#13

G3X[#15-#6] Y[#15-#6]J[#15-#6]

N150G3X0Y0I-[#8-#6]Z-#17

#23=#23+#17

IF[#1EQ1]GOTO400

IF[ROUND[[#23+#17]*#2] /#2GE[ROUND[#26*#2]/#2]] GOTO300

GOTO150

N300#17=#26-[#23-#13]

#1=1

GOTO150

N400

#23=#13

#17=#12

#1=0

G3X0Y0I-[#8-#6]

G3X-[#15-#6] Y[#15-#6]I-[#15-#6]

G90G1X#24Y#25M9

G0Z#500M5

N200M99

N260#3000=10(CUTTER DIA. TO LARGE)

%


Thank author of this post/commentSorry use this one. Some of the changes and updates I did to the macro did not carry over to this copy.

Stevo

O8001(SPINS C-BORE RAMPING ROUTINE 5-27-08)

#2=10000(ROUNDING)

M6T#20

#8=#8/2

#6=#6/2

#1=0

#15=[#8+#6]/2(ARC IN)

N100

IF[#6GE#8]GOTO260

G0G90G55G80

X#24Y#25Z#500

Z#23

G1Z0

G91G1X[#8-#15] Y-[#15-#6]M#13

G3X[#15-#6] Y[#15-#6]J[#15-#6]

N150G3X0Y0I-[#8-#6]Z-#17

#23=#23+#17

IF[#1EQ1]GOTO400

IF [ROUND[ [#23+#17]*#2]/#2GE[ROUND [#26*#2]/#2]] GOTO300

GOTO150

N300#17=#26-#23

#1=1

GOTO150

N400

G3X0Y0I-[#8-#6]

G3X-[#15-#6] Y[#15-#6]I-[#15-#6]

G90G1X#24Y#25M9

G0Z#500M5

N200M99

N260#3000=10(CUTTER DIA. TO LARGE)

%


#3

omer

Can any one tell me what mean "Macro A" and "Macro B"

Thank author of this post/commentOmer,

Macro A is an older style of programming which is not used much. This would be for comparing conditions thru the actual macro call.

MacroB is to carry variables over thru a macro call and use conditions/statments like IF, WHILE, LE, GT to machine.

Macro programming is very powerful and is probably one of the most underutilized type of programming but the most effective. It is very hard to sum up exactly how it works.

Here is a very quick example.

O0001(main program)

G65P8000A5

M30

O8000(subprogram)

IF[#1EQ5]GOTO200

G1X20.

N200M30

Now in program 1 it will call program 8000 and it will also set #1=5 because A is for #1, B is for #2 etc. If you added a B50 into the G65 line then #2 would =50.

Now in program 8000 it does a IF statement. That line asks IF #1 is equal to 5 (which it is) then go to N200. Which it would end the program and return to program 1. Now if #1 is not equal to 5. Say we set it to 2 then it would not go to 200 but it would run the next line of code which is G1X20. And then end the program at the N200.

Stevo

Stevo


#5

Texas, Texas
Thank author of this post/comment"Macro programming"

Hi, I'm looking for more information on programming with macros. Are there any books or online resources available that anyone could suggest that could help me out. I'm a CNC operator going to school for CNC programming. The programmers at my job have given me a new program to run with macros and I want to learn more about them. They don't know anything about them as they had the program written by someeone from a different company. The program is not working correctly since the programmer is not at our facility. My programmers then have to go back in the office and call the other programmer who fixes one problem then my programmers come back out with the updated version. This whole process could be eliminated if I just could get a crash course on this style of programming and understand more about it. I've got an idea but some more information could be very helpful.

#6

Rameshkumar.A

"thru bore with Macro B Program"

Can anyone help me with a MACRO B VARIABLE program?

I need to do a dia 100 mm thru bore with 25 end mill in VMC Machine


Reply Options
Share your opinions, advice, questions or comments on this post.
Be Heard: Forum reply options:

We encourage everyone to share their opinions, comments, thoughts and information, please consider sharing...

Please register or login in to reply to this post:

It is quick, easy and offers many advantages when using our site.

Social Networking

Share this with your friends on facebook, twitter and Google+

Social sharing because it feels good:
 

Related

Some related posts that may be of interest to you.

Related posts:

Related posts on other sites:

Related eBooks:


Tags and Tagging

Tags help organize related posts and resources by topic.

vmc machinecnc programmingcnc routerprogramingprogramsmazakhaasexamplesprogrammingmacrohow toprogramming examplesmacro b




Have you added a link to us from your website? (236171251):
  • <a href="http://forum.thecncforum.com">CNC Machine</a>
  • <a href="http://forum.thecncforum.com/CNC_Programming">CNC Programming: Macro B Variable </a>
CNC Programming: Macro B Variable All trademarks, copyrights and brands are the property of their respective owners.

(wpozwupzwoozeeu)

Privacy & DMCA Policy -- Sitemap
CNC Programming 'Macro B Variable'
Classification: Forum