G00 X1.0 Y#1 ;
Becomes
G00 X1.0.
No Y movement takes place.
Macro Statements
Macro statements are lines of code that allow the programmer to manipulate
the control with features similar to any standard programming language. Includ-
ed are functions, operators, conditional and arithmetic expressions, assignment
statements, and control statements.
Functions and operators are used in expressions to modify variables or values.
The operators are essential to expressions while functions make the program-
mer’s job easier.
Functions
Functions are built-in routines that the programmer has available to use. All
functions have the form <function_name>[argument] and return oating-point
decimal values. The functions provided in the Haas control are as follows:
Function Argument Returns Notes
SIN[ ] Degrees Decimal Sine
COS[ ] Degrees Decimal Cosine
TAN[ ] Degrees Decimal Tangent
ATAN[ ] Decimal Degrees Arctangent Same as FANUC
ATAN[ ]/[1]
SQRT[ ] Decimal Decimal Square root
ABS[ ] Decimal Decimal Absolute value
ROUND[ ] Decimal Decimal Round off a decimal
FIX[ ] Decimal Integer Truncate fraction
ACOS[ ] Decimal Degrees Arccosine
ASIN[ ] Decimal Degrees Arcsine
#[ ] Integer Integer Variable Indirection
DPRNT[ ] ASCII text External Output
Notes on Functions
The function “Round” works differently depending on the context that it is used.
When used in arithmetic expressions, any number with a fractional part greater
than or equal to .5 is rounded up to the next whole integer; otherwise, the frac-
tional part is truncated from the number.
#1= 1.714 ;
#2= ROUND[#1] ; (#2 is set to 2.0)
#1= 3.1416 ;