CNC Simulator Pro

user guide
×
Menu
Index

10.6. Notes about differences

Notes about differences between the Macro B language in the simulator and the one in Fanuc controls

 
As previously mentioned in the introduction, it is crucial to comprehend that the macro language utilized in the simulator may differ from that of your actual CNC machine. It is recommended to consult your machine's manual to determine how its macro language functions.
 
To aid in this endeavor, we have compiled a list of key differences between the simulator's macro language and that of a typical CNC machine. One such difference is that local variables within the simulator solely support argument specification. This specification defines how the values of specific addresses will be transferred to local variables during a macro call.
 
Address
Variable number
A
#1
B
#2
C
#3
D
#7
E
#8
F
#9
H
#11
I
#4
J
#5
K
#6
M
#13
Q
#17
R
#18
S
#19
T
#20
U
#21
V
#22
W
#23
X
#24
Y
#25
Z
#26
 
Example:
 
G65 P1000 X200.4 A22.2 C31
 
For the following macro call, the local variables will be set as follows in the macro:
#24 = 200.4
#1 = 22.2
#3 = 33
 
All other local variables will be set to NULL.
 
As mentioned earlier, the simulator does not allow you to use NULL values (values that have not been assigned a value). It will show an alarm. On a Fanuc controller, NULL values are allowed and will, depending on the situation, either be ignored or have the value 0.
 
System variables in the simulator are read-only. In a Fanuc controller, many system variables are read-write.
 
System time variables (#3001-#3002 and #3011-#3012) are not implemented in the simulator.
 
The SETVN command is not available in the simulator. All variables must be written with a hash sign (#) followed by an integer.
 
The macro interpreter has to be activated in settings for macro programs to work. This will also affect how the macro codes and expressions are colored in the editor.
 
Before turning the macro interpreter on:
 
 
After turning the macro interpreter on: