Okuma Post Tweaks

jason.jacques
Participant
Participant

Okuma Post Tweaks

jason.jacques
Participant
Participant

Hello, new to posting to the forums but have been using this modified Okuma post for a while now. A few things that I was wondering if there was any way to change...

 

Rigid tapping in the post is automatically set to MM/Min even though the machine reads it as MM/Rev. So exports F1250.0 for a M8x1.25 @ 1000RPM.

 

Repeat G codes when I use two drilling cycles with G74 the second cycle does not get a G74 placed in the drilling line. Causes drill to rapid instead unless manually put in.

 

Lastly, any time I want a drill to just feed in and rapid retract it always adds a peck, even though it should have none.

 

All of this can be worked around but honestly any help would be greatly appreciated. I attached the current post I am using.

 

 

0 Likes
Reply
Accepted solutions (2)
1,153 Views
6 Replies
Replies (6)

bob.schultz
Autodesk
Autodesk
Accepted solution

The changes you need are pretty basic.  First to get the pitch output for tapping cycles make the following changes in the onCyclePoint function.

 

var F = (gFeedModeModal.getCurrent() == 95 ? cycle.feedrate/spindleSpeed : cycle.feedrate); // was 99
...
case "tapping":
case "right-tapping":
case "left-tapping":
writeBlock(
gCycleModal.format(reverseTap ? 78 : 77),
getCommonCycle(x, y, z, 0),
pitchOutput.format(F) // change from feedOutput to pitchOutput (2 places)
);

To force out the G-code on each cycle make the following change to the gCycleModal definition at the top of the post.

var gCycleModal = createModal({force:true}, gFormat); // modal group 9 // G81, ...

And the following change in the onCyclePoint function.  This will output a full cycle block at each location.

if (true /*isFirstCyclePoint()*/) { // first cycle point

I could not duplicate getting a peck on the drilling cycle.  This is the output that I get.

X0. Y0.  // position to hole
G0 Z0.2362  // position to clearance plane
G181 Z-0.1063 K0.0394 D0.3031 F15.748  // Z=hole bottom, K = Distance between clearance and retract planes, D = incremental depth distance 
G0 Z0.6299 // retract tool

Can you verify these are the parameters that your control is expecting?

 

Thanks



Bob Schultz
Sr. Post Processor Developer

0 Likes

jason.jacques
Participant
Participant

Awesome, those changes have helped out a lot! Thank you.

0 Likes

gmdimarzio88
Collaborator
Collaborator

Does anyone know how to change drill pecking P value to a decimal. For example. If I want a dwell of 5 milliseconds the G code line should look like this: 

G90 G83 X-2.7377 Y0.625 Z-0.7745 R0.03 Q0.3281 P0.005 F16.297 M53

My post is just showing P0
 
Is this where I make the change?
case "counter-boring":
      if (g71) {
        writeBlock(g71);
      }
      writeBlock(
        gPlaneModal.format(17), gAbsIncModal.format(90), gCycleModal.format(82),
        getCommonCycle(x, y, z, cycle.retract),
        conditional(> 0, "P" + milliFormat.format(P/1000.0)),
        feedOutput.format(F), mFormat.format(53)
0 Likes

bob.schultz
Autodesk
Autodesk

Since you are outputting seconds instead of milliseconds for the dwell, you can just use secFormat instead of millFormat to format the dwell output.

    case "counter-boring":
      if (g71) {
        writeBlock(g71);
      }
      writeBlock(
        gPlaneModal.format(17), gAbsIncModal.format(90), gCycleModal.format(82),
        getCommonCycle(x, y, z, cycle.retract),
        conditional(P > 0, "P" + secFormat.format(P/1000.0)), // CHANGE TO secFormat
        feedOutput.format(F), mFormat.format(53)
      );

In the Okuma post you will see these formats defined towards the top of the file.

var secFormat = createFormat({decimals:3, forceDecimal:true}); // seconds - range 0.001-99999.999
var milliFormat = createFormat({decimals:0}); // milliseconds // range 1-99999999

 



Bob Schultz
Sr. Post Processor Developer

0 Likes

gmdimarzio88
Collaborator
Collaborator

Thanks Bob! Here's a sample of the output now. Last thing I need to add is an M1 at the start of each operation.

NS32

(N01 Drill11)

G116 T32

S13334 M03

G15 H06

M51

G00 X5.0125 Y0.4571

G56 Z0.62 HA

Z0.22

G71 Z0.22

G90 G82 X5.0125 Y0.4571 Z-0.2913 R0.05 P0.005 F80.006 M53

Y-0.4878

X2.0375

Y0.4571

X-0.9375

Y-0.4878

X-3.9125

Y0.4571

X-6.8875

Y-0.4878

G00 Z0.22

Z0.62

0 Likes

gmdimarzio88
Collaborator
Collaborator
Accepted solution

Poked around and got the M01 to work the way I want. 
Here's the updated Okuma post. I envy Javascript guru's

 

0 Likes