1. ## QUERY ABOUT USING MACROS

HELLO
I WANTED TO LEARN ABT MACROS AND USING THEM IN TURNING CENTER
1 WHAT IS A MACROS
2 WHERE AND HOW TO USE IT
3 HOW TO CREATE A MACROS
CONTROL FANUC OI-TC
TURNING CENTER
CAN ANYBDY PLZ ASSIST ME IN THIS PROCESS
REGARDS
GIRISH

HELLO
I WANTED TO LEARN ABT MACROS AND USING THEM IN TURNING CENTER
1 WHAT IS A MACROS
2 WHERE AND HOW TO USE IT
3 HOW TO CREATE A MACROS
CONTROL FANUC OI-TC
TURNING CENTER
CAN ANYBDY PLZ ASSIST ME IN THIS PROCESS
REGARDS
GIRISH
1. A macro is a g-code program that gives the ability to have varibles and logic built into the program.
2. If your control has it as an option you use the macro like a normal program.
3. Is a hard question to awnser. The best bet would be the web site mentioned above. Thats how I learned.

Here is a macro that I wrote to find the center of a circle using three points.
I assign the macro to be G154 so that any time I have a G154 in a program it runs the macro to find the center of the circle( with operator help of course).

%
O9010(CENTER OF CIRCLE)
(PROGRAMED 5/27/08 BY CMR)
S800 M3
N5#3006=102(MOVE TO FIRST POINT)
#100=#5021 (STORES CURRENT X POS.)
#101=#5022 (STORES CURRENT Y POS.)
#3006=103(MOVE TO SECOND POINT)
#102=#5021
#103=#5022
#3006=104(MOVE TO THIRD POINT)
#104=#5021
#105=#5022
(CALCULATIONS FOR CENTER OF CIRCLE)
#106=[#103-#105]
#107=[#105-#101]
#108=[#101-#103]
#109=[#104-#102]
#110=[#100-#104]
#111=[#102-#100]
#112=[#100*#100]
#113=[#102*#102]
#114=[#104*#104]
#115=[#101*#101]
#116=[#103*#103]
#117=[#105*#105]
#5221=[[[#112*#106]+[#113*#107]+[#114*#108]]-[[#106*#107]*#108]]/[2*[[[#100*#106]+[#102*#107]]+[#104*#108]]] (CALCULATES CENTER FOR X AND PUTS IN G54)
#5222=[[[#115*#109]+[#116*#110]+[#117*#111]]-[[#109*#110]*#111]]/[2*[[[#101*#109]+[#103*#110]]+[#105*#111]]] (CALCULATES Y AND PUTS IN G54)
M99
%

There is a parametric programming sub forum in the g-code forum. That deals with macro programming.