CNCSimulator Pro

user guide

11.2.2. Special variables

The system offers some special variables used for various things. We have mentioned the read-only variable #0 before.
#3000 is a write-only variable to create alarms. The number you assign to it will be the alarm number + 3000. Here is an example that shows an alarm if a variable is not initialized:
#3006 puts the simulator in pause mode and shows a message. The number assigned to 3006 has no meaning as it is not shown in the message.
The message will stay visible until the user closes it manually or until #3006 is set again, with no message. Like this: #3006=1
#3100 is the same as #0. It is used for NULL-testing.
#3101 is the constant PI (3.14159265...).
#3102 is the constant E.
There are also a couple of variables specific to the simulator only:
#300 is the current absolute X tool position.
#301 is the current absolute Y tool position.
#302 is the current absolute Z tool position.