The Alarm 2 means that the CNC router thinks that the spindle has moved past one of the travel limits. When the CNC is homed, the firmware sets soft limits for both negative and positive ends of travel for each axis. If there has been a g-code command or a jog move that is asking to go past one of these limits then you will get the Alarm 2
The picture below shows the CNC in the home position from the top view. Note that the Positive X-axis moves to the right and the positive Y-axis moves upward. The CNC is in the home position.
 
Example 1
In this example the workpiece size is 16.5” x 10” x 1” and the Zero point in the gcode file is in the lower-left corner. In UGS, the X-axis is represented by the blue line, and the Y-axis is represented by the red line. The yellow cone is the router bit location.
 
Notice that the workpiece is too far to the right and is outside the cutting area. If you jog to the start position and zero the axes you will get an Alarm 2 when the program runs.
Taking a closer look
The Evolution 3 CNC router which has a 18” x 16” cutting area. The 10” x 16.5” workpiece easily fits inside the cutting area. However, the machine is jogged 2” in the X, 3” in the Y, and -1.5 Z before I reset all the axes.  Please see the Controller State DRO (Digital Read Out) in the picture below.
The small numbers (2.000, 3.000, -1.500) represent how far the CNC is from the home position (the machine zero position).
The workpiece is 16.5" long on the X-axis and we jogged 2 more inches. The total travel would be 18.5". 2” of jog and 16.5” of the workpiece.  Once we click play, we will get the Alarm2 because our machine has 18” of travel in the X and we have gcode that commands the X-axis to move 18.5” or 0.5” too far.
The workpiece needs to be moved to the left so that it is in the cutting area.
 
Example 2
In this example the workpiece size is 16.5” x 10” x 1” and the Zero point in the g code file is in the center of the workpiece. In UGS, the X-axis is represented by the blue line, and the Y-axis is represented by the red line. The yellow cone is the router bit location.
 
Notice the workpiece is extended too far to the left and is outside the cutting area. If you jog to the start position and zero the axes you will get an Alarm 2 when the program runs.
Taking a closer look
The Evolution 3 CNC router which has a 18” x 16” cutting area. The 10” x 16”  workpiece fits inside the cutting area. However, the machine is jogged 7” in the X, 3” in the Y, and -1.5 Z before I reset all the axes.  Look at the Controller State DRO.The small numbers (7.000, 3.000, -1.500) represent how far the CNC is from the home position (the machine zero position).
The workpiece is 16" long on the X-axis and the machine is jogged 7". The center point is zero which means half of the workpiece is to the left of the zero points. The gcode file is going to want to move to the left 8” (half the workpiece) which is 1” further than the X-axis can travel because the X is only 7” from the home position.
Once we click play, we will get the Alarm 2 because our machine has only been jogged over 7 inches from the end of the travel on the X-axis and we have gcode that commands the X-axis to move back 8”
The workpiece needs to be moved to the right so that it is in the cutting area.
Example 3
The Z-axis has the same soft limits.
If the workpiece is thin and a bit short, the CNC may not be able to reach the desired depth of cut.  The total range of Z-axis travel for the Evolution 3 is 3.3”. Z-3.3 is the bottom travel point. In the DRO picture below, you can see that I have zeroed the Z-axis at -3.000”.  This means I can only move down another 0.3” before I am out of travel. If I try to cut down 0.4" it will give me an Alarm 2.
The small numbers (7.000, 3.000, -3.000) represent how far the CNC is from the home position (the machine zero position).
A simple solution is to raise the workpiece by adding a spacer beneath it or extending the bit further out of the router collet giving more travel at the bottom of the travel range.
Example 4
If you have a thick workpiece and a long bit, then the CNC may try to move up beyond the CNC’s travel.  In the DRO picture below, The Z axis has been zeroed at -0.250” which means it can only move up another 0.25” before it is out of travel. If my Z Safe is set to 0.5" it will give an Alarm 2 when it tries to rapid to the first cutting position.
The small numbers (7.000, 3.000, -0.250) represent how far the CNC is from the home position (the machine zero position).
The solution is to reduce the Z safe in the CAM software (software used to make the gcode) or push the bit further inside the collet, giving more Z travel at the top of the travel range.
October 06, 2021 — Gabe Bates