DELMIA
How to Simulate Toolpaths for CNC Machines | Beginner NC Shop Floor Programmer Tutorial
We'll show you how to use the NC Shop Floor Programmer included within SOLIDWORKS Ultimate to create, verify, and export G-codes for manufacturing.
Make the most of your SOLIDWORKS license and learn how to use manufacturing software in a classroom environment.
View transcript
We've previously shown you how to set up the manufacturing cell, create your part stock the fixture and add some tool resources. But in this NC Shop floor programmer tutorial, we're going to look at how we can simulate the toolpath for machining. We need to generate our toolpath code to machine our parts by a specified sequence of operations. We do this by recognising the geometry of the part using commands on the right hand side of the screen, inside the shop floor machining wizard, or from the toolbar at the bottom. Now we want to start this program with a facing operation. So we'll head to the Prismatic machining tab of the toolbar and select the facing command. The resulting dialog box lets us choose a tool from our library. NC Shop Floor Programmer provides a helpful search tool where you can specify the parameters that you're looking for, as well as in the sequencing tab where our tools are laid out. We'll use the sequencing tab to pick the 50 mill face mill, and then select the bottom plane as that's the face it will machine to. We can see it's also picked the contours of the shape. We can leave these here or remove them by clicking the rubber button. When we do that, a red circle will now indicate that the contour is a requirement and actually needs adding back in. Our contour here should be the same as the stock material. So to add that contour, we can head to the action pad in the command menu at the bottom and choose to show the stock material. So we'll reactivate the contour tool from the dialog box and click the edges of our desired face. Or we could pick the face itself depending on our selection criteria from our pop up toolbar. But once we're happy, we'll press the tick and hide the stock again from the action pad. We can see the contour now follows our stock material instead of the part silhouette. Additional parameters like bounding envelopes can be added if needed. Before we head to the strategy tab. We can choose our toolpath style, step over value, and various other options before choosing between levels or maximum depth as the cutting mode. In this case, we'll set a maximum depth of two millimeters. We can visualise the toolpath by clicking display, and we can hover over it to review any point along the path. If everything looks okay, then we can exit the toolpath display and simulate the toolpath we’ll enable our stock material to see what occurs when this program is run. Pressing play, we see that the cut runs through rather quickly, but NC shop floor programmer lets us slow down that simulation with time controls. So we'll click back to the beginning, activate our time controls, and move the slider to the left to slow the animation before reviewing the toolpath again. The first depth looks too deep, so we'll adjust it by exiting the simulation and modifying the values as we did before. This time we'll change it to one millimeter. At this point, we may also want to add a macro for an extension and a retract. This can be done easily from the macros tab, where we can add axial and horizontal motions from the dropdown menu and press display. To review the toolpath once more on review. We don't actually want that second horizontal motion, so we'll head back to the macros tab and set both dropdowns to build by user, and click the pencil icon to edit them. In this dialog box, we can click components of the path and simply delete them or modify dimensions by double clicking on them. The macro will automatically adjust and we can edit the second motion or copy and paste the path to the other macros. Once we're happy with the toolpath, press okay to save it. The saved path appears under the activities process view tree, under the facing operation. Right click on a tool path in the tree and select the option to Compute Toolpath from the menu to calculate it. We'll say okay to the computing pop up window. And now we're ready to simulate our toolpath. Click on the tree item again and this time select compute and check to open the simulation tool and press play to watch the animation. Okay, so after facing off we want to add a pocketing operation. We'll choose the pocketing command from the prismatic machining tab and pick the bottom face of our pocket on the part to define our working depth. We'll select the top plane from our optional section and zoom in to pick the top face. This defines the pocketing range. The tool automatically selects the 50 mill face mill since we previously used it. To swap our tools, we'll click on the tool name and select a more suitable tool for a search or the sequencing tab, such as a six mill end mill with a holder. This tool number actually already exists, and we're alerted to this with a warning, but it's easy enough to change it as needed. We'll modify the feature and the strategy for this operation. Options include helix outward, helix inward and outward spiral morphing. We can set the tool ratio and adjust the mode and depth of cut. We can also define the number of passes, just the one in this case. And then we'll review our macros. As these have been defaulted to build by user. So in the edit mode we can see that this is going to plund the tool straight down. But we can modify this to add a helical motion. So we'll adjust the helix angle to two degrees and the diameter to four mill. We'll click okay and review the toolpath with the display button. The helix has been included. So the tool follows a spiral outward motion. If the retract isn't as desired we can edit a default path like cylindrical horizontal axial changing it to three millimeters and remove the horizontal section. We'll then choose Build by User from the dropdown to use this modify toolpath. So let's simulate the toolpath by clicking on the pocketing operation in the activity's process view of the tree. And this time we'll pick compute and check toolpath from the menu. Any potential problems that arise are flagged by messages, and any modifications can be made simply by double clicking on the tree items. We'll change the approach by editing the macro and adjusting the radius to a smaller value of 2.5mm. Operations can be copied and pasted from the tree. This will create an exact duplicate of the toolpath, so we'll need to edit these by double clicking on each pocket and changing the contour as before. As before, remove the existing contour by clicking on the rubber icon. Then contour and selecting the new face. We'll display and check the toolpath. Confirm it’s correct and click okay. The new operation takes our existing toolpath data and applies it relative to the new contour We'll repeat this process for the third and final pocket. Now this part requires us to machine the outer wall, which is effectively a pocket with an open contour. So we'll add a new pocketing operation using the same tooling as before for simplicity and choose the bottom face to machine too. The red dashed line indicates a soft boundary formed by an open area or contour. The NC Shopfloor programmer recognises this and automatically changes our pocket type to be an open pocket. Boundary offsets can be added to hard and soft boundaries as needed, but we'll leave both at zero for now. On the strategy tab, we’ll work inward instead of outward, and adjust the number of cuts as desired. Currently it looks okay and we can see the toolpath is forming, but not quite exactly as we need. So returning to the geometry tab, we'll set an offset to ten millimeters from the outside and click display again to review our changes. Our offset is clearly in the wrong direction, so we'll need to update our offset value to be negative to correct the direction. Now, being able to preview our toolpath in the display lets us see the result of every option chosen for our operation. Without reviewing every tab. Despite us not yet touching the macro tab, we can observe that the helix is still present, which is unnecessary when moving outside the path. So we'll modify our approach to be the default axial horizontal horizontal, then build by user to edit and remove unnecessary sections. The updated toolpath looks like it meets our requirements. So we'll click simulate to validate this as we haven't simulated our modified pocket toolpaths, our intermediate results need to be checked and recalculated. So clicking yes on the pop up will automatically update these for our new simulation. Let's check that our toolpath is accurate. We'll slow down our simulation speed and review it. Our simulation highlights some issues that weren't actually obvious in the display mode. This red mark indicates our retract is causing some issues. We’re also receiving a message indicating that there are faults with our toolpath, and there are some dog ears of missed material at the corners. So let's exit the simulation and review our operation. Starting with the retract, we need to increase the clearance to 20 mil in the macro editor. Our dog ears can be removed by increasing the offset on the soft boundary up to -12 mil for this part. So let's check that all that works by simulating the path once more. We’re now well above the job between our steps, our warnings have cleared and our tool moves down outside the material before it starts cutting. Playing the simulation, we can see that the corners are also correctly removed. We'll click okay and look at how we can machine the holes next. To add a hole, we need to head to the axial machining tab and choose from a variety of axial operations. These are simple holes that just need drilling in this case. So we'll choose that command and select our mode from drilling to chip breaking from the drop down menu in the pop up box. Holes can be picked individually or found using the automatic hole search tool. Since we only have six, we'll just select them manually. From here we can define hole parameters including top and bottom face selection and click okay. This generates the toolpath ready for simulating. The simulation shows drilling through. But there's an issue. We're using an end mill instead of a drill bit. To fix this we’ll return to the shop floor machining wizard, expand the tool section and create a resource as a tool assembly. We'll define it as a drilling item by choosing the simple drilling tool from our various options. Configure the tool to your requirements. We've set it as a six millimeter drill bit. And once we're happy click okay. And then okay. Once more. Back in the part we can swap out our tools easily. Double click in the Activities Process view. Navigate to the tool. Click on the header and select the new tool from the sequencing view. We'll click okay and simulate our machining by computing and checking the toolpath again reviewing the simulation step by step to see if there are any other problems. But all looks well. So the final bit to do is export our NC code. While the programming tab may boast a variety of tempting options. It's actually the analysis and output tab that we want. We'll choose the option to generate NC interactively, where we can select the program that we want to use, how we want to output it, and use any other options for formatting as and when we want to. Let's click execute to generate the code for us. This is generated as an app source, but we could also use a CNC post processor as well if needs be the same. So, now you know the basics of using the NC Shop Floor programmer application. If you have any questions or run into any difficulties using NC Shop Floor Programmer, SOLIDWORKS, or any of the other tools on the 3DEXPERIENCE platform, then be sure to get in touch with our expert technical support team via the details on screen.