Alarms and Messages
Programming custom machine-stopping commands can guide operators through the machining process.
There are times when you need (or want) a CNC machine to stop executing a program. One M code, the M00 program stop, will cause the machine to stop as planned, while another, the M01 optional stop, will cause it to stop when a switch is turned on. These two machine-stopping commands are quite helpful and very important.
Most programmers, for instance, include an M01 optional stop at the end of every tool so the operator can see what each tool has done before proceeding to the next tool. They include an M00 program stop whenever the operator must perform a manual task during the CNC cycle, such as clearing chips, adding a tapping compound or reclamping the workpiece.
One program-stopping custom macro command, called “stop with message,” closely resembles the M00 program stop and is controlled by system variable #3006. If the machine executes a #3006 command, it will stop and show a programmed message on the display screen. As with M00, the operator can press the cycle start button to reactivate the cycle.
The obvious advantage of the stop with message command is the message itself, as a
programmer can specify exactly what the operator is expected to do. While a message in parentheses can be placed in close proximity to an M00 command, the operator would have to be monitoring the program in order to see it. With stop with message, the display will automatically switch to the message screen and show the message. The format for the stop with message command is:
#3006 = 100 (Clear chips from pocket)
Again, this command, like M00, is placed in the program whenever the programmer wants the machine to stop.
The syntax also is quite important. System variable #3006 commands the machine to stop. The value (100, in our example) is the message number. With most FANUC control models, this value can range from 100 to 255. Like FANUC alarms, the number provides the programmer with a way to further document the message in a log book (separate from the machine) if additional explanation is necessary. For most control models, the information in parentheses can be as long as 26 characters and is exactly as it will be displayed on the message screen. For our example, this message would be displayed:
MS-100 (Clear chips from pocket)
The “MS” stands for message and lets the operator know this is a stop with message condition. Again, the stop with message command will cause the machine to stop and show the message on the display screen. The operator can restart the cycle by pressing the cycle start button.
Another program-stopping command is the alarm-generating command, specified by system variable #3000. The format for #3000 is the same as for #3006, but instead of simply stopping the program, this command places the machine in alarm state. As with any FANUC alarm, once the alarm is diagnosed, the operator must press the reset button in order to cancel it. The operator cannot force the machine to continue executing the program.
The alarm-generation command is most often used with some kind of decision-making, using the custom macro’s IF statement. If a condition exists that would cause a problem, the programmer can stop the program and put the machine in alarm state.
Say, for example, the programmer wants to confirm that the Y axis is at the zero-return position before a tool change. Maybe there is a tall obstruction on the table that would interfere with the tool-changing system if the Y axis is not at its zero-return position. It so happens that system variable #5022 monitors the current Y-axis position relative to zero return. If #5022 is not zero, the machine is not at the Y-axis zero-return position. In this case, consider these commands:
IF [#5022 EQ 0] GOTO 3
#3000 = 100 (Y axis not home)
N3 (Program continues)
This creates a test that confirms that the Y axis is at its zero-return position. If it is not, an alarm sounds and this message is displayed on the alarm screen:
MC-100 (Y axis not home)
The “MC” tells the operator that this is a macro alarm (as opposed to a program storage alarm [“PS”], over-travel alarm [“OT”] or servo alarm [“SV”]). As with the stop with message command, the number (100) provides a way to further document, and the information in parentheses can be as long as 26 characters and is exactly as it will be displayed on the message screen.
Again, the machine will be in an alarm state if a #3000 command is executed, and the operator must eventually press the reset button to clear the alarm.
Programmed messages give the operator the necessary guidance to get the machine to resume executing the program.
Related Content
Tips for Designing CNC Programs That Help Operators
The way a G-code program is formatted directly affects the productivity of the CNC people who use them. Design CNC programs that make CNC setup people and operators’ jobs easier.
Read More3 Mistakes That Cause CNC Programs to Fail
Despite enhancements to manufacturing technology, there are still issues today that can cause programs to fail. These failures can cause lost time, scrapped parts, damaged machines and even injured operators.
Read MoreTroubleshooting Differences in Programming Methods, Machine Usage
Regardless of the level of consistency among machines owned by your company, you probably have experienced consistency-related issues. Here are some tips to help solve them.
Read MoreA Higbee Thread Milling Custom Macro
Higbee threads provide a full thread form at the very start of the thread. The sharp edge is removed during the machining process.
Read MoreRead Next
Increasing Productivity with Digitalization and AI
Job shops are implementing automation and digitalization into workflows to eliminate set up time and increase repeatability in production.
Read MoreIMTS 2024: Trends & Takeaways From the Modern Machine Shop Editorial Team
The Modern Machine Shop editorial team highlights their takeaways from IMTS 2024 in a video recap.
Read MoreThe Future of High Feed Milling in Modern Manufacturing
Achieve higher metal removal rates and enhanced predictability with ISCAR’s advanced high-feed milling tools — optimized for today’s competitive global market.
Read More