## Set Coordinate Rotation

NC Gage provides easy-to-use functionality to define a 2D rotation adjustment for the coordinate system used on the CNC machine by measuring desired features and then selecting the features to use in the coordinate system rotation. Doing the same thing without this functionality, would require you to manually type the appropriate rotation center, axis vector and angle for the G68 code.

Once your features are measured, use the Set Coordinate Rotation screen to select features used in the rotation calculation. NC Gage updates the G68 code or the G68.2 code to use the new rotated coordinate system.

Note: There can be only one rotation macro. Subsequent definitions inside NC Gage overwrite the existing parameters.

1. Select the Measure soft key from the Main screen's Navigation Bar.

2. Select the Forward soft key until you get to the third page of soft keys.

3. Select the Set Coordinate System Rotation soft key to display the Set Coordinate Rotation screen.

The coordinate system rotation can update a G68 code (2D rotation) or a G68.2 code (3D rotation). However, be aware that NC Gage can only perform a 2D rotation, even with the G68.2 code. Regardless of the command used, the change to the coordinate system is defined by a translation and a rotation.

If checked, then NCGage will arrange for the macro program to be called after the program is done executing in case there are other measurement routines required to be executed after this command.

If unchecked, then it is up to the user to call the macro program to activate the Coordinate Rotation as needed.

Screen Items:

- Activate After Execution: If checked, then NCGage will arrange for the macro program to be called after the program is done executing in case there are other measurement routines required to be executed after this command. If unchecked, it is up to the operator to call the macro program to activate the Coordinate Rotation if needed.

Note: The Coordinate Rotations are ways that the coordinate system can be rotated on an NC machine. It is not possible to measure when a Coordinate Rotation is active, so the Coordinate Rotation feature is not activated when the command is executed. The information is computed to macro variables and a macro program can be called that will use this information to perform the Coordinate Rotation. The Activate After Execution provides this functionality of calling the macro program after the current program is done executing when checked. If unchecked, it is up to the user to call the macro program to activate the Coordinate Rotation if needed.

- X, Y, R: These lists display the features in the part program that can be used to define the translation (X and Y lists) and a rotation (R list).

- XYR Value: These read-only boxes show the XY and Rotation (R) value for feature currently selected from the X, Y, and R lists.

- XYR Target: These boxes define the target XY and Rotation (R) value for the coordinate system rotation. Using these boxes you can define the exact coordinate system location and rotation angle to use.

- Comment: This box lets you type a comment for the current system rotation.

Setting a Coordinate System Rotation:

1. Specify the translation in the X and Y directions by selecting features in the X list and the Y list that are valid measurements for each axis. These are point features or other features that have an underlying center point value, such as a circle (bore), that can be used to define the origin in the new coordinate system.

2. Specify the rotation by selecting a feature from the R list that has a valid direction in the XY plane. These are features with direction (such as lines).

3. For each feature define the expected value for the axis or angle in the XZY Target boxes.

4. Press the Confirm soft key to add the coordinate system rotation to the NC Gage program. Even though the coordinate system rotation icon is added to the part program, the coordinate system rotation does not affect the NC Gage program.

NC Gage computes the deltas for the translation and rotation between the actual measurements and the expected values. The X, Y, and rotation are then written to a set of macro variables that are used in a Coordinate System Rotation macro subroutine. This macro subroutine is called when NC Gage closes after the program is done executing.

You can call the macro subroutine again to reapply the coordinate system change. This subroutine macro number is given the same number as the monitor subroutine macro + 2. So, if your monitor program was numbered 7000, this coordinate system change would be numbered 7002. There can be only one rotation macro. Subsequent definitions inside NC Gage overwrite the existing file.

Note: NC Gage cannot run with a coordinate rotation applied. Therefore, coordinate rotations are turned off whenever the monitor subroutine for NC Gage starts. This means that the rotation execution is only active outside of NC Gage until the next time the monitor program starts.

Example:

Suppose POINT2 (shown as B below) is a constructed point from the intersection of LINE3 (shown as C below) and LINE4 (shown as A below), and you selected POINT2 as the new origin and LINE4 as the rotation feature, like this:

This means NC Gage will rotate the coordinate system about POINT2 (at B) and will rotate it to LINE4 (at A). The coordinate system will have POINT2 (at B) as its origin and the new X axis would be the same as LINE4 at A.

Available Navigation Bar Soft Keys on this Screen: