FAQ 50 Enabling 4th Axis Setup. - CNCzone.com-CNC Machines ...

14
FAQ #50: How do I use a rotary 4th axis on a mill? BobCAD-CAM Q: I’ve read FAQ #46 on how to set up my milling machine. How do I enable 4th axis to actually use it? A: Enabling 4th axis in the machine setup file is covered in a cusory way in that FAQ. The proper checkboxes do need to be set in it, but that’s only the first step. There are two basic methods to using a 4th axis in BobCAD-CAM - wrapping and indexing. Wrapping refers a continuously moving rotary axis where one axis is dropped in favor of the rotary. The most common axis conversion is Y to A, as A (rotary around the X axis) normally displaces the Y axis by a number of degrees on each move. By contrast, indexing is the practice of rotating a part to a certain angle and then machine it in 3 axes as normal using the X, Y, and Z axes. Both methods have their uses which will be apparent in Steps 3 and 4 of the tutorials to follow. Remember that these are essentially two examples in one: both machine two rectangles using a 4th axis milling method, with both tutorials sharing Steps 1, 2, and 5. The machine configuration and the post processor file must be both edited to enable BobCAD-CAM to produce the rotary axis codes in the final program. The changes here only need to be done once and then saved. When the rotary axis is not used, BobCAD-CAM will not attempt to output any rotary axis coordinates using it at all so the post processor will remain safe for 3 axis (XYZ) use. Step 1: Close BobCAD if it’s open. Double click the MillingMachineSetup.exe program normally located in the BobCAD-CAM installation folder, usually C:\Program Files\ BobCAD-CAM\BobCAD-CAM V23\, and the program will start. In the Settings tab, at the bottom, there will be three options the user can choose to enable or disable 4 axis programming in this machine. Choose the option that matches the machine’s capabilities best. Click Save at the bottom of the box and then close the program.

Transcript of FAQ 50 Enabling 4th Axis Setup. - CNCzone.com-CNC Machines ...

FAQ #50: How do I use a rotary 4th axis on a mill?BobCAD-CAM

Q: I’ve read FAQ #46 on how to set up my milling machine. How do I enable 4th axis to actually use it?

A: Enabling 4th axis in the machine setup fi le is covered in a cusory way in that FAQ. The proper checkboxes do need to be set in it, but that’s only the fi rst step.

There are two basic methods to using a 4th axis in BobCAD-CAM - wrapping and indexing. Wrapping refers a continuously moving rotary axis where one axis is dropped in favor of the rotary. The most common axis conversion is Y to A, as A (rotary around the X axis) normally displaces the Y axis by a number of degrees on each move. By contrast, indexing is the practice of rotating a part to a certain angle and then machine it in 3 axes as normal using the X, Y, and Z axes. Both methods have their uses which will be apparent in Steps 3 and 4 of the tutorials to follow. Remember that these are essentially two examples in one: both machine two rectangles using a 4th axis milling method, with both tutorials sharing Steps 1, 2, and 5.

The machine confi guration and the post processor fi le must be both edited to enable BobCAD-CAM to produce the rotary axis codes in the fi nal program. The changes here only need to be done once and then saved. When the rotary axis is not used, BobCAD-CAM will not attempt to output any rotary axis coordinates using it at all so the post processor will remain safe for 3 axis (XYZ) use.

Step 1: Close BobCAD if it’s open. Double click the MillingMachineSetup.exe program normally located in the BobCAD-CAM installation folder, usually C:\Program Files\BobCAD-CAM\BobCAD-CAM V23\, and the program will start.

In the Settings tab, at the bottom, there will be three options the user can choose to enable or disable 4 axis programming in this machine. Choose the option that matches the machine’s capabilities best. Click Save at the bottom of the box and then close the program.

Step 2: Open the desired (.MillPst) post processor fi le in any text editor. The fi le must not have any formatting applied to it, so opening it in a word processor of any kind is not advised. It must contain ASCII text only. For that reason, text editors such as Notepad (in the Accessories category from the Windows Start menu) or Notepad++ (a free, enhanced version of Notepad) are recommended as they are not capable of producing any formatting tags in the saved fi le. Wordpad is not recommended because it can produce rich text output accidentally.

Once the fi le is open, scroll though it and make the following changes:

Place a rotary_xyr_angle and an output_rotary_angle variable into the Start of fi le Standard (line 2) for indexing:

Example:

Before:2. Start of fi le Standard n,t,”M06” n,spindle_on,s n,rapid_move,absolute_coord,work_coord,force_x,xr,force_y,yr n,rapid_move,length_offset,coolant_on

After:2. Start of fi le Standard n,t,”M06” n,spindle_on,s n,rapid_move,absolute_coord,work_coord,force_x,xr,force_y,yr,rotary_xyr_angle n,rapid_move,length_offset,coolant_on output_rotary_angle

Place a rotary_xyr_angle in the Tool change (line 3):

Before:3. Tool change n_forced,t,”M06” n,s,spindle_on n,rapid_move,absolute_coord,work_coord,force_x,xr,force_y,yr

After:3. Tool change n_forced,t,”M06” n,s,spindle_on n,rapid_move,absolute_coord,work_coord,force_x,xr,force_y,yr,rotary_xyr_angle

Also place it in the Null tool change (line 4) for indexing:

Before:4. Null tool change n,rapid_move,force_x,xr,force_y,yr

After:4. Null tool change n,rapid_move,force_x,xr,force_y,yr,rotary_xyr_angle

For wrapping, place the same rotary_xyr_angle variable in Line move rapid XY (line 52).

Before:52. Line rapid move XY. n,rapid_move,xr,yr

After:52. Line rapid move XY. n,rapid_move,xr,yr,rotary_xyr_angle

There is no need to add anything to the feed moves because the Y axis will be converted to A automatically.

The axis register (or, “letter”) needs to be set at line 690 as shown below:

690. Prefi x for X Rotation Move? “A”

That is all that should need to change in the post processor. There could be more added, of course, but these are the bare minimum requirements for 4 axis milling. Save the fi le and close the text editor. Steps 3 and 4 are the only steps that need to be repeated each time 4th axis is required. There are two versions - one for wrapping and one for indexing.

Wrapping in the 4th Axis

Step 3: Open BobCAD-CAM V23. The fi rst thing to do is to defi ne the stock to be cylindrical for a 4th axis wrap of the toolpath.

The stock dialog will appear.

Sc

T

In the Type fi eld, click on the down arrow and choose Cylindrical Stock from the list. The fi elds in the rest of the dialog will change to those used for that stock type.

Set the Stock Diameter to 4 and the Stock Width (X) to 6.

The Lower Edge Rotation Angle sets where the rotation starts from the bottom of the stock. If this is set to something other that 0, the 4th axis wrap will begin from the number set here. For example, if the fi eld is set to 45, BobCAD-CAM will assume Y0 on the stock to be the 45 degree mark and the Y value at the circumference to be 360+45, i.e., 405 degrees. For simplicity and so that the rotary angles in the code are easier to see, leave this fi eld at 0.

The Rotary Axis section permits the user to assign the axis that the rotary table is mounted to. Remember that this will be the cross-axis to the direction of the rotation. For an A axis, the most common setup, it will be the X axis that is rotated around. For B it will be the Y.

Click OK on the box to have BobCAD-CAM accept the new stock setup.

Once the stock is set up, geometry will need to be drawn in the workspace to machine. Click on Other in the main menu and choose Rectangle. The Rectangle dialog will appear in the Data-CAM Tree Manager.

For Width, type in 2 to make the rectangle 2 inches wide.

Click on Sharp Corner and choose Enter in the Origin section. From the drop-down box, choose Bottom Left. and set the X parameter to 2.

The Height fi eld and the Y fi eld under Origin will need some fi guring out. See below before clicking OK to fi nish drawing the fi rst rectangle.

The fi elds in the Rectangle dialog don’t represent degrees around the stock. They represent real distances in Y that have to be found from distances around the circumference of the stock. Usually that will involved fi nding out how many degrees equal what distance in Y.

Some basic algebra is all that’s required to fi gure out how far in Y is how many degrees on the stock. The basic formula is S = Rθ, where θ is the angle in radians. Most prints don’t give the angles in radians, so the degrees will have to be converted to radians in order to get a good Y number.

y = the Y of the part on the screenR = the radius of the stockθ = the angle of the same measurement on the print in degrees.

ISt

S

Ttaid4e

Trtw

Cs

Omd

F

Cd

Tb

The new formula that incorporates this is:

That’s all fi ne and dandy, but how does this get entered into BobCAD-CAM? It turns out that all of the data entry fi elds in BobCAD-CAM that take numbers will also accept simple mathematical formulae. This makes getting the correct answer easy. The above formula is the same as this:

y=R*(θ*pi()/180)

If the radius of the stock is 2” (4” diameter) and θ is 45 degrees, enter this in the Y fi eld:

2*(45*pi()/180)

When the text cursor is removed from the fi eld, BobCAD-CAM will work the math problem and display the answer in the fi eld instead of the formula itself. This one evaluates to 1.5708. That means that 45 degrees on the outside of a cylindrical stock with a 4” diameter is roughly 1.5708 inches. Why not just enter 1.5708? That answer is simple as well. BobCAD-CAM internally represents π out to 15 decimal places. The 1.5708 is a rounded fi gure because the fi eld can’t display more digits than the system decimal display is set to. However, even though only 1.5708 shows, the fi eld actually contains a number accurate to 15 decimals out. If the rounded fi gure is just typed in, the angle will be wrong - in this case, 45.0001. This might not be off by a lot in this example, but it isn’t 45.0, and if that kind of accuracy is neccesary (on extremely small and accurate machines it can be) then it will simply be wrong.

Enter this in the Height fi eld at the top of the box and also in the Y fi eld under Origin:

2*(45*pi()/180)

Click OK and BobCAD-CAM will draw a 45-degree-high rectangle 45 degrees from the bottom of the stock in Y. Enter 2*(225*pi()/180) in the Y fi eld under Origin and click OK again to draw a second rectangle 180 degrees from the fi rst. Click Cancel in the Rectangle dialog to end the function. The stock in the Workspace should appear as this illustration.

That concludes drawing the geometry for a 4th-Axis wrap.

Step 4: Right click on Milling Stock and hover the cursor over Mill 2 Axis. When the fl y-out men u appears, choose Pocketing.

A new Feature Pocket feature will be inserted into the tree. Under it, right click on Geometry and choose Re/Select.

The software will automatically be placed into selection mode. Highlight both rectangles by dragging a box around both of them Click and hold the mouse button and drag the cursor as shown here.

When both rectangles are covered, release the mouse button and both will highlight. Right click anywhere in the Workspace and click OK in the menu that will appear.

Right click on Pocket under the feature and choose Edit. The Pocket dialog will appear where it is possible to set the parameters for the feature.

Abic

WmcO

Ra

For the purpose of this example, the parameters for the pocket can all be left at the defaults. Of interest however is the Posting page. When a cylindrical stock is used, the only parameter that will be shown is the Work Offset fi eld. This is because a 4th-Axis wrap and index cannot be combined. In the next part of the example, more parameters will appear in the box.

Since the example uses the defaults for the feature, simply click OK.

Right click on Pocket once more and choose Compute Toolpath. The result will appear like a simple milled pocket in 3 axes and the difference will not show until the NC code is post processed. To see the result, skip over the 4th axis indexing steps and go straight to Step 5.

The computed toolpath will look like this illustration.

FtcipubTatp

Sf

Indexing on the 4th Axis

Step 3: Open BobCAD-CAM V23. The fi rst thing to do is to defi ne the stock. Right click on Milling Stock and choose Edit. The stock dialog will appear.

In the Type fi eld, click on the down arrow and make sure that Rectangular Stock from the list. The fi elds in the rest of the dialog will change to those used for that stock type.

The Rotary Axis section permits the user to assign the axis that the rotary table is mounted to. Remember that this will be the cross-axis to the direction of the rotation. For an A axis, the most common setup, it will be the X axis that is rotated around. For B it will be the Y.

Click OK on the box to have BobCAD-CAM accept the new stock setup.

Setting up the stock for a 4th-Axis index does not necessarily have to be the same as setting it up for a wrapping operation. The stock when indexing can also be rectangular because the machine will cut one feature, then index for the other one. For the sake of the example here it’s perfectly acceptable. The geometry can be quite different between the two types.

Once the stock is set up, geometry will need to be drawn in the workspace to machine. Click on Other in the main menu and choose Rectangle. The Rectangle dialog will appear in the Data-CAM Tree Manager.

This example will also cut two rectangles in the stock 180 degrees apart. The differences are that the Y height of the rectangles will be a real Y size and not converted from degrees, and if the rectangles are the same, only one needs to be drawn. This is true for any shape, not just a rectangle!

In the Rectangle dialog, set both the Width and Height fi elds to 2. Click the Sharp Corner button. In the Origin section, set the drop-down list to Center and place 3 in the X fi eld and 0 in the Y fi eld. Click OK. This will draw a 2x2 rectangle centered directly on the X axis line as shown here.

IRc

Trtw

Cs

Sbifit

ISar

The geometry for both indexed pockets will be shared between them because the indexing angles are handled in the feature parameters and not in the Workspace like the wrapping does.

Step 4: Right click on Milling Stock and hover the cursor over Mill 2 Axis. When the fl y-out menu appears, choose Pocketing from the list. A new Feature Pocket will be inserted into the tree. Since the rectangle will be cut twice at different indexed angles, two features will be required. Right click on Milling Stock once more and repeat this step to add a second, identical feature to the tree.

Right click on Geometry in the fi rst feature and choose Re/Select. The software will automatically be placed into selection mode. Highlight the rectangle by dragging a box around it. Click and hold the mouse button and drag the cursor as shown here.

The rectangle should highlight. Right click anywhere in the Workspace and click OK in the menu that will appear.

Right click on Geometry in the second feature and repeat the same steps to highlight the rectangle.

The geometry will be associated with both features.

SAAwra

Rsra

Right click on Pocket under the fi rst feature and choose Edit.

The Pocket dialog will be displayed to allow the user to change the parameters that will be used to machine the feature.

For the purpose of this example, the parameters for the pocket can all be left at the defaults. Of interest however is the Posting page. When a rectangle stock is set up, the Output Rotary Angle button and the Rotary Angle fi eld will be available.

To index this feature a certain number of degrees, click the bottom and enter in the angle in the box. The fi rst feature in this example will be indexed 45 degrees.

Since the example uses the defaults for the feature with the exception of the index angle, simply click OK at the bottom of the dialog.

Repeat this step for the second feature. Right click on Pocket under it and choose Edit.

Ftcipsbw

Tnbitd

The Pocket dialog will again be displayed.

In the Posting page is where the features will differ. The fi rst feature was indexed to an angle of 45 degrees. To index this one 180 degrees from that, click on Posting on the left of the box. Click Output Rotary Angle on this feature as well and enter 225 degrees into the Rotary Angle fi eld.

Click OK and the setup for both features will be complete.

Right click on Pocket under both features and choose Compute Toolpath. Note that when the toolpath is fi nished from the second feature that the displayed toolpath will be identical. This is because it is identical, and the rotary axis will not be indexed until the NC code is post processed in Step 5.

Itfo1PCtdfi

Cf

Step 5: The last step to see the NC results for both types of 4th axis code is to post process it. The method for generating the NC code is the same across all feature types and requires only one step.

Click on the plus icon next to CAM Part to display the items underneath it. Right click on Milling Tools and choose Post from the menu that will appear.

When the NC code is fi nished, it will be displayed in the Layer-UCS-Post Manager.

If wrapping on the 4th axis, see the below code:

Note that program has no Y axis except to center the tool over the rotation axis, normally located at Y0. The rest of the program has had the Y axis values replaced with angular A axis instead. When the machine cuts this NC code, it will use simultaneous X and A axis moves but will not use the Y axis.

If indexing the 4th axis, see these examples:

The example on the left is the fi rst feature with only an index on the rotary axis of 45 degrees. The Y axis is not replaced when indexing.

Further in the same program, note that the second feature has an index of 225 degrees around A, matching what was set in the Pocket dialog for each of them.

NerYhwWcau

TfioTi

FnaAP

As is shown, the two methods vary greatly in how they deal with the 4th axis, both in how the geometry and features are set up and in the resultant NC code. Both have their uses that are dependent on the part to be cut in the real world.

The next step is completely optional requires that the user have Level 2 of the Predator CNC Editor for BobCAD-CAM.

Step 6: Right click in the NC code and choose Edit CNC.

The Predator CNC Editor will open and automatically load the NC code.

When the editor is open, change the Template to 4AXVMILL to enable the 4th axis backplotter.

Change the stock line in the header from:

(SBOX X-.25 Y-.25 Z0. L6.5 W13.0664 H2.)

to:

(SCYL S1 X-.25 Y0. Z0. D4.0 L6.5)

.. as shown here.

Note that the stock type was changed from a box to a cylinder and its orientation set to S1. The width and height (W and H) parameters in the stock setup were removed and replaced with D for diameter. The Y was changed to 0 to center the stock for the backplot on the Y axis. For help with the header and what all of its parameters are, see the Help system in the Predator Editor.

When that is done, click on the Backplot icon on the toolbar.

Predator will switch to backplot mode.

T

Wt

When it is available, click on the Start button on the Backplot toolbar.

The backplot will run.

When it is fi nished, the backplot will look like the below. This image has been rotated away from the default view in order to show one of the pockets generated with the 4th axis wrap better. The other is 180 degrees away on the other side of the stock!