Servo Driven Toolchanger


Page 1 of 3 123 LastLast
Results 1 to 20 of 48

Thread: Servo Driven Toolchanger

  1. #1
    Member Need TECH Help!'s Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    578
    Downloads
    0
    Uploads
    0

    Default Servo Driven Toolchanger

    Making another upgrade to the Hurco. After running the factory Geneva mechanism for a while i really dont like or trust it. So iam in the midst of changing it to servo gear driven. Using a 750watt ac servo.
    Here is a couple pics of the pinion and ring gears. Just standard straight tooth spur.
    And video of it so far...


    Will most likely be back soon for C code help.
    Troy

    Similar Threads:
    Attached Thumbnails Attached Thumbnails Servo Driven Toolchanger-pinion-jpg   Servo Driven Toolchanger-ring-jpg   Servo Driven Toolchanger-ring2-jpg   Servo Driven Toolchanger-ring3-jpg  

    www.tsjobshop.com, www.homecncstuff.elementfx.com


  2. #2
    Member Need TECH Help!'s Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    578
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Been doing some tuning of servo in analog mode. Has a little jitter to it(not bad tho) and takes about a second to settle into position when coming to a complete stop, estimate about the last .02" of movement when rotating carousel about 180* then back to 0. Still finding my way through the servo drive settings. I think current tuning is fine.
    Now iam trying to figure out how i should approach the Ccode for tool change sequence.

    1) Set 2 inputs on servo drive , one for CW rotation and other for CCW. Then use my current proximity sensor that was used to count tool pockets on the Geneva mechanism and design a trip for it to sense. Or maybe a trip at every tool pocket position?

    2)Would rather do this....Use the encoder on servo to move/rotate carousel to desired pocket position. But how is this done?? Is there a text file that the M6 c code would call to find out where the position of each pocket is? Example: Pocket 1 is at 0* and Pocket 16 is at -22.5* or 337.5*. And then ccode would need to determine which direction of rotation is shorter to desired tool.

    Anyone got a ccode example of method 2?
    Thanks,
    Troy

    Attached Thumbnails Attached Thumbnails Servo Driven Toolchanger-sevotoolchangeranalogv1-jpg  
    Attached Files Attached Files
    www.tsjobshop.com, www.homecncstuff.elementfx.com


  3. #3
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Don't try to do it in degrees. There is some number of encoder pulses between stations, this is a fixed number. So you just want to turn the correct number of pulses between the current station and the target station.

    To get the shortest path:

    A = pulses CW to target
    B = pulses CCW to target

    If A>B then turn CCW
    else
    B>=A then turn CW

    Use the prox sensor as the turret home position sensor.

    Jim Dawson
    Sandy, Oregon, USA


  4. #4
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Thats a great job. I've considered doing the same to mine. The toolchanger on my Fadal is also Geneva drive and is unbelievably slow. I really need to have all tools of every program right in line. If it has to go hunting around takes forever.

    I was making gears this week too. Still loving my Dynomotion control.

    Attached Thumbnails Attached Thumbnails Servo Driven Toolchanger-129865297_1755117294642857_2401025860282851029_o-jpg  


  5. #5
    Member
    Join Date
    Jan 2014
    Posts
    106
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Need TECH Help! View Post
    Making another upgrade to the Hurco. After running the factory Geneva mechanism for a while i really dont like or trust it. So iam in the midst of changing it to servo gear driven. Using a 750watt ac servo.
    Here is a couple pics of the pinion and ring gears. Just standard straight tooth spur.
    And video of it so far...


    Will most likely be back soon for C code help.
    Troy
    As jim said don't use degrees, use pulses. The best way.

    Or if you do not use an encoder you can add a tool pot count sensor. In addition to your tool pocket 1 sensor.
    Then you use that count sensor to find all pockets.
    Although on a power up, it has to initially home out to pot 1, to reference counting start position.

    Tool carousel programming is sometimes frustrating because you have to keep track of all the pots with different tools being exchanged in each one.



  6. #6
    Member Need TECH Help!'s Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    578
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Hi murray,mine was slow also and very rough, would jar the heavy tools. Making me afraid to leave it alone for fear of dropping a tool.
    Wow, gears look nice.

    www.tsjobshop.com, www.homecncstuff.elementfx.com


  7. #7
    Member Need TECH Help!'s Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    578
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Quote Originally Posted by bill4807 View Post
    As jim said don't use degrees, use pulses. The best way.

    Or if you do not use an encoder you can add a tool pot count sensor. In addition to your tool pocket 1 sensor.
    Then you use that count sensor to find all pockets.
    Although on a power up, it has to initially home out to pot 1, to reference counting start position.

    Tool carousel programming is sometimes frustrating because you have to keep track of all the pots with different tools being exchanged in each one.
    Thats how the tool changer used to work. I can still do this , but would rather do it with encoder and be more accurate.

    Wondering how the c code would know where each tool pot is when using encoder method.

    www.tsjobshop.com, www.homecncstuff.elementfx.com


  8. #8
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Quote Originally Posted by Need TECH Help! View Post
    Thats how the tool changer used to work. I can still do this , but would rather do it with encoder and be more accurate.

    Wondering how the c code would know where each tool pot is when using encoder method.
    I think you missed my post above. ^^^

    Jim Dawson
    Sandy, Oregon, USA


  9. #9
    Member Need TECH Help!'s Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    578
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Hi Jim,
    Ya, i saw it. Thought you was just describing how the C code would work, is this the actual c code statement/command needed?
    Also, i am using the original limit switch on carousel. The prox sensor was for counting.

    www.tsjobshop.com, www.homecncstuff.elementfx.com


  10. #10
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Ahh, no. I was just illustrating the logic flow I used on a couple of tool changers.

    EDIT: The code is almost what you would use to determine the shortest path, the syntax in C is a little different. I'm not a C programmer.

    Once you know where pocket 1 (home) is at, then it's a simple matter of just counting the pockets (in encoder pulses) for the current tool or the next tool. On my lathe turret, I just store the current tool in a variable, thus it's easy to calculate the position to the next tool. I actually store the current tool in the startup xml file, so even starting with cold boot, the software knows there the turret is at. This writes to file on every tool change. If needed, I have a one button home turret function for the rare occasions that it gets lost. On the mill, the tool changer homes on startup, I should change this to work like the lathe.

    Exactly what your c code would look like, I'm not sure, I've never done any programming on a Dynomotion controller.

    Last edited by Jim Dawson; 12-08-2020 at 05:04 PM.
    Jim Dawson
    Sandy, Oregon, USA


  11. #11
    Member Need TECH Help!'s Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    578
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    That much i follow. And the old tool changer worked like you are describing. What iam trying to figure out now is how does the C code know where the tool pockets are by counts or encoder position? Doesn't there need to be some sort of file with the locations of each tool slot? Example like this...

    Tool Pocket1= 0 counts
    Tool Pocket2=10000 counts
    Tool Pocket3=20000 counts
    Tool Pocket4=30000 counts

    And when a M6 is executed this file would be looked at to know where to move to.

    Does this make sense ? Or am i thinking of this the wrong way?

    www.tsjobshop.com, www.homecncstuff.elementfx.com


  12. #12
    Member Need TECH Help!'s Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    578
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    From what i understand, i need to change these to parts of my old M6 ccode...

    Code:
    // 1. Determine how many pockets to rotate
    
    	int pockets = persist.UserData[6] - persist.UserData[157];	// pockets = requested tool - current tool
    
    	if (pockets == 0)
    		return 0;				// No toolchange needed, End
    	if (pockets >= 8)
    		pockets = -16 + pockets;	// If more then halfway CW, reverse
    	if (pockets <= -8)
    		pockets = 16 + pockets;	// If more then halfway CCW, reverse
    
    
    	persist.UserData[161] = 1;	// Toolchanger active disable feedhold button
    	ResumeCoordinatedMotion();	// Clear feedhold
    
    
    // 2. Turn off Flood Coolant if left on
    .
    .
    .
    .
    .
    .
    // 9. Rotate Carousel 
    
    	while (pockets >= 1)		// Rotate Turret CW whatever number of pockets
    	{
    		SetBit(49);				// TC Carousel Motor On CW
    		while (!ReadBit(1033))
    			WaitNextTimeSlice();	// Wait for CarouselMotorProxSensor
    		Delay_sec(.4);
    		ClearBit(49);			// TC_Carousel CW Motor Off
    		pockets = pockets - 1;
    	}
    
    	while (pockets <= -1)		// Rotate Turret CCW whatever number of pockets
    	{
    		SetBit(50);				// TC Carousel Motor On CCW
    		while (!ReadBit(1033))
    			WaitNextTimeSlice();	// Wait for CarouselMotorProxSensor
    		Delay_sec(.4);
    		ClearBit(50);			// TC_Carousel CCW Motor Off
    		pockets = pockets + 1;
    	}
    
    
    // 10. Move Tool Changer UP
    Looking at the example c code Linear4ToolHoldersRev2, is this what i need to do? But instead om moving X axis i would assign another axis?

    Last edited by Need TECH Help!; 12-08-2020 at 07:14 PM.
    www.tsjobshop.com, www.homecncstuff.elementfx.com


  13. #13
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    The target tool number (TOOLNEXT) is passed by the CNC program, and the CNC program calls the #M6 tool change routine. So the actual call would be (TOOLNEXT = n, XQ#M6) This is in code that my Galil controller understands, but the logic is the same in any language, only the syntax would change. You should be able to follow this, I'll be happy to clarify if needed.

    #M6;'TOOL CHANGE ROUTINE
    SPX=200000;'SET ROTATION SPEED IN PULSES/SECOND
    PPS=24000;'PULSES PER STATION
    IF(ESOK=1);'IF ESTOP OK
    IF(TOOLNEXT=TOOLNUM);JP#SKIPTC;ENDIF;'SKIP MOVE IF TOOLNUM=TOOLNEXT
    'MOVE X,Y,Z TO SAFE TC LOCATION

    T1=TOOLNUM-TOOLNEXT;'TOOLNUM=CURRENT POCKET
    T2=TOOLNEXT-TOOLNUM;'TOOLNEXT=TARGET POCKET
    IF(T1<0);T1=T1+10;ENDIF;'10= NUMBER OF POCKETS ON MY LATHE
    IF(T2<0);T2=T2+10;ENDIF
    'ROTATE TO NEW POSITION
    SHX;'ENABLE MOTOR
    WT200
    'DETERMINE THE SHORTEST PATH
    IF(T1>T2);JS#TCCW;ENDIF;'JUMP TO SUB TURN CCW
    IF(T1=<T2);JS#TCW;ENDIF;'JUMP TO SUB TURN CW
    TOOLNUM=TOOLNEXT;'SET THE NEW POSITION AS THE CURRENT TOOL

    #SKIPTC;'SKIP MOVE IF TOOLNUM=TOOLNEXT
    ENDIF;' IF ESOK
    EN

    #TCW;'TOOL CHANGER CLOCKWISE SUB
    PAX=-(T1*PPS);'SET NEW POSITION = POCKETS TO MOVE * PULSES/POCKET
    BGX;'BEGIN MOVE
    AMX;'AFTER MOVE
    EN

    #TCCW;'TOOL CHANGER COUNTER CLOCKWISE SUB
    PAX=(T2*PPS)
    BGX
    AMX
    EN

    Jim Dawson
    Sandy, Oregon, USA


  14. #14
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Quote Originally Posted by Need TECH Help! View Post
    From what i understand, i need to change these to parts of my old M6 ccode...

    Code:
    // 1. Determine how many pockets to rotate
    
        int pockets = persist.UserData[6] - persist.UserData[157];    // pockets = requested tool - current tool
    
        if (pockets == 0)
            return 0;                // No toolchange needed, End
        if (pockets >= 8)
            pockets = -16 + pockets;    // If more then halfway CW, reverse
        if (pockets <= -8)
            pockets = 16 + pockets;    // If more then halfway CCW, reverse
    
    
        persist.UserData[161] = 1;    // Toolchanger active disable feedhold button
        ResumeCoordinatedMotion();    // Clear feedhold
    
    
    // 2. Turn off Flood Coolant if left on
    .
    .
    .
    .
    .
    .
    // 9. Rotate Carousel 
    
        while (pockets >= 1)        // Rotate Turret CW whatever number of pockets
        {
            SetBit(49);                // TC Carousel Motor On CW
            while (!ReadBit(1033))
                WaitNextTimeSlice();    // Wait for CarouselMotorProxSensor
            Delay_sec(.4);
            ClearBit(49);            // TC_Carousel CW Motor Off
            pockets = pockets - 1;
        }
    
        while (pockets <= -1)        // Rotate Turret CCW whatever number of pockets
        {
            SetBit(50);                // TC Carousel Motor On CCW
            while (!ReadBit(1033))
                WaitNextTimeSlice();    // Wait for CarouselMotorProxSensor
            Delay_sec(.4);
            ClearBit(50);            // TC_Carousel CCW Motor Off
            pockets = pockets + 1;
        }
    
    
    // 10. Move Tool Changer UP
    Looking at the example c code Linear4ToolHoldersRev2, is this what i need to do? But instead om moving X axis i would assign another axis?
    Yes, I think so. You would have to assign the TC axis.

    Jim Dawson
    Sandy, Oregon, USA


  15. #15
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    It shouldnt be to hard to figure out. Hardest part will be the homing program. You will need to have last tool number saved to disk. You will have the same number of counts between pockets, and you will need some kind of offset between home sensor and the first pocket. I would just define this offset in terms of number of counts somewhere at the start of your homing program.

    So I would do a program to look for home sensor, then calculate the number of counts to the saved tool number, then just move to that location and your done. Calculation would be something like this:

    number of counts = ((Saved tool number - 1) x counts between pockets) + offset




    Once your homed and back at the proper location for the current tool it should be really easy. Just use the same toolchange program your using now but when you get to the rotation part (step 9) convert # of pockets to counts.

    Counts = pockets x counts between pockets

    Then just move incrementally by that amount of counts. And that will be everything you need to do. Much simpler then what we have going on now actually, get rid of all the old stuff under step 9.



  16. #16
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Hi Troy,

    Regarding settling of servo: Have you tried high D gain?

    Regarding Too Change code: Have you determined axis counts for a full rev of the turret? Are you able to Home the turret?

    Regards
    TK http://dynomotion.com


  17. #17
    Member Need TECH Help!'s Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    578
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Hi Tom,
    I tried D gain and didnt make much difference...at one time i had D set to 250, only made servo louder.
    Encoder is 2500, my gear ratio of Carousel gear and servo pinion gear is 2.692307692307692 to 1. (105 tooth ring divided by 39 tooth pinion or 8.75 Pitch Diameter divided by 3.25 Pitch Diameter.)
    I still have the limit switch on carousel that locates tool pocket 16.

    www.tsjobshop.com, www.homecncstuff.elementfx.com


  18. #18
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Hi Troy,

    So if you move 6731 counts does it make one rev?

    Regards
    TK http://dynomotion.com


  19. #19
    Member Need TECH Help!'s Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    578
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    Quote Originally Posted by TomKerekes View Post
    Hi Troy,

    So if you move 6731 counts does it make one rev?
    No, but 10002.69230769231 does.

    www.tsjobshop.com, www.homecncstuff.elementfx.com


  20. #20
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    Downloads
    0
    Uploads
    0

    Default Re: Servo Driven Toolchanger

    The Motor or the Turret? Where is the encoder mounted/measuring?

    I love the significant digits How was that determined?

    So I'll assume the motor so then 26923 counts should be one rev of the turret.

    Regards
    TK http://dynomotion.com


Page 1 of 3 123 LastLast

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

Servo Driven Toolchanger

Servo Driven Toolchanger