Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

G99 rapid move intercept


Recommended Posts

I need to know what variable is active during the rapid call of the g99 that specifies that the rapid call was from a drill cycle.

I have uploaded a copy of the post that I am currently editing.

In this post, I use a misc. integer to set a switch to alter the format of the code, so the code doesn't show a g99 even though the box is checked.

This is the current code - on the first drill cycle, the "Use clearance only at the start and end of operation" is not checked, and on the second drill cycle, it is checked. 

%
O0000(RAPID TEST 004)
(DRILL - CLEARANCE, NO CHECK)
G43H290S1069Z2.M8M3
G98G81Z-1.R.1F6.42L0
X0.Y0.
Y2.
X2.
Y0.
M0
(DRILL - CLEARANCE, CHECK)
G43H290S1069Z2.M8M3
X0.Z.1  ---- I want to remove this line
G98G81Z-1.R.1F6.42L0
X0.Y0.
Y2.
X2.
Y0.
Z2.
M30
%

 

I have noted the line that I want to remove.

 

Here is the section of the post that I think needs altered, but I am not sure which variable is active to denote that this rapid call is from a drill cycle.

prapidout       #Output to NC of linear movement - rapid
      if sav_mi10=0,
        [
        pcan1, pbld, n$, sgplane, `sgcode, sgabsinc, pccdia,
         pxout, pyout, pzout, strcantext, e$  #pscool, jaw
        ]
      if (sav_mi10=1 & gcode$ <> 81),                                          ---gcode$ isn't 81 during the first rapid move during a g99
        [
        pcan1, pbld, n$, sgplane, `sgcode, sgabsinc, pccdia,
         pxout, pyout, pzout, strcantext, e$  #pscool, jaw
        ]
      if (sav_mi10=1 & gcode$ = 81),
        [

        ]

SIP 3X GANTRY MILLS_FANUC-Test 004.pst

Link to comment
Share on other sites

You can get the "type" of operation that is active from 'opcode$'.

opcode$ = 3, means we are processing a 3X Drill Cycle.

opcode$ = 16, means we are processing a 5X Drill Cycle.

I have to ask though, why do you want to remove the 'X0.Z.1' from your Cycle?

You have 2 Drilling Operations in Mastercam. I can tell by your NC output.

The first Operation you have successfully suppressed the XY output. In the second Operation, all you are outputting is the "Tool Length Offset Compensation".

-------------------------------

Sure, you can successfully suppress the XY positioning from the code, but that seems like a fairly odd request.

Typically when I setup a Post for someone, I'll at least warn them that what they are attempting is a crash waiting to happen, unless they are the one who is both Programming the NC Code output, and running the job on the machine.

-----------------------------------

Are you 100% sure that the G81 line does not immediately start drilling at whatever the "current" XY location is?

Typically we would use the following set of events, in this particular order, to make sure that it is safe to drill, and safe to restart.

  1. Move in Rapid Mode, in Absolute Coordinates, specifying Inches per Minute Feed Mode, to the Work Offset Location (G55-G59), to the START HOLE X and Y POSITION, while Starting the Spindle Rotation the correct direction, at the Commanded Spindle Speed.
  2. *(now we are above the 1st hole in XY), Move in Z, to the Clearance Plane Height, while enabling Tool Length Compensation, and specifying Which Tool Offset Register to read, and turning on the Flood or Thru Spindle Coolant.
  3. Call the G8x (G81-G89) Drill Cycle, to drill the 1st hole. This line has the Final Z Depth, the R plane, and the Feed Rate as required parameters, and other optional parameters, depending on cycle type.
  4. All other hole positions are given in XY below the G81 cycle, indicating the new locations to repeat the cycle.
  5. G80 on a separate line cancels the cycle.

 

I'm guessing you have a particular reason for wanting such bare-bones G-code, and I wish you luck in whatever you are trying to accomplish.

Link to comment
Share on other sites

Thank you for your response Colin and I appreciate your concerns.  The reason for the bare bones code is that the operators request the code that way.  It is running on a single tool machine, so they generally only need locations, but sometimes they need a more complicated group of tool paths, so I cannot remove any of the functionality of the post.  I am simply trying to reduce the amount of hand editing prior to the operators receiving the program.  Also, the L0 at the end of the drilling line will make the program wait until the next line to start processing according to the information that I have received from the operators.  

Link to comment
Share on other sites

Thank you again Colin, the opcode$ is exactly what I was looking for.  Here is what I did to prapidout to achieve my goal.

