Thanks Jackson Accidents due to wrong selection of programs can be prevented by using Custom Macros in CNC Controllers Please find below an example just of reference & comment or suggest Supervisor can assign some variable ..we can check with every tool change.. what is program number and variable number.. and make logics.. E.g. Use marco Variable #800 Punch in program number there. in the program also we have to check after tool change IF[#800EQ#100]GOTO1; N1(Reqular Program). In Program #100=Program number.. Program number also can be taken from Fanuc Automatically.. #4115 This 4115 can be used to get the program number automatically.. #100=#4115 means , in #100 your program number will be stored automatically. So that we can compare whatever supervisor sets the program number, same program number runs,.. else we can create alarm and stop.. #3000 = 100 (Alarm); 100 is any arbitrary number you can give any number with macro variable 3000 Whatever alarm text we mention within bracket that will appear on screen for example .. #3000=100 means Alarm number will be 3100 : if #3000=143(wrong program); means Alarm will be "#3143 wrong program" Request for comments/suggestions