What's new
What's new

what is the difference between the custom macro-A and macro-B...?

what is the basic concept of macro programming....?

A Macro Program can be a small program, or script, that automates common tasks. These scripts are usually run within programs and can often be created by the user, hence the term User Macro.

The two versions of the Fanuc Custom Macro Language are vastly different in their syntax, but the purpose of each is the same.

Custom Macro A uses Macro Instructions to represent a predefined function, whereas Custom Macro B uses more conventional syntax that states the function directly that is defined by the Custom Macro A Instruction. For example:

Function --------------- Macro A Instruction ------------- Macro B Statement
Definition, Substitution ------- H01 -------------------------- #I = #J
Addition --------------------- H02 -------------------------- #I = #J + #K
Subtraction ----------------- H03 --------------------------- #I = #J - #K
Product --------------------- H04 --------------------------- #I = #J * #K
Division --------------------- H05 --------------------------- #I = #J / #K

and so it goes on for a total of 28 instructions.

The Instructions aren't incremental by 1 from 1 to 28. The last Instruction is H99, the function of which is to force a P/S alarm condition. Accordingly, its not as user friendly as its Version B counterpart and unless you use the language frequently, its more likely that a chart of the Instruction definition be referred to.

Apart from the syntax difference, another major difference is that Custom Macro A does not have Local Variables, nor can Variables be passed as arguments to the Macro being called as is the case with Custom Macro B. Instead, Custom Macro A only has Common Variables that can be accessed and modified by any Macro in which they are used.

Regards,

Bill
 
Last edited:








 
Back
Top