Hello ChipSplitter,
For the most part, the Fanuc and Haas User Macro language can be considered the same. Local, Common Volatile and Common Nonvolatile Variables are the same. Many of the System Variables considered to be standard are the same.
There are a lot of Fanuc System Variables available that are not listed in the Fanuc Manual. The reason for this is that Fanuc supply their controls to many different MTBs and its the responsibility of the MTB as to whether additional System Variables are supplied or not. As Haas is both the supplier of the Software and the MTB, many additional System Variables are available.
One major difference between the Fanuc and Haas System is that Haas supply a "G" Code to set, or limit the number of Look Ahead Blocks. By specifying G103 with a P address in the range of 1 to 15, the number of Look Ahead Blocks is limited to the number specified by the P address. If P0 is specified, or G103 is included in a Block with the P address omitted, then Look Ahead Limiting will be disabled. The Fanuc System doesn't have this feature and a Work Around must be employed when the Look Ahead must be stopped.
Being able to stop the Look Ahead Block is very important in some circumstances. For example, if you needed to get the Current Machine Position at the end of a move, then you may think that the following would suffice:
G90 G54 X0.0 Y0.0
G43 Z10.0 H01
#1=#5023
------
------
------
------
If in the above example the Workshift for Z in G54 is -210.123 and the Tool Length Offset registered for H01 is 85.60, then the Machine Position in Z at the Absolute Z10.0 position will be -124.523. Accordingly, one may expect that #1 will take on this value when it reads the System Variable #5023. Not so. In fact, the result of the above code is likely to be a value of circa -0.10 being registered in Local Variable #1. To get the desired result, the above code would have to be rewritten as follows:
G90 G54 X0.0 Y0.0
G43 Z10.0 H01
G53 (or G31)
#1=#5023
The above code will stop the Look Ahead before #1=#5023 is executed and ensures that the G43 Z10.0 H01 is completed before #5023 is read.
Regards,
Bill