Arithmetic & Trig
Do trigonometry in a Haas macro and know that trig is in degrees.
Macro math uses square brackets, and — exactly like Fanuc — trig is in degrees, not radians. COS[30] is 0.866. Your Fanuc habits carry over verbatim here; that's the whole design of the Haas control.
Your turn
The machine hands you a bolt-circle radius in #101 and an angle in degrees in #120. Compute the point on the circle: #121 = the X distance, #122 = the Y distance.
The machine gives you
50 mm radius at 30°:
#101 = 50#120 = 3020 mm radius at 60°:
#101 = 20#120 = 60Your program is run once for each set of conditions. It has to work for all of them.
Loading...
This is a learning simulation — always prove out a program on the actual control before you cut metal.