osp300L : dynamic safe positions + adaptive CTR


Results 1 to 13 of 13

Thread: osp300L : dynamic safe positions + adaptive CTR

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

    Default osp300L : dynamic safe positions + adaptive CTR

    hello this thread will merge best of both worlds : dynamic safe positions and CTR

    there is nothing faster

    ... soon

    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: osp300L : dynamic safe positions + adaptive CTR

    hello guys and girls

    cuting ends + transition code to next operation + cutting starts

    transition involves changing machine state, acordingly to next operation + retreat&approach movements

    common programing is : [ final codes for active operation + retreat@safe position ] + [ index @ safe position + initial codes for next operation + approach ]
    ... 1st paranthesis is code inside the active operation
    ... 2nd paranthesis is code inside the next operation

    if cnc allows some specific functions, than there may be some lookahead codes inside the active operation, acordingly to the next

    thus, some programers desire for something like this :

    [ final codes for active operation combined with codes for next operation + retreat@safe position ] + [ index @ safe position + initial codes for next operation + approach ]

    far as i have seen, such thing is desired by few, and in this moment, they hit :
    ... control limitations
    ... cam limitations

    maybe there are guys/girls that overcomed this limitations i can tell that they are few

    my approach on this, since end safe position for active operation =start safe position for next operation, is :

    [ final codes for active operation combined with codes for next operation + go and index @ safe position + initial codes for next operation + approach ]

    i used only one paranthesis because i dont see the transition as something spread across 2 operations, but a singe entity

    thus code paragraphs are :

    transition code
    cut
    transition code
    cut
    transition code
    cut
    ... etc

    [ cut ] is simple : a toolpath
    [ transition ] is a procedure, that does what it does so to speed up things

    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

    Red face Re: osp300L : dynamic safe positions + adaptive CTR

    here is a sample from the code that i use :

    Code:
        LINK=11 ( turn operation )
        CALL ODYNX LV01=LINK LV02=25.500+V91 LV03=130-VETFZ LV04=1
        T=LINK*10101 M66 G97 S=V1 M42 M03 M08 G00 X25.500  Z2.500 M63
        G01 Z-13.365  F... G95
          more cut
    
        LINK=3 ( turn operation )
        CALL ODYNX LV01=LINK LV02=23.8+V91 LV03=130-VETFZ LV04=1
        T=LINK*10101 M66 G97 S=V1 M42 M03 M08 G00 X23.800 Z-8.138 M63
        G01 X20.200 Z-9.938 F...  G95
          more cut
    
        LINK=7 ( live axis operation )
        CALL ODYNX LV01=LINK LV02=16.503*2 LV03=130-VETFZ LV04=2
        G137
        SB=... M13 M08 G00 X... Y... Z... M63
          more cut
    
        LINK=6 ( bar puller )
        CALL ODYNX LV01=LINK LV02=0 LV03=130-VETFZ LV04=3
        G00 Z... X0
          pulling
    as you can see, there are no direct codes for home position

    also, home position codes are not repeated

    i use the procedure from here :http://www.cnczone.com/forums/okuma/...positions.html + look ahead CTR codes

    ODYN* stands for dynamic

    ODYNX means that i wish to index dynamically on X axis, so next tool that is at post LV01=LINK, after indexing, to be at X=LV02 and Z=LV03, also with preparatory codes for a machining type specified with LV04 ( 1-turning, 2-milling,3-bar puller, 4 turning with reversed sense )

    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: osp300L : dynamic safe positions + adaptive CTR

    this is the thing :

    Code:
    ODYNX ( offset_link ** X ** Z ** CTR )
          (      1      ** 2 ** 3 **  4  )
    
        LV02 = LV02 + VTOFX [ LV01 ] + VTWOX [ LV01 ] - VETFX
        IF [ LV02 GE VSIOX ] NEND
             LV02 =  VSIOX
    
        NEND CALL ODYNA
    
    RTS
    
     ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
    
    ODYNZ ( offset_link ** X ** Z ** CTR )
          (      1      ** 2 ** 3 **  4  )
    
        LV03 = LV03 + VTOFZ [ LV01 ] + VTWOZ [ LV01 ] - VETFZ
        IF [ LV03 GE VSIOZ ] NEND
             LV03 =  VSIOZ
    
        NEND CALL ODYNA
    
    RTS
    
     ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
    
    ODYNA ( LV04 > 1:S , 2:C , 3:puller , 4:S_reverse_sense )
    
        IF [ LV04 EQ 1 ] N1
        IF [ LV04 EQ 2 ] N2
        IF [ LV04 EQ 3 ] N3
                    GOTO N4
    
            N1 G00 X=LV02 Z=LV03 M203 M109    ( M18 )
               GOTO NEND
    
            N2 G00 X=LV02 Z=LV03 M203 M05 M63 ( M18 )
               M110 T = LV01 * 10101 M66
               GOTO NEND
    
            N3 G00 X=LV02 Z=LV03 M203 M05 M63 ( M18 )
               M19  T = LV01 * 10101 M66
               GOTO NEND
    
            N4 G00 X=LV02 Z=LV03 M203 M05 M63 ( M18 )
               GOTO NEND
    
            NEND
    
    RTS
    
     ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )


    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: osp300L : dynamic safe positions + adaptive CTR

    now i would like to share some examples :

    1) tool finished cutting ( turning ), and next operations is also turning ( lv04=1 ) that starts at point X25.5 Z2.5 with tool 2:

    ... G1 ... whatever ( last movement with active tool )
    ... LINK=2
    ... CALL ODYNX LV01=LINK LV02=Xa LV03=130-VETFZ LV04=1
    ... T=LINK*10101 M66 G97 S... M42 M03 M08 G00 X25.500 Z2.500 M63
    ... G01 X25.500 Z-13.365+V92 F... G95

    ...... turret will go at safe Z=130, and at a particular X position, in such a way, that after index turret will be moving only on Z
    ...... index code in such a case is not done inside the ODYN, because it would require too many variables

    2) tool finished cutting ( turning ), and next operations is milling ( lv04=2 ) that starts at point X16.503*2 with tool 7:

    ... G1 ... whatever ( last movement with active tool )
    ... LINK=7
    ... CALL ODYNX LV01=LINK LV02=16.503*2 LV03=130-VETFZ LV04=2
    ... G137
    ... SB... M13 M08 G00 X = V6 Y = V7 Z = V3 M63 ( sqrt(v6*v6+v7*v7)=16.503*2 )

    ...... turret will go at safe Z=130, and at a particular X position, in such a way, that after index turret will be moving only on Z
    ...... spindle stop + M110 + index code in such a case is done inside the ODYN

    and so on; if next operations is :
    ... a bar puller after turning ( lv04 = 3 ), than S is stoped and M19 occurs
    ... turning with reversed sense ( lv04=4 ), than S axis is stoped

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


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

    Default Re: osp300L : dynamic safe positions + adaptive CTR

    how a CAM should have a branch of conditions inside the postprocessor, also this procedure handles transitions between particular cases specified with the help of a local variable

    lookahead CTR + optimized free indexing is fast

    maybe i should share a video, to show what this codes can deliver ... kindly !

    ps : if cnc is reset, and active post = 1st tool inside the program , than, when program begins, this code will unclamp and reclamp the turret ... this is why i have opened this thread : http://www.cnczone.com/forums/okuma/...ret-index.html

    thus, if i could detect active post, than i may avoid this particular case

    however, this is a small aspect compared to the benefits

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


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

    Default Re: osp300L : dynamic safe positions + adaptive CTR

    I don't understand why you want to complicate things so that no one else can understand your code...
    hello again actually, i dont wanna post code, but ideas, and in this case is a huge reduction in travel between operations

    through code i make them perform real, on the cnc

    i tried my best to explain all parts/methods/codes as i had developed them

    in the end, is all packed up in a few lines of code, after a lot of trials

    When you unclamp the turret, it takes about .75 seconds. In that time you can usually reach the Positive X and Z limit. So G0 X20 Z20 M203 will work in nearly all cases.
    When you do a tool change an have X and Z coordinates on the same line, the turret clamps as it rapids towards the part. This also takes about .75 seconds, so you can reach the part by the time the turret is clamped.
    i stood near the cnc until i got bored with default travel for indexing, so i though to improve it

    This is safer and you have much less chance of collisions while still getting essentiall the same cycle time and not having all the "cryptic" code that only you understand fully (maybe)
    some things take time ... i dont wanna say that i did it ... i wanna show that is possible

    and i have it running on the cncs from last year, and meanwhile i got used with it

    main problem, however, is not the code, but the duration required to implement such codes, thus to write the CALL statements + corect variables : but i am working on it

    however, if i would share directly the final version, it will be harder to understand

    ... and i know that my english skils dont help me at all, so i may explain all this in a way that nobody understands

    KISS is a good rule. Keep It Simple Stupid. Unless of course you are worried about job security
    what is simple for you, for me is hard .... and so on

    i dont worry about job security i could simply lay low for a month and nobody would even notice

    i know that it looks complicated ... and i will make it simpler kindly !

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


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

    Default Re: osp300L : dynamic safe positions + adaptive CTR

    Quote Originally Posted by OkumaWiz View Post
    KISS is a good rule. Keep It Simple Stupid. Unless of course you are worried about job security
    hello mr Wizard when you changed the in-position window, so to speed up rapids on mill, did you worried about job security ?

    ... did you expect to receive thanks and to be promoted ?

    ... or is it in your nature ? the thing that drives you, at least from the programing perspective ? kindly !

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


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

    Default Re: osp300L : dynamic safe positions + adaptive CTR

    Hello, recently i created codes to shorten turret travel between 2 operations, where at least one uses G138

    Considering an operation without Y, and another operation with Y, previous sentence will lead to 3 cases where cnc changes machine states:

    ... Y off > Yon
    ... Y on > Yoff
    ... Y on > Yon

    each case is handled by different codes

    also i had to develop the code to do this :
    ... achieve dynamic shorten path when changing offsets on same holder, thus when Y moves between operations
    ... change the position of the turret between operations, as follows :
    ...... when program is restarted, turret is in safe position
    ...... when program is running normal, turret is no longer in safe position

    i simply check the restart flag / VRSTT, so to detect if i am in a restart seqeunce or in continuum mode

    an issue is that restart is initialized at an adress that must be before the turret position&index sequence, otherwise turret position before T code is compromised

    so i simply use a local variable to get the VRSTT state :

    Code:
        LVRF = VRSTT / 128 ( local variable restart flag )
    if i am after a restart sequence, i must send the turret up to index

    if i am in continuum mode, than i dont send the turret up, but i dynamically compute a safe position to lower the turret

    at the end i reinitialize the LVRF with the value for the continuum mode, otherwise, at next part, machine will behave like it was just restarted; inside a looped program, it is important to behave conditional only inside the loop where restart was issued

    ... this code does just that for the "Y on > Yon" case :
    Code:
        IF [ LVRF EQ 1 ] NY1   ( restart activ )
                    GOTO NY2   ( mod continuum )
            NY1
                CALL ODYNZ LV01=LINK LV02=+LVXP-VETFX LV03=V7 LV04=4
                G138
                GOTO NY3
            NY2
                CALL ODYNY LV01=LINK LV02=[V3+5]/2    LV03=V7 LV04=14
                GOTO NY3
            NY3 T=[LINK-20]*101+20 M66 G97 S=V1 M42 M04 M08 G00 X=[V3+5]/2 Z=V7 Y0 M63 
                LVRF = 0
    the newest procedure to the family is ODYNY, which encapsulates inside bought behaviours of ODYNX and ODYNZ; it is possible to omit the general safe position of the turret when it is called 2nd tool on a dual Y holder

    dynamic codes drop in, and whatever the values of the corrections(offsets), a safe position will be reached; for example if 2nd tool on the Y holder:
    ... is longer among X than active tool, than machine will raise on X acordingly
    ... is shorter among X than active tool, than machine will change Y instantly with the difference between Y offsets of bought tools

    turret movement between operations does not include auxiliary movements

    each movemet is as short as the dynamic code structure can provide

    shortening this distances even more requires something like CAS simulations, but much faster, so to gain a behaviour particular to each index, and not use general safe positions


    codes shared so far only handled CTR codes between operations without Y

    this one has also CTR codes between operations where at least one involves Y axis

    i suppose that in time more codes i will be adding, depending on the type of the operations that i will chain; from this point of view, this will be a monotonous

    next post in this thread should be about computing dynamical positions particular for each index ... and this involves a lot more kindly !

    Code:
    ODYNX ( offset_link ** X ** Z ** CTR )
          (      1      ** 2 ** 3 **  4  )
    
        LV02 = LV02 + VTOFX [ LV01 ] + VTWOX [ LV01 ] - VETFX
        IF [ LV02 GE VSIOX ] NEND
             LV02 =  VSIOX
    
        NEND CALL ODYNA
    
    RTS
    
     ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
    
    ODYNZ ( offset_link ** X ** Z ** CTR )
          (      1      ** 2 ** 3 **  4  )
    
        LV03 = LV03 + VTOFZ [ LV01 ] + VTWOZ [ LV01 ] - VETFZ
        IF [ LV03 GE VSIOZ ] NEND
             LV03 =  VSIOZ
    
        NEND CALL ODYNA
    
    RTS
    
     ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
    
    ODYNY ( offset_link ** X ** Z ** CTR )
          (      1      ** 2 ** 3 **  4  )
    
        LV02 = LV02 + VTOFX [ LV01 ] + VTWOX [ LV01 ] - VETFX
        IF [ LV02 GE VSIOX ] NJUMP1
             LV02 =  VSIOX
        NJUMP1
    
        LV03 = LV03 + VTOFZ [ LV01 ] + VTWOZ [ LV01 ] - VETFZ
        IF [ LV03 GE VSIOZ ] NJUMP2
             LV03 =  VSIOZ
        NJUMP2
    
        CALL ODYNA
    
    RTS
    
     ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
    
    ODYNA ( LV04 )
          ( fara y - fara y > 1:S , 2:C , 3:puller , 4:S_reverse_sense , +2nd spindle )
          ( fara y - cu   y > 14:4+pregatire_Y_corectia_2 )
          ( cu   y - fara y > 15:dezactivare_Y+4          )
    
        IF [ LV04 EQ  1 ] N1
        IF [ LV04 EQ  2 ] N2
        IF [ LV04 EQ  3 ] N3
        IF [ LV04 EQ 14 ] N14
        IF [ LV04 EQ 15 ] N15
                     GOTO N4
    
            N1 G00 X=LV02 Z=LV03 M203 M109    ( M18 )
               GOTO NEND
    
            N2 G00 X=LV02 Z=LV03 M203 M05 M63 ( M18 )
               M110 T = LV01 * 10101 M66
               GOTO NEND
    
            N3 G00 X=LV02 Z=LV03 M203 M05 M63 ( M18 )
               M19  T = LV01 * 10101 M66
               GOTO NEND
    
            N4 G00 X=LV02 Z=LV03 M203 M05 M63 ( M18 )
               GOTO NEND
    
           N14 G00 X=LV02 Z=LV03      M05 M63 ( M18 )
                 ( Y= 0 + VTOFY [ LV01 ] + VTWOY [ LV01 ] - VETFY )
                   Y=     VTOFY [ LV01 ]                  - VETFY
               GOTO NEND
    
           N15 G00 X=LV02/2 Z=LV03 M203 M05 M63 ( M18 ) Y= - VTOFY [ VETON ]
               G136
               GOTO NEND
    
            NEND
    
    RTS
    
     ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )


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


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

    Default Re: osp300L : dynamic safe positions + adaptive CTR

    hi / i have been posted a lot of stuff about this, and i think that i made it hard to understand

    i will go with a simpler explanation :

    ... active tool finished cutting
    ... turret moves to safe position + CTR
    ... index + CTR + approach
    ... next tool begins cutting

    2nd and 3rd line can look in many ways, depending on the operation before and the operation after

    official term for them is lookahed codes inside a CAM

    i combine this lookahead with a turret position that is not in limit, but closer to the part, so i can index without worries : please imagine that a big chuck is turning little parts and tools are little, so there is no need to send the turret in limits; but also you dont wanna input manually the turret position between operations, because it will take a lot of time, and it wont be sure if someone will change a knife with a longer one : so there is a need to make the code adapt to each offset

    lets create a dynamic behaviour on X : and this starts with this idea : when active tool finished, i wish the turret to move to the safe position only by going right and/or up if turret is going down, than active tool may hit the part; if turret is going left, than index may occur aboove the part, or maybe i hit the chuck ... by going right and/or up, i know that is enough clearance to index without worries

    right and/or up means 1st quadrant inside the trigonometrical circle :
    ... 1st quadrant for normal turret on normal chuck
    ... 2nd quadrant for normal turret on 2nd chuck
    ... 3rd quadrant for lower turret on 2nd chuck
    ... 4th quadrant for lower turret on normal chuck

    let me show you how the code delivers 1st quadrant behaviour :
    ... when tool finished cutting, at X0 Z0 i calculate index position in such a manner that next tool is at X1 Z1
    ... inside this calculations, Z1 is fixed, Z1 is a safe value that i test so to spin 360 without worries
    ... i do some checkings :
    ...... if X1 >=X0 then go index at X1 Z1=z_safe; else move at X0=actual_X Z1=Z_safe
    ...... if index will occur at X1 Z1=z_safe ( if - then ), than turret will aproach next operation by only going left
    ...... if index will occur at X0=actual_X Z1=Z_safe ( if - else ), than turret will aproach next operation by going left & down, but i have no worries, since Z position is safe whatever X value
    ... when i calculate X1 Z1, i do it so after index tool to only move left, thus i try to target the closest X travel of the turret
    ...... X1 is the point where next tool begins cutting
    ...... Z1 is a safe position among Z axis
    ...... thus when using dynamic codes on X axis, Z is always safe
    ...... there is some math to deliver X index while current tool is active, so next tool to be at X1 : without canceling active corection, i only read active tool offset, i substract if from current X coordinate, and by doing so the result is the screwball ( X axis without corections ), and it would be equivalent with the coordinates displayed on the screen if i hit reset; and after that i simply add next tool X offset to the result

    at this moment i can not write a simpler explanation

    i will post a video, so to see things in action ... just to find some time to think about how will i do it, so to make it short and clear

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


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

    Default Re: osp300L : dynamic safe positions + adaptive CTR

    hello in attached archive are movies that run on programs from which i have eliminated feed movements, or replaced them with a single rapid movement

    as a result, only dynamic codes perform

    odynx.mp4 : it shows what using odynx can provide : turret travel across X axis is prety short, and it adapts to offset corections
    ... it does not perform at full speed, because there are milling operations intercalated with turning, and reversed spindle sense
    ... if all operations were normal turning, than things would ocurr even faster
    .... please notice transition between 2 milling tools at second ~7
    .... please notice transition between 2 turning tools at second ~11

    odyny.mp4 : it shows what using odyny can provide : short path between double Y holders
    ... second 4 :
    ...... turret goes in X+
    ...... index
    ...... aproach + Y raise
    ...... cut
    ...... Y is dynamically lowered ; adapts to offset corections
    ...... cut with reversed spindle sense
    ...... turret goes in X+ & lowers Y + stops spindle
    ...... index
    ...... aproach + cnc reset

    odyny + restart.mp4 : it shows what using odyny can provide : custom behaviour on restart
    ... same program as in previous movie
    ... restart is issued on the operation with the 2nd tool inside the Y holder:
    ...... turret goes in X+
    ...... indexes
    ...... aproach + Y lowers ( thus, a different approach for the same operation )
    ...... cut
    ...... turret goes in X+ & lowers Y + stops spindle




    i dont wanna highlight the codes; codes are just an instrument, an intermediate step

    this is a tool for crafting series on a lathe where shortening turret travel will have a considerable impact among overall cycle duration

    kindly !

    ps : for the Y example, i used a normal holder, not a double Y, because i need help from my Okuma dealer ... however, turret raises / lowers Y axis as it should

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


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

    Default Re: osp300L : dynamic safe positions + adaptive CTR

    hello everybody i have added 2 things :
    ... M01 optional stop, to make it easier for the operators to stop the lathe between operations; M01 is better than step-by-step, because it can be pressed anytime, while step-by-step requires the operators to be more sharp
    ... preferential turret positioning; examples for rough turning :
    ...... OD towards Z- ( P3 ), turret is approaching from X_up & Z_right
    ...... OD towards Z+ ( P4 ), turret is approaching from X_up & Z_left
    ...... ID towards Z- ( P2 ), turret is approaching from X_down & Z_right
    ......... P2,3,4 are quadrants for nose-rad comp; see attached

    as a result, effects caused by backlash are eliminated, at least at the begining of the operation; if there is no backlash, then the servo-loop will react prompt, only to cutting forces; otherwise, it will react later this thing is the lathe equivalent for "Uni-directional Positioning" function, available on mills

    i dont use it always
    ... examples for "using it" :
    ...... rough turning ( or milling )
    ...... finishing with tight tolerances
    ... examples for "not using it" :
    ...... when the clearance is long enough, to neutralize the backlash

    real code example :

    Code:
        CALL ODYNX LPOS=60 LCTR=1 LDS=+1 ( it means that next operation is turning, it begins at X60, and i wish for the turret to approach from above )
        T M66 G97 S M42 M03 M08 G00 X60 Z2.500 M63
        // rough od toolpath
    
        CALL ODYNX LPOS=30 LCTR=1 LDS=-1 ( it means that next operation is turning, it begins at X30, and i wish for the turret to approach from below )
        T M66 G97 S M42 M03 M08 G00 X30 Z2.500 M63
        // rough id toolpath
    
        CALL ODYNX LPOS=40 LCTR=1 LDS=0 ( it means that next operation is turning, it begins at X40, and i dont care if the turret is approaching from above or below )
        T M66 G97 S1 M42 M03 M08 G00 X40 Z-9 M63
        // finish od toolpath
    
        CALL ODYNX LPOS=2*SQRT[V6*V6+V7*V7] LCTR=2 LDS=+1 ( it means that next operation is milling, it begins at x=V6 and y=V7, and i wish for the turret to approach from above; X will be 2*SQRT[V6*V6+V7*V7]; this eliminates unnecessary movements )
        G137
        SB M13 M08 G00 X+V6 Y+V7 Z_whatever M63
        // milling toolpath
        G136 M12
    
        CALL ODYNZ LPOS=-50 LCTR=1 LDS=-1 ( it means that next operation is turning, it begins at Z-50, and i wish for the turret to approach from left )
        T M66 G97 S M42 M03 M08 G00 X40 Z-50 M63
        // finish od toolpath
    
        G00 safe_position
    this code below delivers the dynamic indexing behaviour + adaptive CTR + preferential positioning + M01

    Code:
    ODYNX ( position ** ctr ** approaching among X axis *3 )
    
    
        CALL ODYNC
        NOEX LDEM =  0 (*4) (*5a)
        NOEX LDYZ =  LVZP - VETFZ
        NOEX LDYX =  LPOS + VTOFX [ LINK ] + VTWOX [ LINK ] - VETFX + 2*5*LDS
    
    
        IF [  LDYX GE VSIOX ] NEND
        IF [  LDS  NE    -1 ] NJUMP (*5b)
              NOEX LDEM = 1         (*5b)
              NOEX LDEX = LDYX ( local dynamic : extra X ) (*5b)
              NOEX LDEZ = LDYZ (  ... ... ... ... ...  Z ) (*5b)
        NJUMP NOEX LDYX = VSIOX
        NEND  CALL ODYNA
    
    
    RTS ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
    
    
    ODYNZ ( position ** ctr  ** approaching among Z axis *3 )
    
    
        CALL ODYNC
        NOEX LDEM =  0 (*4) (*5a)
        NOEX LDYX =  LVXP - VETFX
        NOEX LDYZ =  LPOS + VTOFZ [ LINK ] + VTWOZ [ LINK ] - VETFZ + 1*5*LDS
    
    
        IF [  LDYZ GE VSIOZ ] NEND
        IF [  LDS  NE    -1 ] NJUMP (*5b)
              NOEX LDEM = 1         (*5b)
              NOEX LDEX = LDYX ( local dynamic : extra X ) (*5b)
              NOEX LDEZ = LDYZ (  ... ... ... ... ...  Z ) (*5b)
        NJUMP NOEX LDYZ = VSIOZ
        NEND  CALL ODYNA
    
    
    RTS ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
    
    
    ODYNA ( LCTR > 1:S , 2:C , 3:puller , 4: *1 )
    
    
        IF [ LCTR EQ 1 ] N1
        IF [ LCTR EQ 2 ] N2
        IF [ LCTR EQ 3 ] N3
                    GOTO N4
    
    
            N1 G00 X+LDYX Z+LDYZ M203 M109    M01 ( M18 )
               IF [ LDEM EQ 0 ] NOUT
               G00 X+LDEX Z+LDEZ
               GOTO NOUT
    
    
            N2 G00 X+LDYX Z+LDYZ M203 M05 M63 M01 ( M18 )
               IF [ LDEM EQ 0 ] NJUMP2
               G00 X+LDEX Z+LDEZ
               NJUMP2 M110 T + LINK * 10101   M66
               GOTO NOUT
    
    
            N3 G00 X+LDYX Z+LDYZ M203 M05 M63 M01 ( M18 )
               IF [ LDEM EQ 0 ] NJUMP3
               G00 X+LDEX Z+LDEZ
               NJUMP3 M19  T + LINK * 10101   M66
               GOTO NOUT
    
    
            N4 G00 X+LDYX Z+LDYZ M203 M05 M63 M01 ( M18 )
               IF [ LDEM EQ 0 ] NOUT
               G00 X+LDEX Z+LDEZ
               GOTO NOUT
    
    
            NOUT NOEX
    
    
    RTS ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
    
    
    ODYNC ( DYNamic lds Check )
    
    
        IF [ [ [ LDS EQ -1 ] OR [ LDS EQ +1 ] OR [ LDS EQ 0 ] ] EQ 1 ] NEND
                 NLOOOP M0 ( undefined LDS value )
                 GOTO NLOOOP
        NEND NOEX
    
    
    RTS ( . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . )
    
    
    (*1)  ( S_reverse, S_stop, 2nd spindle )
    (*3)  ( ODYNX : +1:from X+ , -1:from X- , 0:indifferent )
          ( ODYNZ : +1:from Z+ , -1:from Z- , 0:indifferent )
    (*4)  ( local dynamic : extra movement )


    such codes require time to be created, and they are reducing non-cuting durations; things can be futher improved, but at this moment i dont have the tools to do so the CALL ODYN* can be implemented inside a CAM post, and the ODYN* soubroutine can be treated as a *.lib file





    in the end, is not the code, but what it delivers / kindly !

    ps : however, this technique has a hidden enemy : inertia ! but this is a story for another time

    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

osp300L : dynamic safe positions + adaptive CTR

osp300L : dynamic safe positions + adaptive CTR