There is probably a custom macro program for the tool change that has an IF statement in it - maybe it got changed. The macro program normally has things like moving the Z axis to the correct tool change position, stop and orient the spindle etc. If you look at parameters 6071 - 6089, one of them should be a 6 (for M6 Tool Change). The parameter that the 6 is in determines which program number is being called for the tool change. 6071-6079 are programs 9001-9009 and 6080-6089 are programs 9020-9029.