CNCSimulator Pro

user guide
×
Menu
Index

11.5. The macro variables window

In the simulator, we have built in an invaluable tool for all macro programmers. It is called the macro variables window. It is actually more of a debugging tool where you can see and change variables in real-time. You can also monitor your own expressions. Use this tool together with the stepping feature of the simulator (and use pause points too) to write bug- free macro programs much faster. Also, this tool is invaluable when learning how macro programming works.
 
You open the tool from the View menu.
 
 
Please note that having this window open slows down the simulation considerably. This is because you are giving the simulator much more work, having to fetch and update all the variables in the window. If you want simulation speed performance, keep the window closed.
 
 
At the top you can see four tabs with pages for different types of variables. The table will show you the variables with their corresponding values, read- only status and comments.
 
If you click on a variable in the list, you can edit its value in the panel to the left and click the update button when you are done.
 
At the bottom of the window you find the expression watcher panel. By clicking on the green plus icon, you can add your own expressions (or variables only) to keep an eye on them during execution.
 
We strongly advise you to keep this window open whenever you are writing or editing a macro program. By using the block stepping button, you will be able to follow how variables change during execution, as well as detect logical or mathematical errors much faster and easier.
 
To understand the different groups of variables, we encourage you to read the book we mentioned in the introduction.