prapidout       #Output to NC of linear movement - rapid
    if sav_mi10=0,
        [
        pcan1, pbld, n$, sgplane, `sgcode, sgabsinc, pccdia,
          pxout, pyout, pzout, strcantext, e$  #pscool, jaw
        ]
    if (sav_mi10=1 & opcode$ = 3),
        [

        ]
    if (sav_mi10=1 & opcode$ <> 3),
        [
        pcan1, pbld, n$, sgplane, `sgcode, sgabsinc, pccdia,
          pxout, pyout, pzout, strcantext, e$  #pscool, jaw
        ]
    #Modify following line to customize output for high-speed toolpath
    #tool inspection/change points
    if rpd_typ$ = 7, pbld, n$, "M00", "(TOOL INSPECTION POINT - POST CUSTOMIZATION REQUIRED)", e$
 

Link to comment
Share on other sites
On 4/24/2019 at 2:03 PM, Machinist-R1 said:

For future reference, what are the other opcode$ types?

opcode$

2 Contour
3 Drill
4 Pocket
5 Ruled
6 2D swept
7 3D swept
8 Revolution
9 Loft
10 Coons
13 Surface finish
14 Surface rough
15 Point
16 Drill 5-axis
17 Curve 5-axis
18 Swarf 5-axis
19 Face
20 5-axis multi-surface
21 5-axis slice
22 5-axis port
23 5-axis circle
25 Probe

It exists tool_op$ which is more detailed :

tool_op$

1 Contour
2 Drill
3 Pocket
4 Version 7 linear array; Version 8 mirror, rotate, translate
5 Multi-surface rough parallel
6 Multi-surface rough radial
7 Multi-surface rough project
8 Multi-surface rough flowline
9 Multi-surface rough contour
10 Multi-surface rough pocket
11 Multi-surface finish parallel
12 Multi-surface finish radial
13 Multi-surface finish project
14 Multi-surface finish flowline
15 Multi-surface finish contour
16 C-Hook-created operation
17 Manual entry
18 Version 8
19 Point
20 Trimmed
21 Ruled
22 Revolved
23 Letters
24 Swept 2D
25 Swept 3D
26 Coons
27 Lofted
28 5-axis drilling

29 5-axis curve
30 Project toolpath onto a plane
31 Project toolpath onto a cylinder
32 Project toolpath onto a sphere
33 Project toolpath onto a cone
34 Project toolpath onto a cross section
35 Project toolpath onto a surface
36 Non-associative contour
37 Non-associative drilling
38 Non-associative pocketing
39 Multi-surface finish pencil trace
40 Multi-surface finish leftover stock
41 Multi-surface finish steep
42 Multi-surface finish shallow
43 Multi-surface finish constant scallop
44 Multi-surface rough plunge
45 Multi-surface finish 5-axis flowline
46 Multi-surface finish 4-axis
47 Merged in ASCII NCI
48 5-axis swarf
49 5-axis roll die
51 Face contouring
52 Cross contouring
53 C-axis contouring
54 Non-associative drilling, not used
55 Face drilling
56 Cross drilling
57 C-axis drilling
100 Thread mill
101 Edit common operation parameters
102 Facing
103 Associative trimmed
104 Solid drill control operation
105 Slot mill
106 Helix bore

107 Multi-surface rough restmill
108 Associative nesting container operation
301 Router Contour
302 Router Pocket
303 Router Circmill
304 Router Cutoff
305 Router Surface Rough Pocket
306 Router Multi drill

 

  • Thanks 1
  • Like 1
Link to comment
Share on other sites
1 hour ago, jeff.D said:

Just so you are aware, that list of tool_op$s is not for the current release of Mastercam.

That list comes from X9 post documentation. It should still work with current release but it's incomplete as it misses toolpaths released later and some may have been removed/replaced.   

Link to comment
Share on other sites
17 minutes ago, David Colin said:

That list comes from X9 post documentation. It should still work with current release but it's incomplete as it misses toolpaths released later and some may have been removed/replaced.   

That list appears to be from the Version 9.1 post docs (Volume 3, chapter 4); that's why I wanted to bring it up, it's quite out of date.

Link to comment
Share on other sites

Here are tool_op$ updates until 2017

-> X7
150 = probe motion data
151 = probe cycle command block
152 = probe cycle header. This is output with the probe_head$ command.
153 = probe cycle trailer. This is output with the uninhibit_probe_eof$ command.

-> X8
72 = lathe contour rough operation
154 = SafetyZone linking operation

-> 2017
440 (obsolete)
441 = Advanced multiaxis-swarf
442 = Advanced multiaxis-morph
443 = Advanced multiaxis-parallel
444 = Advanced multiaxis-along curve
445 = Advanced multiaxis-triangular mesh
446 = Advanced multiaxis-roughing
447 = Advanced multiaxis-project
448 = Convert to 5axis
449 = Port Expert
450 = Blade Expert
451 = Rotary advanced

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...