100% Employee Owned, Founded 1954


100% Employee Owned, Founded 1954


100% Employee Owned, Founded 1954


CAD to Motion For Drilling Applications

Matt Edwards | September 6th, 2016

In today’s world, there is more demand from engineers, machines, and production than ever before, and tomorrow….there will be more. Engineering staffs run lean and machines are expected to produce more product with higher quality. This trend has increased the demand for flexible, reliable automation.

I was involved in a project that required Cross Company to design a custom gantry that would be used for drilling patterned holes in a material. Ok, easy enough, that application has been done a thousand times.

Traditionally, this application is done two ways. The first is done by creating a user interface where the operator can input a couple of variables. From there, an array of target positions is generated and sent to the controller where it uses those positions as drill locations. Essentially, it creates a pallet of positions. The second way is to simply buy a CNC machine. However, those machines can be very expensive, especially for the size that we were working with. Furthermore, the material was not metal.

Application Specifics

The bottlenose in this application was the complexity and amount of hole patterns. Every part that the engineers run has a different hole pattern. Furthermore, the hole patterns could get pretty complex.

For example, the spacing between Row 1 and Row 2 was different than the spacing between Row 2 and Row 3 on every part. Or, there was a single hole on the pattern that is somewhere off by itself. Or, the dimensions between any two holes was not the same. It makes it 100 times harder for the programmer to account for every possible pattern, and the operator ends up having to put in exponentially more variables to generate the hole positions.

In this application, the engineers could not spend the amount of time it would require to program that. Furthermore, the company had over 100 different hole patterns to account for plus new parts added monthly. An example of a hole pattern can be seen in Figure 1.

Figure 1: This is one sketch of a hole pattern. The hole off by itself makes it very difficult to write a program that will create its position. Remember the engineers had over 100 different holes patterns. Manually inputting all of those into the controller would take a long time.

The real kicker in this application was that the customer wanted to drill with two independent drill heads. The programming required to generate the hole patterns went from simple to difficult and extremely time consuming. Below are the specs of the application:

  • Two independent drill heads on an H-Gantry. Total of 6 axes.
  • Max Velocity = 1.4 m/s.
  • Max Acceleration = 1 G.
  • Over 100 different hole patterns.
  • Some hole patterns have outlier holes.
  • X and X’ stroke length = 3.15 m.
  • Y1 and Y2 stroke length = 1.4 m.
  • Z1 and Z2 stroke length = 0.75 m.

The good news on this application was that the engineers had all of the CAD files already generated for all of the parts with the holes in them. The solution that we came up with was a simple one that would allow for us to use the pre-existing CAD files of the object to generate target positions for the two drill heads.

Our solution to this application included: Parker HMR linear actuators, Parker P-Series motors and drives, and the Parker PAC controller. We were able to help the engineers design this machine and give them a total solution package: everything from the payload, back to the controls. A CAD drawing of the system can be seen in Figure 2.

Figure 2: System set up


Parker HMRs have high moment loading and low deflection ratings making them great for custom gantries. In this application, we provided the engineer with a fully configured system. That includes linkshaft for the X and X’ axes, mounting plates to attach actuator to actuator, cable carriers, and gear boxes.

Motors and Drives

Parker P-Series drives and motors were chosen due because they are very economical drive/motor combinations. The drives are easily connected to the EtherCAT motion bus and are automatically recognized by the Parker PAC. 400 W servos were more than enough to drive this project.

Parker Automation Controller (PAC)

The star of the show was the Parker Automation Controller (PAC). The ability to utilize the built in path following functionality of the PAC was huge. It gave us a way turn the PAC into a simple CNC machine. The engineers had over a hundred CAD drawings of hole patterns that they would need to drill. The PAC gave us a way to use the company’s pre-existing CAD files to control the machine without endless hours of programming. It can be done many different ways, however, I have listed the steps that we used for this application.

How to Drill Holes Using CAD Files

Step 1: Converting the CAD file to G-Code.

The engineers wanted to make the process as simple and straightforward as possible. A problem that we encountered was that when you import a .dxf file into the PAC, it generates all of the G-Code for that file automatically. See Figure 3.

Figure 3: This is an example of what it would look like to import just the .dxf file. The image shows the path that the drill heads will take. We don’t want it to follow the outer edge of the part. We want it to go to the center of each hole location and then drill.

The problem with this is that the PAC will use the entire object as its path. For example, if this .dxf file were to be used, the tool would follow the path with its drill head. It would outline the outside edge of the object and then circle all of the holes. This is not what we want.

