please help with G132


Results 1 to 8 of 8

Thread: please help with G132

  1. #1
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default please help with G132

    hello this code cuts 2 cw arches among the surface of a cilinder : 360-270* & 270-180*

    problem is that only 1st G132 works, while 2nd shows attached funky error

    however, if i put 1st G132 into brakets, than there is no error

    please help ! kindly

    Code:
     
        G50 S1900
    
        LRAD = 10
        LDIA = 100
        V1   = LRAD / [ VPAI * LDIA ] * 360
    
      ( * )
    
        G00 X500 Z250
        T0808
        M110
        SB = 1000 M13
    
        G119
     
        G00  X + LDIA
        G00  Z + LRAD C-V1
        G132 Z      0 C  0 L + LRAD F0.12 G95
        G132 Z - LRAD C-V1 L + LRAD F0.12 G95
    
        M02
     


    Similar Threads:
    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  2. #2
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: please help with G132

    hello, i simplified the code even more + attached image

    i also sent it to my okuma rep / kindly

    Code:
        G50 S1900
    
        G00 X500 Z250
        M110 T0808
        SB = 1000 M13 G119 F0.12 G95
    
        V1 = 10 / [ VPAI * VSIOX ] * 360
    
        G00  Z+10 C-V1 X50
        G132 Z  0 C  0 L10   ( it works only if i cancel this line )
        G132 Z-10 C-V1 L10 
    
        M02
     


    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  3. #3
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: please help with G132

    I think V1 calculation is wrong
    hy kurmay, you are right : there was a mistake ... i tried to simplify the code that i shared, but i did no test it duuuh

    i looked over your code from #3, and i noticed that you used M15, so i added it to my code, and voila, it works

    thanks a lot man, you hit it

    F[SB*0.2]
    i guess you should execute it in G94



    i looked also over the codes that you shared at #4 & #5; i did not tried to understand them, but thanks for your time to create those

    now i will go to run some trials and create the comp codes / thx

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  4. #4
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: please help with G132

    hello kurmay, after using G132, program duration reduced with cca 2seconds, and that is cool thanks again !


    i also hit a case : for example the arch is among a cilinder o27.74, but tool is cutting at X7.5 ( attached image )

    even if i wish the arch to be cut at o27.74, this won't happen, because tool position is 7.5, and 7.5<>27.74

    to get it right, i needed to put also the tool at X27.74, and this would mean cutting with a lot of overhang

    so i did a trick :

    Code:
        NOEX VZSHX = - [ 27.74 - 7.5 ]
        G00 X27.74
        G132 etc
        NOEX VZSHX = 0
    like this, the tool was positioned at X7.5, but the controller did the math like how it was at X27.74

    there are also other methods to deliver this "trick"

    if tool_X <> cilinder_diameter, then G132 won't perform as it should; like how G132 will deliver as expected only for engraving operations ( when tool cutting edge is positioned right on the cilinder )




    there is a thing with your code; pls check this section from #3:

    Code:
        G00   X170 Z0 C90
        G01   X152 F[SB*0.2]
        G01   Z0    C80 M16 G41
    last line comands only the C axis ( from 90* to 80*; even if the program line does not modify the position of Z axis, Z will move because of the G41 ), and this requires a different feed; that movement, even if it is in feed, is not cutting, but is a simple positioning so to begin the compensation; but you may loose time because feed value is not correct

    in other words, the cnc will generate the toolpath, but it won't travel among it at desired feed

    to fix it, use this formula : feed_for_CZ_G94 = sqrt ( ( a ^ 2 + b ^ 2 ) / ( a ^ 2 + c ^ 2 ) ) * F, where :
    ... a = 360 * dz
    ... b = 500 * dc
    ... c = X * dc * pi
    ... F = desired feed in G94

    dz&dc represents how much Z&C axis changes; they are always positive; if Z goes from 0 to -30, or to +30, in both cases, dz will be 30; same for dc

    example 1 )
    G00 Z0 C0 X100
    G01 Z-10 F100 G94
    in this case dz=10, dc=0 and X=100; do the math, calculate a b c; b & c will be 0, and the final result will be 1*F; so the correct feed will be F100, thus the code is correct

    example 2 )
    G00 Z0 C0 X33
    G01 C-10 F100 G94
    in this case dz=0, dc=10 and X=33; a will be 0; do the math, and the result will be ( 500 * 10 ) / ( 33 * 10 * 3.14 ) * 100 = 500*100/(33*3.14)=482; you need to rewrite the 2nd line like this G01 C-10 F482 G94

    example 3 )
    G00 Z0 C0 X50
    G01 Z11 C45 F100 G94
    in this case dz=11, dc=45 and X=50; write your 2nd line like this :
    G01 Z11 C45 G94 F = sqrt ( ( (360 * dz) ^ 2 + (500 * dc) ^ 2 ) / ( (360 * dz) ^ 2 + (X * dc * pi) ^ 2 ) ) * 100
    G01 Z11 C45 G94 F = sqrt ( ( (360 * 11) ^ 2 + (500 * 45) ^ 2 ) / ( (360 * 11) ^ 2 + (50 * 45 * 3.14) ^ 2 ) ) * 100

    kindly sorry for the long reply, i tried to write it as short as possible ?!

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  5. #5
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: please help with G132

    hy kurmay, if you shared those parametric examples at posts 4 & 5, then this is how i would code such pockets : toolpath inside a dwg ( attached image ), that i convert to G-code, and that code is inserted inside a general structure

    to make it parametric like yours, then i would edit this code

    comments are there to help locating each segment of the toolpath

    i shared it to show that i use a soubroutine for shortest_path, and another to compute CZ feed; like this, i can edit it futher more, without worries about the need to change feed or to add M15,M16

    code is pretty versatile: to put the pocket to another diameter, is enough to change LDIA value; it's fast, at least faster than recreating it inside a CAM / kindly

    Code:
     
    
        NOEX V1 = 4000      ( n )
        NOEX V2 = 4*0.036   ( f )
    
      ( * )
    
        G50 S1900
        M867
    
        G00 X500 Z250
        M110 T+7*10101
    
        NOEX LDIA     = + 50                          ( cilinder dia 50    )
        NOEX VZSHX    = - [ LDIA - 40 ]               ( tool cuting at X40 )
    
        CALL OSUB
    
        NOEX VZSHX    =     0
        G00 X500 Z250 M12 M63
    
        M02
    
    OSUB
    
        NOEX V3 = - 360 / VPAI / LDIA                 (*1)
    
        CALL OCAXS LV01 =                  -V3*[6]    (*2)
    
        SB=V1 M13 M08 G00 X+LDIA Z-42.286 C-V3*[6] M63 G95 G119
    
        G132  M15   Z = -44.286    C = -V3*[8]    F = V2   L2 ( arch intro )
        CALL OFCZT LZ = -60       LC = -V3*[8]   LF = V2      ( left       )
        G132  M16   Z = -62        C = -V3*[6]    F = V2   L2 ( corner 1   )
        CALL OFCZT LZ = -60       LC = +V3*[6]   LF = V2      ( up         )
        G132  M16   Z = -60        C = +V3*[8]    F = V2   L2 ( corner 2   )
        CALL OFCZT LZ = -15       LC = +V3*[8]   LF = V2      ( right      )
        G132  M15   Z = -13        C = +V3*[6]    F = V2   L2 ( corner 3   )
        CALL OFCZT LZ = -13       LC = -V3*[6]   LF = V2      ( down       )
        G132  M15   Z = -15        C = -V3*[8]    F = V2   L2 ( corner 4   )
        CALL OFCZT LZ = -46.286   LC = -V3*[8]   LF = V2      ( left       )
        G132  M16   Z = -48.286    C = -V3*[6]    F = V2   L2 ( arch exit  )
    
    RTS ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
    
    (*1) ( transformation factor, that allows converting a distance among cilinder perimeter into spindle phase )
    (*2) ( soubroutine that helps indexing C axis among the shortest path )
     


    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


Tags for this Thread

Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

please help with G132

please help with G132