CNCSimulator Pro

user guide
×
Menu
Index

11.1. Introduction - Custom Macro B

The Macro programming language in CNCSimulator is inspired by the Fanuc Custom Macro B language. Here we will do a brief presentation of the language. If you are new to parameterized programming, we recommend you to read the book "CNC Programming using Fanuc Custom Macro B" by S. K. Sinha (ISBN 978-0-07-171332-0) where you will get in-depth knowledge about the language.
 

What is Custom Macro B?

 
It is a high level computer language. It is more like other computer languages than traditional CNC programming. It offers much more flexibility due to its use of variables, loops, conditions, and its calculation capabilities.
 

A word about safety

 
The Custom Macro language built into CNCSimulator is not 100% compatible with the original Fanuc Custom Macro B language due to the differences between a computer program and a real CNC controller. We strive to make it as compatible as practically possible but there will always be differences between the two, intentional and unintentional.
 
CNC programming and especially Macro programming can be dangerous, and people can get injured and even killed because of programming mistakes. It is important that you understand that it is your responsibility only to make sure that the program runs correctly on your machine, if you intend to run a program made in the simulator on it. Just because a macro program works correctly in the simulator, it does not mean that it is guaranteed to work correctly on a real CNC machine and vice versa. The creators of the CNCSimulator Pro software, or any of their associates, do not take any responsibility for damage or injuries that may occur.
 

Turn the Macro interpreter on

 
Before starting to use macro programming in the simulator, you need to turn it on. Go to Settings and activate the Activate Macro interpreter setting.
 
 
The reason it is turned off by default is that the interpreter has a slight performance hit and for users not programming in this language, there is no reason having it turned on.
 
Please note that Macro programs are limited to run in the 3D view only.