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:

Help with G10 Output with added tool plane names


Recommended Posts

I have been digging through the forums and gotten my G10 lines to output correctly at the beginning of the programs on my Makino post. Now I am having trouble getting it to output a list of tool planes used. Someone set up our Okuma post to do similar to what I want, but I can't figure out what they have done. I can get it to output the plane name, but it only outputs the first one at every G10. Here is what I am getting....The L20 P2 should be the Right plane. How do I get the buffer to read and right the correct string? 

 

My current code in the post for that area......

 

# Ouptut the G10 list in order
       #------------------------------------------------------------------
       #--------------- Initialize variables
       size9 = rbuf(9,0)
       rc9 = 1
       wc9 = 1
       idx9 = 0
       b9_tox = 0
       b9_toy = 0
       b9_toz = 0
       b9_workofs = 0
	   b9_stoolplname = 0

       while idx9 <= b9_test,
        [
        while rc9 <= size9,
         [
         b9_tox = rbuf(9,rc9)
         if b9_workofs = idx9,
          [
           p_wcs = b9_workofs + 1
           if use_g10 = 1,
            [
			b9_toy = b9_toy - 33.4205          # Added for machine shift JWN
			b9_toz = b9_toz - 37.4104          # Added for machine shift JWN
			p_wcs = p_wcs - 6                  # Added to correct output of P word JWN
			n$, "G10", "L20", *p_wcs, *b9_tox, *b9_toy, *b9_toz, e$
            n$, *scomm_str, stoolplname,*scomm_end, e$
			#n$, "(-)", e$
            ]
           if use_g10 = 2,
            [
			b9_toy = b9_toy - 33.4205          # Added for machine shift JWN
			b9_toz = b9_toz - 37.4104          # Added for machine shift JWN
			p_wcs = p_wcs - 6                  # Added to correct output of P word JWN
			n$, "G10", "L20", *p_wcs, b9_tox, *b9_toy, *b9_toz, *srot_label, no_spc$, "0", e$
			n$, *scomm_str, stoolplname, scomm_end, e$
			#n$, "(-)", e$
            ]
          ]
         ]
        idx9 = idx9 + 1
        rc9 = 1
        ]
		

And the output I am getting....

 

%
O0000 (T)
(MCX FILE  - C:\USERS\E0464088\DOCUMENTS\BILLYTHREADMILL.MCAM)
(PROGRAM   - T.NC)
(DATE      - JUN-30-2020)
(TIME      - 9:46 AM)
(MPMASTER GENERIC 3/4-AXIS HORIZONTAL)
(MACHINE GROUP-1)
( **************************** )
( TOOL LIST )
(T1   -  THREAD MILL - 0.745 - "R0.0000)
(T2   -  THREAD MILL - 0.25  - "R0.0000)
N100 G00 G17 G20 G40 G80 G90
N110 (------------- WORK OFFSETS ------------)
N120 G10 L20 P1 Y-33.4205 Z-37.4104 B0
N130 ( FRONT )
N140 G10 L20 P2 Y-33.4205 Z-37.4104 B0
N150 ( FRONT )
N160 (------------- WORK OFFSETS ------------)
N170 G91 G28 Z0.
N180 (MASTERCAM OPERATION NUMBER : 1 )
N190 (TOOLPLANE NAME - FRONT)
N200 (COMPENSATION TYPE - WEAR COMP)
N210 T1 M06 ( THREAD MILL - 0.745)

 

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...