The solution was a simple fix. CAD software has the ability to ‘layer’ drawings on top of an existing drawing. All the engineers had to do was make lines from hole center to hole center as a separate layer. Once that was done, the whole .dxf file can be imported into the PAC. The PAC has built-in functionality to select which layer the programmer wants to use. See Figure 4.

Figure 4: This is an example of what it looks like to import a .dxf file with multiple layers. All of the layers all selected in this import, but it is easy to select only 1 layer by unchecking or checking the boxes under the Layers section.

The ending result can be seen in Figure 5 and 6. With this step, the path for the tools is generated very simply and all of the hole locations are known. The ability to use the engineer’s existing drawings to get hole locations was huge because it saved them hours and hours of programming time. Essentially, we took what they already had and made it work for them.

Figure 5: Tool Path Layer.

Figure 6: This is the what the .dxf file looks like after it has been imported into the controller.

Step 2: Editing the G-Code.

So, we have all hole locations or target positions where we need to drill, but how do we drill? If the .dxf file were to be run as is, the drill head would go to that position, stop, then continue to the next hole position.

CNC machines are programmed using M-Code. M-Codes are much like sub-functions; they can do whatever the programmer creates it for. When the controller reads an M-Code, it stops path following and executes the sub function. In our case, that sub-function would be to drill. See Figure 7 for an example of what the code would look like. This process can easily be done by using something as simple as an excel sheet to enter all of the drilling commands into the G-Code. See Figure 8 for entering all of the M-Codes by hand. By doing this step, we have essentially created a very basic CNC machine.

Figure 7: DXF File with M-Code commands.

Figure 8: Excel App created by Cross Motion Solution App Engineer Ben Bishop. Automatically creates the desired CNC file to run the controller.

Step 3: Embedded Variables

A tricky part of this application was having to program for two independent drill heads. If both drill heads are going to be drilling at the same time, then the spacing between them has to correlate to the spacing between the holes. It just so happens that we can save variables in the G-Code that will be used to determine the spacing between the Z1 and Z2 axes. The G36 command is what we used to change the spacing between the Z1 and Z2 axes.

Step 4: Send CAD File to Controller

Now we have the ability to generate hole positions from existing CAD drawings, drill based off of the M-Code commands, and set the spacing between Z1 and Z2 axes. So, how do we get the modified ‘CNC’ file to the PAC? The PAC has a  very useful tool built in it to communicate using FTP. FTP stands for File Transfer Protocol, and it is a standard network protocol used to transfer computer files between a client and server on a computer network.

The engineers wanted the ability to load new ‘CNC’ files into the PAC remotely and easily. By using their existing network, we were able to do that. The FTP site for the PAC is built-in. This allowed the engineer to transfer their modified file into the PAC and use it for every different part that they have. By doing this, the engineer can simply connect to the PAC over their network and send the file to the PAC using FTP. This way, there is no programming change. All the engineer has to do is load the ‘CNC’ file into the controller.


Overall this application was solved using four steps.

  1. Converting the CAD file to G-Code. This can be done simply by importing the DXF file into the PAC. The conversion is done automatically.
  2. Inserting M-Codes for drilling. When an M-Code is read, the tool will stop following its path and perform the motion to drill.
  3. Embed Z1 and Z2 spacing inside the CNC file. This allows us to change the spacing between the drill heads on the fly.
  4. Use FTP and the plant network to send the CNC file to the controller.
Cross Group - Robotics and Machine Automation

Cross Automation Newsletter – October 2019

Take a look at our October 2019 Automation newsletter! Topics this month include:  Cross Company’s Compressed Air Flow Monitor Cross Company is a Factory Authorized Training Center for Universal Robots How to Upgrade from Yaskawa Sigma-II to Sigma-7 Cross Automation is Moving This Fall Download the PDF

Read More »
Cross Group - Robotics and Machine Automation

Cross Automation Newsletter – September 2019

Take a look at our September 2019 Automation newsletter! Topics this month include:  Cross Company is a Factory Authorized Training Center for Universal Robots Cross Company’s Compressed Air Flow Monitor PLCnext by Phoenix Contact Cross Automated Palletizer Download the PDF

Read More »
2019 Events

Two day UR collaborative robot core training class dates for 2019 and 2020

Cross Company is committed to helping you use your Collaborative Robot solution more effectively. Our goal is to highlight unique features, application examples, and provide guidance on how to implement them in your projects further decreasing your installation time and increasing your return on investment. Cross Company is a UR factory authorized training center and

Read More »
Scroll to Top