585,743 active members*
5,033 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > Mastercam > Format Statements
Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2009
    Posts
    75

    Format Statements

    Hi guys Xavior again,

    Here is the deal this time, i have been tapping quite a bit of work on my haas machine but seem to have an issue with the output mastercam is giving me for a feed rate for tapping. I originally program lets say 4.3443 for a feed rate but when it spits out the program it only giving me 4.3

    I do believe when tapping it is required to be very accurate and not to only 1 decimal place.

    Can anyone help me adjust this so i can have the feed rate during taping to output maybe 2-3 decimals.

    Please see below:

    # --------------------------------------------------------------------------
    # Format statements - n=nonmodal, l=leading, t=trailing, i=inc, d=delta
    # --------------------------------------------------------------------------

    #Default english/metric position format statements
    fs2 1 0.7 0.6 #Decimal, absolute, 7 place, default for initialize (
    fs2 2 0.4 0.3 #Decimal, absolute, 4/3 place
    fs2 3 0.4 0.3d #Decimal, delta, 4/3 place
    #Common format statements
    fs2 4 1 0 1 0 #Integer, not leading
    fs2 5 2 0 2 0l #Integer, force two leading
    fs2 6 3 0 3 0l #Integer, force three leading
    fs2 7 4 0 4 0l #Integer, force four leading
    fs2 9 0.1 0.1 #Decimal, absolute, 1 place
    fs2 10 0.2 0.2 #Decimal, absolute, 2 place
    fs2 11 0.3 0.3 #Decimal, absolute, 3 place
    fs2 12 0.4 0.4 #Decimal, absolute, 4 place
    fs2 13 0.5 0.5 #Decimal, absolute, 5 place
    fs2 14 0.3 0.3d #Decimal, delta, 3 place
    fs2 15 0.2 0.3 #Decimal, absolute, 2/1 place (feedrate)
    fs2 16 1 0 1 0n #Integer, forced output
    fs2 17 0.2 0.3 #Decimal, absolute, 2/3 place (tapping feedrate)


    Thanks in advance

    Xavior

  2. #2
    Join Date
    Mar 2005
    Posts
    988
    There's a few ways to do this.... First, save a copy of your post now before doing any editing to protect your current version.


    I see you have a statement (17) created but you won't need this. The output you're looking for already exists at (10) for 2 place and (11) for 3 place. And actually what (17) is really saying is to output 2 place for inch and 3 place for metric.

    Feedrate has a general output that's common in a generic or "standard" post. If you don't mind your normanl cutting feedrates to also be able to output 2 or 3 place decimals, the fix is really simple. Since most people punch in their own feeds with other cutters anyway, most don't mind this and will simply opt to this method.

    To do this, go to your "Toolchange / NC Output Variable Formats" section. Look for something like this:
    fmt F 15 feed #Feedrate

    In the above, simply change the number "15" to either a "10" for 2 place or "11" for 3 place and you're done.


    If you truly want to have 2 or more types of feed outputs for different cuts, this will take some more work as you'll need to create new variable strings and further edit the post sections of the cut.
    It's just a part..... cutter still goes round and round....

  3. #3
    Join Date
    Dec 2008
    Posts
    3109

    Cool I hope you approve

    Xavior

    Have sent you back your post with mods
    - both tapping cycles are now done using Fs2 2 statement (ie 4.3), same output as XY outputs for the metric or inch units
    ( you do have 2 tapping cycles, they were different to each other- they now are identical - for rigid tapping )
    - comments modified, seperated the XY&Z offsets comments away from the tool comments
    - XY & Z offsets comments, if not zero, will be output after each operation comment. ( these can change with each operation & should be highlighted when used )
    - placed the tool staging straight after toolchange for easier reading/editing ( some machines don't like the pre-select when doing a restart - tool is already pre-selected & the control would alarm )

    Fill-up the keg :cheers:

    Steve

  4. #4
    Join Date
    Nov 2010
    Posts
    0
    Hey guys,
    We are using the standard MPLFAN post from mastercam,
    our lathe is a regular 2 axis single turret with a fanuc 0iTD controller.
    The current posts for outside thread.
    G20
    (TOOL - 5 OFFSET - 5)
    (OD THREAD RIGHT INSERT - NONE)
    ( OD THREAD )
    G0 T0505
    G97 S400 M03
    G0 G54 X.5737 Z.2167
    G76 P010029 Q.001 R.001
    G76 X.2993 Z-1. P372 Q70 R0. E.0625
    G28 U0. W0. M05
    T0500
    M30
    The problem seems to be the first g76 line.
    G76 P010029 Q001 R.001 the controller complains about the decimal point for the Q.
    How can I modify the post to remove the Decimal point for this Q only?
    Thank you.
    Mike

  5. #5
    Join Date
    Sep 2009
    Posts
    75
    Quote Originally Posted by psychomill View Post
    There's a few ways to do this.... First, save a copy of your post now before doing any editing to protect your current version.


    I see you have a statement (17) created but you won't need this. The output you're looking for already exists at (10) for 2 place and (11) for 3 place. And actually what (17) is really saying is to output 2 place for inch and 3 place for metric.

    Feedrate has a general output that's common in a generic or "standard" post. If you don't mind your normanl cutting feedrates to also be able to output 2 or 3 place decimals, the fix is really simple. Since most people punch in their own feeds with other cutters anyway, most don't mind this and will simply opt to this method.

    To do this, go to your "Toolchange / NC Output Variable Formats" section. Look for something like this:
    fmt F 15 feed #Feedrate

    In the above, simply change the number "15" to either a "10" for 2 place or "11" for 3 place and you're done.


    If you truly want to have 2 or more types of feed outputs for different cuts, this will take some more work as you'll need to create new variable strings and further edit the post sections of the cut.

    Tried changing this, please see below:

    # --------------------------------------------------------------------------
    # Toolchange / NC output Variable Formats
    # --------------------------------------------------------------------------
    fmt T 4 t$ #Tool number
    fmt T 4 first_tool$ #First tool used
    fmt T 4 next_tool$ #Next tool used
    fmt D 4 tloffno$ #Diameter offset number
    fmt H 4 tlngno$ #Length offset number
    fmt G 4 g_wcs #WCS G address
    fmt P 4 p_wcs #WCS P address
    fmt S 4 speed #Spindle Speed
    fmt M 4 gear #Gear range
    # --------------------------------------------------------------------------
    fmt N 21 n$ #Sequence number
    fmt X 2 xabs #X position output
    fmt Y 2 yabs #Y position output
    fmt Z 2 zabs #Z position output
    fmt X 3 xinc #X position output
    fmt Y 3 yinc #Y position output
    fmt Z 3 zinc #Z position output
    fmt A 11 cabs #C axis position
    fmt A 14 cinc #C axis position
    fmt A 4 indx_out #Index position
    fmt R 14 rt_cinc #C axis position, G68
    fmt I 3 iout #Arc center description in X
    fmt J 3 jout #Arc center description in Y
    fmt K 3 kout #Arc center description in Z
    fmt R 2 arcrad$ #Arc Radius
    fmt F 11 feed #Feedrate
    fmt P 11 dwell$ #Dwell
    fmt M 5 cantext$ #Canned text
    fmt F 2 pitch #Tap pitch (units per thread)

    But its still rounding it for me even after i posted the feed rate to be 5.225 it rounded to something like 5.3. Any ideas?

  6. #6
    Join Date
    Dec 2008
    Posts
    3109
    Xavior

    DO NOT ALTER that feed format, that affects every other F output in your post---put it back to 9

    Look for
    Code:
    ptap$            #Canned Tap Cycle
          pdrlcommonb
          result = newfs(2, feed)  #added ST
          pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,
            prdrlout, *feed, strcantext, e$
          pcom_movea
    your post also had pmisc2$ for RIGID TAPPING
    ( you have been selecting the floating tap cycle for rigid tapping )

    The fix was in the 1st tapping cycle where the Feed value needed to be given another format within that cycle. The RED section is what alters the format, and what I added to the ptap$ cycle from the pmisc2$ to make them identical to each other, plus the 2 was a 12 ( 4/4 place output for all units, now 4/3 places )

    I had fixed your tapping F output to be the same format as the X Y Z outputs, they would "switch" depending on the metic/inch units selected

Similar Threads

  1. Conditional and Loop Statements in Mach3
    By Monotoba in forum Uncategorised MetalWorking Machines
    Replies: 5
    Last Post: 04-25-2010, 03:12 AM
  2. PRINT / MSG statements using AXIS front end
    By bogflap in forum LinuxCNC (formerly EMC2)
    Replies: 9
    Last Post: 03-16-2009, 02:43 PM
  3. Format 1
    By MegaMoog in forum Fadal
    Replies: 6
    Last Post: 04-07-2006, 12:08 AM
  4. How to do 2 "IF" statements on the same line?
    By murphy625 in forum CamSoft Products
    Replies: 14
    Last Post: 04-02-2005, 02:28 AM
  5. If / Then Statements
    By Nanker in forum G-Code Programing
    Replies: 6
    Last Post: 10-23-2004, 06:11 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
  •