## Set Coordinate System 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 transformation matrixes and vector information with the G68 code.

Once your features are measured, use the Set Coordinate System 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.

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 from the Navigation Bar. The Set Coordinate System Rotation screen appears.

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.

Screen Items:

- 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 executing the program.

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:

| Backward / Forward Back / Forward to previous / next group of soft keys. |  | Select Measurement Face This soft key determines the direction of probing and the location of the clearance moves for the feature. You can press this multiple times to choose a different measurement face. Available faces are: X+, X-, Y+, Y-, Z+ and Z-.
| Delete Current Command / Delete Last Created This soft key deletes the current selected command (or the last created command) from the part program. If this icon is disabled, you may need to delete commands using the Edit Program screen instead. |  | Confirm / Add Command For operations this confirms the selection. For commands, this will append the command to the end of the program. For feature commands, this will become available after the machine has learned the feature location or when you have typed the feature's nominal values.
For constructed and dimension feature commands, this will become available once you have specified the proper input features.

| Insert Command after Current Position This soft key adds the command into the part program but places it after the selected command in the program tree instead of at the end of the program. |  | Cancel All Steps / Abort This soft key stops and resets the current operation. If learning a feature, it removes all the learned probe positions.
| Help This soft key accesses the NC Gage help file. |  | Work Offset This soft key selects the named work offset from the list of offsets. Pressing this again will select the next work offset from the list.
| Return This soft key returns the view up one level to the previous screen. |  |