4th Axis With Argon Drive


Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: 4th Axis With Argon Drive

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

    Default 4th Axis With Argon Drive

    Hello all,
    Finally getting around to my 4th axis build on my Hurco mill. The 4th axis has a Fanuc alpha a/3000 motor. That iam driving it with a Granite Devices Argon drive. When testing this combination within Granite Devices software, motor holds position and tests moves fine when set to Position Control , Serial mode.
    Now iam trying to get drive working in Analog mode and using Kmotion ,with not much success. No matter what settings i change in drive or tuning in Kmotion, servo will not stop dithering back and forth when idle,moves about half a turn in both directions.

    If i disable,zero and enable,(in Kmotion) sometimes motor does not move.But if i try to turn motor by hand ,ever so slightly, it will start dithering again. Also when i try to do a large test move in kmotion the servo will rotate in one direction a little then dither and move a little more and dither.

    So i would like to try Step/Dir for the 4th axis only and leave X,Y,Z and spindle as analog. Like to keep the Differential Inputs on Kanalog and thought i seen someone that did Step/Dir another way or maybe talked about it as an option?
    Any thoughts?

    Thanks,
    Troy

    Similar Threads:
    www.tsjobshop.com, www.homecncstuff.elementfx.com


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

    Default Re: 4th Axis With Argon Drive

    Made another cable to use drive in Step/Direction mode. Testing in Kmotion is working and stable.
    Can my spindle encoder be moved to Konnect inputs? So i can connect the 4th axis encoder. Or at least the Z channel of 4th axis encoder be connected to Konnect for referencing axis?

    Thanks,
    Troy

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


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

    Default Re: 4th Axis With Argon Drive

    Hi Troy,

    Can my spindle encoder be moved to Konnect inputs?
    Konnect doesn't have any encoder inputs.

    One somewhat ugly option is to slit KFLOP's JP5 cable to have some connections to Kanalog for some differential signals to be available from Kanalog JP2, but have two pins coming out for Step/Dir.


    Another option is to mux the Step/Dir Outputs over to JP4 and JP6. Do you have either of those available?

    Regards
    TK http://dynomotion.com


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

    Default Re: 4th Axis With Argon Drive

    Hi Tom,

    One somewhat ugly option is to slit KFLOP's JP5 cable to have some connections to Kanalog for some differential signals to be available from Kanalog JP2, but have two pins coming out for Step/Dir.
    Hmm, didnt realize that could be done, was thinking that JP5 was all connections or none to Kanalog. This sounds like an easier option and i dont see me using all the Differential inputs anyway. Maybe one more for a 5th axis.
    I have a RJ45 breakout board iam using now for Step/Dir from Kflop JP5 that i could make a pigtail for Kanalog's JP9. Is there any certain 2 wires i should use out of the 8 for a single axis Step/Dir?
    Thanks,
    Troy

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


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

    Default Re: 4th Axis With Argon Drive

    Hi Troy,

    I have a RJ45 breakout board iam using now for Step/Dir from Kflop JP5 that i could make a pigtail for Kanalog's JP9. Is there any certain 2 wires i should use out of the 8 for a single axis Step/Dir?
    It shouldn't matter. The 8 pins are 4 sets of 2 pins that can arbitrarily be used as either an AB Encoder input or Step/Dir output.

    Regards
    TK http://dynomotion.com


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

    Default Re: 4th Axis With Argon Drive

    Hi Tom,
    Ok. Got it wired , Step/Dir and encoder input working.
    On another note, my 4th axis has a 2 wire proximity sensor. Can this be used on a Konnect input? Tried it and the pin LED stays on very dim when proximity sensor senses object and input in kmotion stays high(check marked) .Should there be a resistor or?

    Thanks,
    Troy

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


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

    Default Re: 4th Axis With Argon Drive

    If i can get referencing of 4th axis to work by using the Z index from encoder i wont use a proximity sensor. Will just use a physical mark. That said, i have made a Referencing C Code to use the Z index but cant get it to repeat.It looks like it stops at random points. The Z index is connected to Kanalog terminal JP2 pins 6A+ and 6A-.
    Here is code iam using. What am i missing. This is same code as i use on my lathe other than the bit.
    Troy
    Code:
    #include "KMotionDef.h"
    #include "SimpleHomeIndexFunction.c"
    
    main()
    {
    	int result;
    
    
    	// HOME A
    
    	result = SimpleHomeIndexFunction(4,	// axis number to home
    					20000,	// speed to move toward home
    					 1,	// direction to move toward home (+1 or -1)
    					 40,	// limit bit number to watch for
    					 1,	// limit polarity to wait for (1 or 0)
    					 20000.0,	// speed to move while searching for index
    					-1,	// index bit number to watch for (use -1 for none)
    					-1,	// index polarity to wait for (1 or 0)
    					 0);	// amount to move inside limits
    
    	if (result == 0)
    	{
    		printf("Home A succeded\n");
    	}
    	else
    	{
    		printf("Home A failed\n");
    		return;
    	}
    
    
    }


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


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

    Default Re: 4th Axis With Argon Drive

    Hi Troy,

    my 4th axis has a 2 wire proximity sensor. Can this be used on a Konnect input? Tried it and the pin LED stays on very dim when proximity sensor senses object and input in kmotion stays high(check marked) .Should there be a resistor or?
    The sensor might have enough leakage to turn on the Konnect Input even when "off". You might check the voltage across the Konnect input. What supply voltage are you using? Do you have a specification? Leakage? You might parallel the Konnect Input with a 1.5K Ohm 1/2 watt resistor. That would bypass about 3/4ths of the leakage current and the Konnect Input would see about 1/4 of the leakage current.



    If i can get referencing of 4th axis to work by using the Z index from encoder i wont use a proximity sensor. Will just use a physical mark. That said, i have made a Referencing C Code to use the Z index but cant get it to repeat.It looks like it stops at random points. The Z index is connected to Kanalog terminal JP2 pins 6A+ and 6A-.
    Here is code iam using. What am i missing. This is same code as i use on my lathe other than the bit.
    Because an Index pulse occurs every rotation, if you try to use it like a home sensor it will stop at the first rev it is encountered so there isn't a means of knowing where the axis really is. So normally a home sensor is used in conjunction with an index pulse. The SimpleHomeIndexFunction() need to be told two inputs - the home and index bits. That way it can first move to the home sensor and then to the first index pulse.

    Regards
    TK http://dynomotion.com


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

    Default Re: 4th Axis With Argon Drive

    There is no markings on the proximity sensor. Looking at old info for this 4th axis, the voltage should be 24VDC and that is what iam using.
    Will try the resistor as you suggested.

    The SimpleHomeIndexFunction() need to be told two inputs - the home and index bits. That way it can first move to the home sensor and then to the first index pulse.
    How is this working on my lathe? Iam not using any sensor just a physical mark on lathe bed and the Z index.

    Thanks
    Troy

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


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

    Default Re: 4th Axis With Argon Drive

    Hi Troy,

    How is this working on my lathe? Iam not using any sensor just a physical mark on lathe bed and the Z index.
    Oh correct, that should work if you manually jog it to a specific position first.

    It could be either the speed is too high and sometimes the index pulse is being missed - in this case the positions it stops should always be exactly some multiple revs different.

    Or if it is stopping at random positions before the index pulse I would expect noise to be the problem.

    Regards
    TK http://dynomotion.com


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

    Default Re: 4th Axis With Argon Drive

    Hi Tom,
    Will try a slower speed also.

    As for noise issue, I have the encoder wires split at the drive connector and going about 4 foot to Kanalog with a drain to Kanalog GND terminals. You think this would cause a noise issue on the Z index channel only? As the A&B channels seem to be working fine with CL Step/Dir.

    Thanks,
    Troy

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


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

    Default Re: 4th Axis With Argon Drive

    Hi Troy,


    As for noise issue, I have the encoder wires split at the drive connector and going about 4 foot to Kanalog with a drain to Kanalog GND terminals. You think this would cause a noise issue on the Z index channel only? As the A&B channels seem to be working fine with CL Step/Dir.
    Hard to say. The AB signals do have some digital filtering and a single glitch may just cause a count up and down with no noticeable effect, where for an index one glitch may be detected as the index pulse. Is the index + and - a twisted pair? Does the Encoder move more than one rotation and always at the same orientation? Or less than a rotation and stop at random angles?

    Regards
    TK http://dynomotion.com


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

    Default Re: 4th Axis With Argon Drive

    Hi Tom,
    1. Resistor in parallel with proximity sensor fixed current leak issue and input now switches off when triggered.
    2. Slowing feed for the encoder index fixed issue of not repeating.

    Now i have the reference program working using the proximity sensor, but need some c code help. The proximity sensor input to Konnect is normally on. And off when triggered.

    How to handle a condition if rotary is in a position where the proximity sensor is on the triggering lobe. Triggering lobe is about 2-3" long arc.(hard to see thru the oil fill hole.) So reference program would need to rotate in one direction until the proximity input is switched back on and back off again. The first trigger would be where one end of lobe is. And the 2nd trigger is the other end of lobe and where it needs to then look for the encoder index mark.

    But other condition of proximity sensor would be if proximity input is on , then rotate till first trigger and then continue to search for encoder index mark.
    Make sense?

    Below is the 2nd condition.

    Troy

    Code:
    #include "KMotionDef.h"
    #include "SimpleHomeIndexFunction.c"
    
    main()
    {
    	int result;
    
    
    	// HOME A
    
    	result = SimpleHomeIndexFunction(4,	// axis number to home
    						20000,	// speed to move toward home
    						 -1,	// direction to move toward home (+1 or -1)
    						 1106,	// limit bit number to watch for
    						 0,	// limit polarity to wait for (1 or 0)
    						 2000.0,	// speed to move while searching for index
    						 40,	// index bit number to watch for (use -1 for none)
    						 1,	// index polarity to wait for (1 or 0)
    						0);	// amount to move inside limits
    
    	if (result == 0)
    	{
    		printf("Home A succeded\n");
    	}
    	else
    	{
    		printf("Home A failed\n");
    		return;
    	}
    
    
    }


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


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

    Default Re: 4th Axis With Argon Drive

    Hi Troy,

    Not sure I follow that. It isn't clear which side of the "lobe" you want to use. But if the only problem is if the proximity sensor is already triggered from the beginning, then you should just be able to test for this and if so move positive until it goes off then continue as normal. So add this before what you have:

    Code:
    	
        if (!ReadBit(1106)) // already on "lobe" ??
        {
            Jog(4, 20000);             // yes, move positive
            while (!ReadBit(1106))  ;  // wait until off lobe
            Jog(4, 0);                 // stop
            while (!CheckDone(4))   ;  // wait till stopped
        }


    Regards
    TK http://dynomotion.com


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

    Default Re: 4th Axis With Argon Drive

    Hi Tom,
    Boy... i made it way more complicated than it was. That is what i needed the code works great.

    Any idea how to handle the main init code when the 4th axis is not connected? So there would not be any faults from not being connected. Do i need to make a separate init code? And then select it in KmotionCNC tool setup? Or maybe have a pop up asking if it connected?

    Thanks again.

    Last edited by Need TECH Help!; 06-30-2020 at 06:46 PM.
    www.tsjobshop.com, www.homecncstuff.elementfx.com


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

    Default Re: 4th Axis With Argon Drive

    Hi Troy,

    You might have 2 INIT Programs and 2 User buttons for them. One configures 4 axes, Enables 4 axes, and includes the 4 axes in the coordinate system. The other configures 4 axes, enables 3, disables the 4th, and only includes the 3 in the coordinate system.

    HTH

    Regards
    TK http://dynomotion.com


  17. #17
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    494
    Downloads
    0
    Uploads
    0

    Default Re: 4th Axis With Argon Drive

    Quote Originally Posted by Need TECH Help! View Post
    Hi Tom,
    Boy... i made it way more complicated than it was. That is what i needed the code works great.

    Any idea how to handle the main init code when the 4th axis is not connected? So there would not be any faults from not being connected. Do i need to make a separate init code? And then select it in KmotionCNC tool setup? Or maybe have a pop up asking if it connected?

    Thanks again.
    Depending on your setup, you might be able to look for some sensors to determine if the 4th axis is plugged in or not, and then configure things accordingly.

    For example my 4th axis has sensors to verify if its clamped or unclamped. I check for both of these, and if I find one of the signals are on then the 4th must be plugged in, and then it sets everything up for 4 axis use. If it doesnt see either of these signals, the 4th axis is not plugged in so it sets everything up for 3 axis. Works well for me.



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

    Default Re: 4th Axis With Argon Drive

    Think the extra button will be fine for me, keeps code simpler to

    Next thing iam working on is the air solenoid for holding clamp. Going to try and follow your 4th axis thread murray, looks like the same thing that i need to handle the brake.
    https://www.cnczone.com/forums/dynom...906-mazak.html

    Troy

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


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

    Default Re: 4th Axis With Argon Drive

    Murray,
    Does your C codes for clamp and unclamp use a switch to indicate if clamp is active? Can you share your c codes for this?
    Thanks,
    Troy

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


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

    Default Re: 4th Axis With Argon Drive

    I think i have the Ccodes figured out for clamp/unclamp with Mcodes.

    Something else i am trying to figure out is how to unclamp 4thaxis when 4th axis is selected with Jog Pendant and then clamp when 4th axis is not selected. Here is the bit of code that handles the axis selection with pendant. What is the code to handle this?

    Code:
    		// convert quadrature to 2 bit binary
    		BitA = ReadBit(QA);
    		PosNoWrap = (ReadBit(QB) ^ BitA) | (BitA << 1);
    
    		// Diff between expected position based on average of two prev deltas
    		// and position with no wraps.  (Keep as X2 to avoid division by 2)
    
    		DiffX2 = 2 * (Pos - PosNoWrap);	// + (Change2+Change1);
    
    		// Calc quadrature wraparounds to bring Diff nearest zero
    		// offset by 128 wraps to avoid requiring floor()
    		wraps = ((DiffX2 + 1028) >> 3) - 128;
    
    		// factor in the quadrature wraparounds
    		NewPos = PosNoWrap + (wraps << 2);
    
    		Change2 = Change1;
    		Change1 = NewPos - Pos;
    		Pos = NewPos;
    
    		if (ReadBit(1048))		// is X1 selected?
    			Factor = .5;
    		else if (ReadBit(1046))	// is X10 selected?
    			Factor = 5;
    		else if (ReadBit(1045))	// is X100 selected?
    			Factor = 50.;
    
    
    		if (ReadBit(1052))		// is x selected?
    			Axis = 0;
    		else if (ReadBit(1055))	// is y selected?
    			Axis = 1;
    		else if (ReadBit(1053))	// is z selected?
    			Axis = 2;
    		else if (ReadBit(1051))	// is a selected?
    			Axis = 4;
    			
    		else					// ignore encoder
    			Change1 = 0;


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


Page 1 of 2 12 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

4th Axis With Argon Drive

4th Axis With Argon Drive

4th Axis With Argon Drive