Idea M-code To Perform Series of Operations


Results 1 to 14 of 14

Thread: M-code To Perform Series of Operations

  1. #1
    Member ADVCOLE's Avatar
    Join Date
    Dec 2019
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default M-code To Perform Series of Operations

    Hey y'all,

    I have a Doosan 2000SY lathe with a Fanuc 18i-tb Control and when I want to perform a part eject and catch at the end of the cycle, it takes up a lot of time. It needs to blow off the part, move part catch into position, open chuck, eject part, lower parts catch, and finally close chuck. All these operations take up about 10 seconds. Would it be possible to create a single M-code (with possible ladder changes) so that all these operations are done in order with proper dwells all while the machine continues cycling onto the next part?

    Similar Threads:


  2. #2
    Member
    Join Date
    Apr 2011
    Location
    USA
    Posts
    841
    Downloads
    0
    Uploads
    0

    Default Re: M-code To Perform Series of Operations

    I can see how you can shave some time off by allowing the part catcher to advance while blow off is happening. Have you tried of parameter No.3404.

    When bit 7 (M3B) of parameter No.3404 is set to 1.Up to three M codes can be specified in a single block.



  3. #3
    Member ADVCOLE's Avatar
    Join Date
    Dec 2019
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default Re: M-code To Perform Series of Operations

    Thank you for the idea. I just switched that parameter and put the part catch up and blow off on the same block. The machine only performed the first M code on the block (blow off)? Any other parameters need to be switched?

    Now, while if I can get this to work, it would be a good time saving, my ultimate goal is to have one m-code to perform all of these functions while the machine continues forward?



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

    Default Re: M-code To Perform Series of Operations

    hy
    blow off the part - 1sec
    catcher advance - <0.5sec
    open chuck - <0.5sec
    eject part - how is the part ejected ?
    catcher retreat < 0.5sec
    close chuck < 1sec

    if all those is 10secons, my guess it part ejecting is too slow

    Up to three M codes can be specified in a single block
    actually, it does not matter if M are all on single line, or on individual lines

    what matters, is how those M codes are executed one in relation to other, thus what are the conditions for them to begin execution, and how are they confirmed; is definetly particular to cnc brand such conditions normally, are group specific

    an aproach possible on okuma machine, is to simply ignore their answer, thus each code will start its exectuion regardless of what the previous code status is; check this function if available on your machine

    my ultimate goal is to have one m-code to perform all of these functions while the machine continues forward?
    if your last operation is closing the chuck, and you wish to run it in background, then what do you wish to do while the chuck is still opened ? 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 ...


  5. #5
    Member ADVCOLE's Avatar
    Join Date
    Dec 2019
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default Re: M-code To Perform Series of Operations

    Quote Originally Posted by deadlykitten View Post
    blow off the part - 1sec
    catcher advance - <0.5sec
    open chuck - <0.5sec
    eject part - how is the part ejected ?
    catcher retreat < 0.5sec
    close chuck < 1sec

    if all those is 10secons, my guess it part ejecting is too slow
    This is more like what the timing is on my machine

    Blow Off =~4
    Catcher up= 1
    open chuck = <1
    eject part = 2
    catch retract = 1
    close chuck =<1



    Quote Originally Posted by deadlykitten View Post
    if your last operation is closing the chuck, and you wish to run it in background, then what do you wish to do while the chuck is still opened ? kindly
    These operations all occur on the sub-spindle, the main spindle and turret will be free to begin producing the next part.


    How would I go about turning off the wait for m-code finish command? is it a global parameter, or can it be turned off for individual m codes?



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

    Default Re: M-code To Perform Series of Operations

    These operations all occur on the sub-spindle, the main spindle and turret will be free to begin producing the next part.
    hello again the only way to simultaneously run spindle 1 and spindle 2 operations, is if your control accepts P codes

    How would I go about turning off the wait for m-code finish command?
    unfortunateely, i am not a fanuc guy ...

    This is more like what the timing is on my machine

    Blow Off =~4
    Catcher up= 1
    open chuck = <1
    eject part = 2
    catch retract = 1
    close chuck =<1
    a few ideas :
    ... eliminate blow off, or half it's duration
    ... try catcher and clamp/unclamp code togheter with inposition; for example :
    ...... when tool disengages from cut, also call cacter
    ...... when turret goes to home position, also open chuck

    please, how do you eject the part ? 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 ...


  7. #7
    Member ADVCOLE's Avatar
    Join Date
    Dec 2019
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default Re: M-code To Perform Series of Operations

    I assume the P codes you are talking about are with reference to dual turret, multi-tasking lathes? If so, then no, this control does not have that ability.

    I have put M-codes on lines combined with positioning motions, it helps some, but the machine still positions faster than the M-codes can finish, so I was hoping for a more efficient solution.

    The parts are ejected by a push rod that advances and retracts inside the sub-spindle.



  8. #8
    Member
    Join Date
    Apr 2011
    Location
    USA
    Posts
    841
    Downloads
    0
    Uploads
    0

    Default Re: M-code To Perform Series of Operations

    Can you post your ladder?



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

    Default Re: M-code To Perform Series of Operations

    reference to dual turret, multi-tasking lathes
    hy advcole yes, those P codes ... dual spindle single turret lathes (2s1t) rarely have P codes, but they may have functions that allow more control, like :
    ... having the 2nd spindle doing a bit more than slave operations to 1st spindle
    ... superimposing
    *depends

    I have put M-codes on lines combined with positioning motions, it helps some, but the machine still positions faster than the M-codes can finish, so I was hoping for a more efficient solution.
    if you got at least 10-20% time shave off, is better than nothing
    try also to combine :
    ... with feed motions, instead of rapids, as feeding blocks take some time; go not for last feed, but for the longest last feed, you know ?
    ... with spindle acceleration(from 0)/deceleration(to stop), as those lines may need >=1 sec

    The parts are ejected by a push rod that advances and retracts inside the sub-spindle.
    on some setups, is possible to use a spring; only use M_chuck_open, delay, M_close, so no M code for that spring / kindly

    Last edited by deadlykitten; 08-12-2022 at 02:25 AM.
    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
    4131
    Downloads
    0
    Uploads
    0

    Default Re: M-code To Perform Series of Operations

    just one more thing advcole : maybe you allready know, but if you succes in using desired M codes, together with axis motion / rpm change / whatever else, then it does not matter if you chain, or not, those operations one after the other

    i will try to clarify even futher : for example, if main spindle operations take 60 seconds, and 2nd spindle (part out of machine) is 10 seconds, now your overall duration is 70seconds; once you succed with using 'those' M codes togheter with lines specific for 1st spindle, then overall program duration will be between 60 and 70 seconds ( thus is still posible to have 0 time gain if combinations are not done ok )

    for simplifing, let's consider that you reached those 60 seconds, thus you fully merged 2nd spindle operations into 1st spindle; in such a case, all these may be possible : 2nd spindle operations occur :
    ... during the 1st 10 seconds of main spindle operation ( thus at begining )
    ... during the last 10 seconds of main spindle operation ( thus at end )
    ... during interval 10-12, 25-30, 33-34, and 45-48 of main spindle operations

    so, a full chain of those operations means that they all happen succesive, but is not a must; actually, what matter, is to intergrate them into main spindle operations, and if result is discontinuous, it really does not matter

    besides looking to join with rapids, rpm change, and feed, may also be possible to split an existing block with long enough duration, so to cover at least 2 M codes; for example, if you would need to merge only 2 M codes, each executing in 5 seconds, and you only have a operation on main spindle that takes > 5 seconds, and actually takes 15 seconds, then you may split that line in 2, thus gettting 2 feed lines that execute in 7.5 seconds, that are available to join with those M codes without overall time loss; look for long od operations, and/or drilling

    it may require to replace an existing cycle with custom written code / 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 ...


  11. #11
    Member ADVCOLE's Avatar
    Join Date
    Dec 2019
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default Re: M-code To Perform Series of Operations

    deadlykitten, thank you for all your ideas, I will give it a try and see how it works out for us.

    drdos, attached is the ladder file.

    Attached Files Attached Files


  12. #12
    Member
    Join Date
    Apr 2017
    Location
    United Kingdom
    Posts
    29
    Downloads
    1
    Uploads
    0

    Default Re: M-code To Perform Series of Operations

    I am not sure if this is possible on the older S type Puma machines but if it does on a 2013 model .

    G100 B control function:
    This allows the B axis to perform certain functions while machining. The Operation manual doesn’t give the necessary code:
    It needs a D & M command and a B & F where needed

    D0 B-? will rapid B to position
    D1 B-? F? will feed B in G98 mode
    D2 B-? F? will feed B in G99 mode
    D7 will reference B

    M0 will not use the parts catcher
    M1 will raise the parts catcher
    M2 will raise the parts catcher, eject then lower catcher.

    G100 D7 M2 will reference B & eject the part into the bucket.

    M191 is then inserted at a point in the program where you want the command to be executed.

    Example code below

    O0001(G100 EX)
    G28U0V0
    G30W0
    G50S1500
    T0909
    G100D7M2
    G96S200M3P11
    G0Z0
    X52.
    G1X-1.6F0.3
    W1.
    G0X50.
    M191
    G1Z-30.
    U6.W-3.
    G30U0
    G30W0
    M5P11
    M30
    %

    Basically the B Axis and part eject are happening while the turret is machining at the left spindle

    Last edited by Dale123; 08-16-2022 at 07:08 AM.


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

    Default Re: M-code To Perform Series of Operations

    deadlykitten, thank you for all your ideas
    you are welcome if you wish for specific things, another opinion, pls share more details

    G96S200M3P11
    ....
    M5P11
    P codes / 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 ...


  14. #14
    Member ADVCOLE's Avatar
    Join Date
    Dec 2019
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default Re: M-code To Perform Series of Operations

    Quote Originally Posted by Dale123 View Post
    O0001(G100 EX)
    G28U0V0
    G30W0
    G50S1500
    T0909
    G100D7M2
    G96S200M3P11
    G0Z0
    X52.
    G1X-1.6F0.3
    W1.
    G0X50.
    M191
    G1Z-30.
    U6.W-3.
    G30U0
    G30W0
    M5P11
    M30
    %

    Basically the B Axis and part eject are happening while the turret is machining at the left spindle
    I wish this worked! this is exactly what I am looking for, unfortunately, my control isn't liking those codes.



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

M-code To Perform Series of Operations

M-code To Perform Series of Operations