---
title: Mapping X/Y G-code to cylinder on A-Axis
slug: mapping-xy-g-code-to-cylinder-on-a-axis
docTags: 
createdAt: 2023-12-14T10:27:00.421Z
---

### Mapping X/Y G-code to cylinder on A-Axis

This is useful if you have a 4th axis and want to mill on the outside of a cylinder as if it were the X-Y plane. You must have set up the A axis as “4THMILL”. This is possible with a normal XY G-Code file. EdingCNC will perform the mapping for you. Some calibration needs to be done to make this work. It is done on the coordinates page. The location of the A-axis rotation point needs to be set and also the radius of the workpiece needs to be set first.

![](https://api.archbee.com/api/optimize/wP9peVc2bAVBPOh6IboCS/rsc9LeI7XE-A9Ixcek6vo_screenshot-coordinate-tab-with-5th-axis-milling.jpg)

**First, we set the location of the A rotation point:**

We move by jogging or MDI to the center point of rotation of the A axis, only Z and Y are important here. Press button "**1. Set to current position**". Done, center is set.

**Next, we set the outside radius of the workpiece:**

There are *two&#x20;*&#x70;ossibilities to do this:&#x20;

1\. Just type the radius if you know it and press "**Set Radius**"&#x20;

2\. We move the Z up touch the outside of the material with the tool bit and press&#x20;
"**Calibrate Radius**".

Calibration is done. First, we need to be sure that our Y axis is at the correct position before we switch on the Y->A mapping. We need to do this now because when the mapping is ON, Y can no longer be moved, as Y is now mapped to A. You can press "**Move Y to rotation point**” to do the movement.

The mapping can be switched ON now. Then, we can load a standard G-Code file with XYZ coordinates. Below, we see how it looks in the graphic.

Position the X and the Z at the zero point of the drawing, so where the milling should start.

Now Zero all axes in the **Operate&#x20;**&#x73;creen

:::hint{type="info"}
Important: Zero the Z at the top surface of the cylindric material, in this case, the material has a radius of 20 mm, so the Z zero is 20 mm higher than the CenterPoint.
:::



**Y to A mapping OFF**

//IMAGE of flat picture....



**Y to A mapping ON**
