586,477 active members*
3,771 visitors online*
Register for free
Login
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2009
    Posts
    62

    Understanding Zdepth Values?

    1995 BP Discovery with DX-32 Controller.
    MasterCam X3

    I am working through some problems in the mastercam forum here at the zone and I thought it would be more then relevant to post some of my questions here in the BP forum, as I don’t understand all the elements to problem yet.

    Please not the code below. You will note that on lines 4820 and 4970 (a pocket op) that the Z Value is given as a neg number, i.e. “z-.542”. Now on the next op, line 4970 (a drill op) the z value is given as a positive number, i.e. “Z.95”. For now let’s forget about the problem I am having with the program and focus on helping me understand why even though these z values are opposite, they both still work, and machine cuts material away correctly as I intended the op to work.

    The top of the part is Z0 and yes, both parameter depth settings in MC are set to NEG numbers. My guess, is that my controller treats drill cycles differently then contour or face. Does this sound right? Is this common? Sure makes reviewing the Gcode a pain in the butt.

    Thanks,
    CD

    N4810 G0 Z-.3336
    N4820 G99 G1 X2.0745 Y-.2968 Z-.542
    N4830 G99 X2.0743 Y-.297 F12.1
    N4840 G99 X2.0745 Y-.2972
    N4850 G99 X2.2765 Y-.2973
    N4860 G99 X2.2765 Y-.2973 Z-.442 F6.4
    N4870 G0 Z.25
    N4880 G0 X2.0745 Y-.2968
    N4890 G0 Z-.442
    N4900 G99 G1 X2.0745 Y-.2968 Z-.552
    N4910 G99 X2.0743 Y-.297 F12.1
    N4920 G99 X2.0745 Y-.2972
    N4930 G99 X2.2765 Y-.2973
    N4940 G99 X2.2765 Y-.2973 Z-.452 F6.4
    N4950 G0 Z.25
    N4960 G0 Z.1
    N4970 G83 X2.1755 Y-.297 Z.95 Z.1 Z.1 F7.3
    N4980 G80
    N4990 M09
    N5000 G00 M25
    ' .1875 SPOTDRILL - TOOL6 - DIA .188 '
    N5010 T6 M6
    N5020 S4889 M03
    N5030 G0 X.704 Y-.297
    N5040 G0 Z.1
    N5050 G81 X.704 Y-.297 Z.195 F9.8
    N5060 G80
    N5070 G81 X2.573 Y-.297 Z.3 F9.8
    N5080 X1.778
    N5090 G80
    N5100 M09
    N5110 G00 M25
    ' 1/8 DRILL - TOOL4 - DIA .125 ' (PROBLEM OP!!!!!!!!!!!!!!)
    N5120 T4 M6
    N5130 S7334 M03
    N5140 G0 X.704 Y-.297
    N5150 G0 Z.1 M08
    N5160 G83 X.704 Y-.297 Z.5976 Z.0375 Z0. F8.4 (keeps lopping over and over, stuck here)
    N5170 G80
    N5180 M09
    N5190 G00 M25
    ' NO. 6-32 TAPRH - TOOL5 - DIA .138 '
    N5200 T5 M6
    N5210 S300 M03
    N5220 G0 X6.1282 Y-.2959
    N5230 G0 Z2. M08
    N5240 M29
    N5250 G84 X6.1282 Y-.2959 Z.3 F9.4
    N5260 G80 M28
    N5270 M09
    N5280 G00 M25

  2. #2
    Join Date
    Jan 2006
    Posts
    64
    Cellar Dweller,
    You are correct, the control handles the Z differently between milling and some of the canned cycles such as G81 and G83 ect. In milling it is just as you would think however in G81, ect. the first Z is the total depth the tool will go from the initial position you brought the tool to (G0Z.1) In a G83 the second Z in a peck cycle is the incremental move of the first peck and the third Z is the amount of each of the remaining pecks. In N5160 the third Z cannot be zero. You can leave the third Z out and it will then revert the value of the second.
    Good luck,
    Gary

  3. #3
    Join Date
    Feb 2008
    Posts
    44
    Quote Originally Posted by Cellar Dweller View Post
    1995 BP Discovery with DX-32 Controller.
    MasterCam X3

    I am working through some problems in the mastercam forum here at the zone and I thought it would be more then relevant to post some of my questions here in the BP forum, as I don’t understand all the elements to problem yet.

    Please not the code below. You will note that on lines 4820 and 4970 (a pocket op) that the Z Value is given as a neg number, i.e. “z-.542”. Now on the next op, line 4970 (a drill op) the z value is given as a positive number, i.e. “Z.95”. For now let’s forget about the problem I am having with the program and focus on helping me understand why even though these z values are opposite, they both still work, and machine cuts material away correctly as I intended the op to work.

    The top of the part is Z0 and yes, both parameter depth settings in MC are set to NEG numbers. My guess, is that my controller treats drill cycles differently then contour or face. Does this sound right? Is this common? Sure makes reviewing the Gcode a pain in the butt.

    Thanks,
    CD

    N4810 G0 Z-.3336
    N4820 G99 G1 X2.0745 Y-.2968 Z-.542
    N4830 G99 X2.0743 Y-.297 F12.1
    N4840 G99 X2.0745 Y-.2972
    N4850 G99 X2.2765 Y-.2973
    N4860 G99 X2.2765 Y-.2973 Z-.442 F6.4
    N4870 G0 Z.25
    N4880 G0 X2.0745 Y-.2968
    N4890 G0 Z-.442
    N4900 G99 G1 X2.0745 Y-.2968 Z-.552
    N4910 G99 X2.0743 Y-.297 F12.1
    N4920 G99 X2.0745 Y-.2972
    N4930 G99 X2.2765 Y-.2973
    N4940 G99 X2.2765 Y-.2973 Z-.452 F6.4
    N4950 G0 Z.25
    N4960 G0 Z.1
    N4970 G83 X2.1755 Y-.297 Z.95 Z.1 Z.1 F7.3
    N4980 G80
    N4990 M09
    N5000 G00 M25
    ' .1875 SPOTDRILL - TOOL6 - DIA .188 '
    N5010 T6 M6
    N5020 S4889 M03
    N5030 G0 X.704 Y-.297
    N5040 G0 Z.1
    N5050 G81 X.704 Y-.297 Z.195 F9.8
    N5060 G80
    N5070 G81 X2.573 Y-.297 Z.3 F9.8
    N5080 X1.778
    N5090 G80
    N5100 M09
    N5110 G00 M25
    ' 1/8 DRILL - TOOL4 - DIA .125 ' (PROBLEM OP!!!!!!!!!!!!!!)
    N5120 T4 M6
    N5130 S7334 M03
    N5140 G0 X.704 Y-.297
    N5150 G0 Z.1 M08
    N5160 G83 X.704 Y-.297 Z.5976 Z.0375 Z0. F8.4 (keeps lopping over and over, stuck here)
    N5170 G80
    N5180 M09
    N5190 G00 M25
    ' NO. 6-32 TAPRH - TOOL5 - DIA .138 '
    N5200 T5 M6
    N5210 S300 M03
    N5220 G0 X6.1282 Y-.2959
    N5230 G0 Z2. M08
    N5240 M29
    N5250 G84 X6.1282 Y-.2959 Z.3 F9.4
    N5260 G80 M28
    N5270 M09
    N5280 G00 M25
    The control knows you will not be drilling "up", or mill plunging "up", so these values are left unsigned for canned cycles on the DX32. It makes things more complicated if you are not exposed to the G-code often.

  4. #4
    Join Date
    Mar 2009
    Posts
    62
    Thanks for the confirmation that this bizarre controller logic is correct. Is this the case with many modern controllers as well? IMHO, it is a bad idea. Zneg should be Zneg regardless of what you are doing. You are either below or above Z0, that’s my 2 cents.

    Thanks for the input, especially telling me what the controller is looking for with the three z values. I know how the depth or first z is controlled or what determines its pp output. The other two z values I am having a harder time with.

    I must have got lucky on the first one “4970”. I cannot get the drill op “5160” to output the second and third value correctly. I have been over the settings in MC more times than I care to mention.
    Anyone, know what specific options in MC drill/peck parameters control or should control second and third z values. Or have you run across an issue of when “X” is chosen then “X2” needs to be set to “X3” etc.

    Thanks,
    CD

  5. #5
    Join Date
    Aug 2005
    Posts
    92

    Odd signs

    A quick rule of thumb I learned at Bridgeport programming school in 1981. In a milling cycle you are telling the machine "How Deep?", hence a minus number. In a drilling cycle, you are telling the machine "How Far?", which is an unsigned number. Actually, if you put a minus value into a drilling cycle, it will drill "up" or away from the part. Seen it happen.

  6. #6
    Join Date
    Aug 2005
    Posts
    92

    Mastercam parameters.

    When Mastercam's post processor outputs your Bridgeport code, the first number after a drill code is the full depth, the second number is the depth of the FIRST peck, and the third number is the depth of all successive pecks. If you omit the third number, all of the pecks will be the same. If the third number is a zero, it may just hop up and down, or ?? You only need one depth for standard drilling, (G81), and spotting (G82), reaming and boring. Spotting, reaming and boring also require that you preset the dwell time. For a B'port Boss 4,5,or 6, the dwell is set as some sort of ficticious number, which may have been based on 'processor clock cycles', or something. The command G04/xx sets the dwell, where the xx is usually some number above 12 and less than 30. 18 gives a decent dwell for most spotting, except for very slow RPM settings, where you might want 24 or 28. 18 translates to maybe a half second or less, bigger is longer. The G04 line may be anywhere before the spotting cycle is called, even at the beginning of the program. If you want a "persistent" dwell amount to apply to several tools (spotter, spotfacer, reamer) put a decimal point before the g, as in .G04/xx. On later controls, the value is "seconds", any where from .001 to as many as you'd like.
    Back to drilling codes. In the Master cam tool parameters page for the drill cycle, there are places for you to input the full depth, and peck distances for first peck and following pecks, as they apply. This is nice for when you want to just touch the top of the part, such as an initial peck (second "Z") of .065 from a clearance plane of .050, to "spot" with the drill. For stiff drills, you can virtually eliminate a spotter or center drill. The second peck will start from .050 up from the depth of the first one, in this case, the quill would rapid up to Z .035, then down the amount specified in the (third Z) successive peck depth. If you want to go thru a thick part, the third value will probably be bigger than the second. For rapidly peck drilling thru stainless, the third value may be much smaller than the second, because you don't want to create a lot of heat with any one peck and work harden the stainless.
    I don't think it will hurt to have extra z's in the drill codes that don't need them. I think they are ignored. BTW, if program size is a problem, get rid of the line numbers. You don't need them, the machine doesn't need them, and they really bulk up a program. Mastercam has a feature to supress line numbers, I'm pretty sure. If you use repeats, where you have to call a specific line, just put a line number on a blank line after the line where you want to repeat. It has worked for me for years. And what's with all the G99's? I think they're a waste of program space.

  7. #7
    Join Date
    Mar 2009
    Posts
    62
    fredhh47
    Thanks for all the great data, very helpful!

    I did get the issue resolved, which I was just about to post. Please see update below.

    Even though, I give BP a ribbing about the controller on this machine I can say, for its relative age, (mine has very low hours) it’s a pretty good machine. I am SOOOO glad I bought a used “real” machine, rather than something like an IH or other “bench” cnc mill. I know you guys love your bench mills, and I am not looking forward to the day when I have board and controller pc issues my dated machine, but for what I paid, and how clean it is, I am really happy with this old girl.

    Looping Update.

    First, I got some confirmation, and field verified that my controller treats drill cycles with positive z values, which is why the part is In tol to this point. It does make reviewing the code a pain in the butt. Anyway, the z+ values are actually z- values as it relates to part zero, in my case the top of the part.

    Second, the looping issue. No matter what I did in MC, it refused to post the correct z values. So, moved the part to a different PC, and it started posting correctly. So, I told the tech guys who simply replaced the workstation and all was cool. It would seem, that something type of bug occurred in MC, my post, or Windows XP, etc. It posted the first drill cycle correctly, but just refused on the next ones. I will not spend any time trying to figure that one out. One of the lesson I learned this go around was if you can, jump to another workstation and remember to always look for the simple solutions first.

    I also learned that whoever designed that BP controller is crazy!! ZNEG = ZNEG Period! LOL, IMHO.

    Thanks to everybody,
    CD

  8. #8
    Join Date
    Jan 2006
    Posts
    64
    One thing to remember in the Z depths in G81 ect. is that the first Z is
    the full depth from the point at which you start the cycle not it's relationship
    to Z0. If you make your first Z .500 but you rapid you spindle down to
    Z.2 above the part then start you drill cycle the drill will only go .300 into
    the part.
    G0G90X2.Y-2.
    Z.2
    G81X2.Y-2.Z.5F6. Drill goes .5 from .2 above zero (-.300) not to .5 below
    Z zero

Similar Threads

  1. need help with I and K values
    By rod88 in forum MetalWork Discussion
    Replies: 17
    Last Post: 06-08-2009, 10:06 PM
  2. - r values
    By minner slinner in forum BobCad-Cam
    Replies: 1
    Last Post: 05-06-2008, 02:09 AM
  3. Looking for Mach3 Zdepth Thread
    By ramasule in forum DIY CNC Router Table Machines
    Replies: 4
    Last Post: 12-24-2007, 11:53 PM
  4. Torque values
    By cncshaper in forum Stepper Motors / Drives
    Replies: 2
    Last Post: 11-23-2007, 06:17 AM
  5. List of L values for G10 L??
    By iMisspell in forum G-Code Programing
    Replies: 3
    Last Post: 07-31-2006, 04:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •