July 2013 8.1 Display and operation 1231
NC-function macro
at overload
The entry M in the OVLD column of AFC.TAB can be used to call an NC-function
macro for each control strategy as a reaction to an overload. The AFC detects
that the spindle load has been exceeded if the actual feed rate is below the
value in FMIN for more than one second. No more than one minute after the
overload has been detected is the NC macro performed. The path for the NC
macro must be entered in the PLC:\ncmacro.sys file via the keyword AFC as
follows:
AFC = <path><ncmacro>.H
e.g: AFC = PLC:\NC_MACRO\AFC_STOP.H
If this entry is not in the ncmacro.sys file or the NC macro does not exist, then
the NC program is stopped with the corresponding error message. The FN17
function SYSWRITE ID990 NR11 can also be used for the AFC NC macro. It
makes it possible to perform a tool change with subsequent positioning. This
way replacement tool can be inserted in a tool-change procedure as part of an
AFC NC macro. Use the following NC macro for this:
1 ;Read current tool number: Q1
2 FN 18: SYSREAD Q1 = ID20 NR1
3 ;Read maximum tool life of the tool (at TOOL CALL): Q2
4 FN 18: SYSREAD Q2 = ID50 NR10 IDXQ1
5 ;Set current tool life of the tool to maximum tool life
6 FN 17: SYSWRITE ID50 NR11 IDXQ1 = Q2
7 ;Insert the replacement tool using repositioning logic
8 FN 17: SYSWRITE ID990 NR11 = 0
The FN function FN 17: SYSWRITE ID990 NR11 cannot be used with active
radius compensation if the tool change is performed in a change macro. This
new FN function works with a tool change only with PLC positioning.
As an alternative to block number 8 in the macro FN 17: SYSWRITE ID990
NR11 = 0, an automatic tool call with M101 (On) and M102 (Off) can be
performed at defined points in the NC program. For this, you must delete block
8 from the macro and enter M101/102 at the possible tool change points in the
NC program. If the machining run-time between M101/102 pairs is shorter
than one minute, it is ensured that a possible tool change will be performed
one minute after the overload message M has occurred.
Otherwise, the time until the tool change will be extended. Depending on the
duration of the longest individually occurring NC block, the change time may
always be extended by the duration of this block.
Example:
An NC block with a duration of 40 seconds, and five blocks, each with a
duration of two seconds, are executed in a loop.
The look-ahead times (limited to a machining time of one minute) result in: 40
+ 2 + 2 + 2 + 2 + 2 = 50 seconds. Because the result is < 1 minute, the long
block of the next loop is added. The result is 50 + 40 = 90 seconds of look-
ahead calculation. The tool change macro can be inserted at this point, if
required.
If the machining process is at the beginning of the long block when the
overload occurs, the remaining time of the long block will also be added. This
can result in a time of 90 seconds + remaining time, e.g. 35 seconds =
125 seconds plus a further delay through feed rate reduction by
AFC (e.g. 80% = 125 * 1.25 = 156 seconds) from the occurrence of the
overload to the execution of the tool change macro.