Sign in to follow this  
ICT_Outkast

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)

 

Share this post


Link to post
Share on other sites

I would create another string type buffer for toolplane names. You can not mix numbers and strings into 1 buffer.

Well, you can, but then it's still just a string buffer with letters and numbers (not values).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • 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