MADE BY:- MEET SHAH
ENROLL. NO:- 156050319051
SUBJECT:- CAM
BRANCH:- MECHANICAL (SFI)
COLLEGE :- B&B INSTITUE OF TECHNOLOGY
What is macro?
Definition of macro.
Why use macro?
G and M codes.
Types of Variables .
 A sequence of instructions which are stored and
called up as one integral unit.
 Macro programming is useful tool for many cnc
machines.
 It provides a mean of shortening code and doing
repetitive tasks easily and quickly.
 Macro is also useful for families of parts.
A macro is a form of subprogram that
includes non G commands.
It is typically a common operation that will
be called many times.
Any program that performs a common
function and will be executed repeatedly
within a G code program.
A G-code program is rigid in structure and
can not be altered in mid-operation.
Offset are the only means to adjust the
machine path from one run to the next.
Macros add flexible with the use of
additional macro statements.
 With macros you can set up families of
parts, create custom canned cycles and
drive optional devices.
M01 Optional Program stop
M00 Program stop
M30 Program end and reset
G04 Dwell
G65 Macro sub program call
M97 Local sub program call
M98 Sub program call
M109 Interactive user input
Local variables
Global variables
System variables
String variables
 These variables are local to the program.
 They are used to transfer values to a cycle
call or as intermediate mathematical value
holders.
 They are reset to null when program is reset
or end.
 The local variables are typically #100-#499.
These variables once set remain set
unless you change or reset them.
Unlike local variables they are available in
any program.
It can be retained and used in any
program.
Global variable are typically #500-#999.
These variables are available to use in
macro programming and allow you to write
and retrieve information from control itself,
such as tool in spindle, tool offset active
etc.
It is group of characters interpreted as
single value.
Typically defined as $ symbol.
It allows you to manipulate text and
phases etc. `
Macro

Macro

  • 1.
    MADE BY:- MEETSHAH ENROLL. NO:- 156050319051 SUBJECT:- CAM BRANCH:- MECHANICAL (SFI) COLLEGE :- B&B INSTITUE OF TECHNOLOGY
  • 2.
    What is macro? Definitionof macro. Why use macro? G and M codes. Types of Variables .
  • 3.
     A sequenceof instructions which are stored and called up as one integral unit.  Macro programming is useful tool for many cnc machines.  It provides a mean of shortening code and doing repetitive tasks easily and quickly.  Macro is also useful for families of parts.
  • 4.
    A macro isa form of subprogram that includes non G commands. It is typically a common operation that will be called many times. Any program that performs a common function and will be executed repeatedly within a G code program.
  • 5.
    A G-code programis rigid in structure and can not be altered in mid-operation. Offset are the only means to adjust the machine path from one run to the next. Macros add flexible with the use of additional macro statements.  With macros you can set up families of parts, create custom canned cycles and drive optional devices.
  • 6.
    M01 Optional Programstop M00 Program stop M30 Program end and reset G04 Dwell G65 Macro sub program call M97 Local sub program call M98 Sub program call M109 Interactive user input
  • 7.
  • 8.
     These variablesare local to the program.  They are used to transfer values to a cycle call or as intermediate mathematical value holders.  They are reset to null when program is reset or end.  The local variables are typically #100-#499.
  • 9.
    These variables onceset remain set unless you change or reset them. Unlike local variables they are available in any program. It can be retained and used in any program. Global variable are typically #500-#999.
  • 10.
    These variables areavailable to use in macro programming and allow you to write and retrieve information from control itself, such as tool in spindle, tool offset active etc.
  • 11.
    It is groupof characters interpreted as single value. Typically defined as $ symbol. It allows you to manipulate text and phases etc. `