CNCSimulator Pro

user guide
×
Menu
Index

11.6. Notes about differences

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

 
As we mentioned in the introduction, it is important to understand that the macro language in the simulator and in your machine are not exactly the same. Always read your machine manual to find out how the macro language works on your machine. Here we will note some differences that you will need to keep in mind.
 
Local variables in the simulator do only support argument specification I. This specification dictates how the values of certain addresses will be transferred to local variables in 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 has 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: