9 0
Macros
96-8000 rev R June 2007
CAUTION! Do not use outputs that are reserved by the system. Using these outputs may result in injury or damage
to your equipment.
The user can change the state of these outputs by writing to variables designated as “spare”. If the outputs are
connected to relays, then an assignment of “1” sets the relay. An assignment of “0” clears the relay.
Referencing these outputs will return the current state of the output and this may be the last assigned value or it
may be the last state of the output as set by some user M code. For example, after verifying that output #1108 is
“spare”:
#1108=1; (Turns #1108 relay on)
#101=#3001+1000; (101 is 1 second from now)
WHILE [[#101 GT #3001] AND [#1109 EQ 0]] D01
END1 (Wait here 1 second or until relay #1109 goes high)
#1108=0; (Turns #1108 relay off)
If the control is not equipped with the M-code relay board, then M21 through M28 will be mapped from #1132-#1139.
If the M-code relay board is installed, see the 8M-option section for information and instructions.
Note: Always test or dry run programs that have been developed for macros that is using new hardware.
Maximum Axis Loads
The following variables are used to contain the maximum load values for each axis. They can be cleared by cycling
power to the machine or by setting the macro to zero in a program (for example, #1064=0;).
1064 = X axis
1264 = C axis
1065 = Y axis
1265 = U axis
1066 = Z axis
1266 = V axis
1067 = A axis
1267 = W axis
1068 = B axis
1268 = T axis
Tool Offsets
Each tool offset has a length (H) and radius (D) along with associated wear values.
#2001-#2200
H geometry offsets (1-200) for length.
#2200-#2400
H geometry wear (1-200) for length.
#2401-#2600
D geometry offsets (1-200) for diameter.
#2601-#2800
D geometry wear (1-200) for diameter.
Programmable Messages
#3000
Alarms can be programmed. A programmable alarm will act just like Haas internal alarms. An alarm is
generated by setting the macro variable #3000 to a number between 1 and 999.
#3000= 15 (MESSAGE PLACED INTO ALARM LIST);
When this is done, “Alarm” flashes at the bottom of the display and the text in the next comment is placed into the
alarm list. The alarm number (in this example, 15) is added to 1000 and used as an alarm number. If an alarm is
generated in this manner all motion stops and the program must be reset to continue. Programmable alarms are
always numbered between 1000 and 1999.
The first 34 characters of the comment will be used for the alarm message.
Timers
Haas macros can access two timers. These timers can be set to a value by assigning a number to the respective
variable. A program can then later read the variable and determine the time passed since the timer was set. Timers
can be used to imitate dwell cycles, determine part-to-part time or wherever time-dependent behavior is desired.
#3001 Millisecond Timer - The millisecond timer is updated every 20 milliseconds and thus activities can be timed
with an accuracy of only 20 milliseconds. At Power On, the millisecond timer is reset. The timer has a limit of 497
days. The whole number returned after accessing #3001 represents the number of milliseconds.
Summary of Contents for Mill
Page 12: ...96 8000 rev R June 2007 Safety 5 ...
Page 14: ...96 8000 rev R June 2007 Safety 7 LATHE WARNING DECALS ...
Page 15: ...8 Safety 96 8000 rev R June 2007 ...
Page 17: ...10 Introduction 96 8000 rev R June 2007 ...
Page 117: ...110 4 5 Axis Programming 96 8000 rev R June 2007 ...
Page 199: ...Settings 192 96 8000 rev R June 2007 ...