Adding a 4th axis and have a few questions... - Page 3


Page 3 of 5 FirstFirst 12345 LastLast
Results 25 to 36 of 49

Thread: Adding a 4th axis and have a few questions...

  1. #25
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    314
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Hi Tom, I switched to 2nd order low pass and doubled I gain and I max limit and got maybe 25% less error. I tried even higher gain and limit but was getting more oscillation when doing a step movement and got nervous. Decided this was a good balance. I think the tuning is plenty accurate for my needs now.

    Got some good news and bad news about the brake solenoid and switches. The solenoid works great with Konnect controlling it without any extra relays. This 4th axis has two pressure switches to confirm brake is fully on or fully off, and also a home switch. I fed all the switches 5v and then sent the other ends into konnect inputs. All the inputs work when on, but when off they are floating on and off. I guess they are picking up voltage from being inside the same conduit as the servo power wires. What should I do here? Can I use resistors to ground to hold them low until they are switched high? If so what resistance should i use?

    Ill post a video of it making a part when i get it all done



  2. #26
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2920
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    I fed all the switches 5v and then sent the other ends into konnect inputs. All the inputs work when on, but when off they are floating on and off. I guess they are picking up voltage from being inside the same conduit as the servo power wires. What should I do here? Can I use resistors to ground to hold them low until they are switched high? If so what resistance should i use?
    I'm surprised there is enough noise to turn on the Konnect Optos. But the input impedance is pretty high at 4K ohms. Resistors in parallel with the optos should help. A 220 Ohm resistor should attenuate the noise by a factor of more than 20X and at 5V would draw:

    I = V/R = 5/220 = 23ma

    I assume this should be no problem for your switches. The resistor would dissipate power of:

    P = V x I = 5V x 23ma = 114mw (1/8th Watt resistor should work).

    HTH
    Regards



  3. #27
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    314
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Tom the conduit is like 25 feet long and wires are not shielded so not a good situation for noise. I found some 300 ohm resistors and added them in and its working great. My home signal isnt working but i can troubleshoot that later, probably something simple.

    So im back to the issue now of clamping again like we were discussing in the beginning of this thread. My motor doesnt seem to drift at all with axis disabled. So im wondering if Ill be ok to just limit the DAC output when clamped. So I could use a code something like this:

    To clamp:

    ch3->MaxOutput=1; // disable 4th axis output
    SetBit(53); // Turn on brake
    while (!ReadBit(1052)) WaitNextTimeSlice(); // wait for conformation signal

    To unclamp:

    ClearBit(53); // Turn off brake
    while (!ReadBit(1053)) WaitNextTimeSlice(); // wait for conformation signal
    ch3->MaxOutput=2000; // enable 4th axis output

    Can i get by with something as easy as this or does the axis or drive or both really need to be disabled? Ill set it up with M codes for now and maybe try and get it to detect motion automatically in the future when i get more time.



  4. #28
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2920
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Hi mmurray70,

    I don't know if you are lucky something simple may work. The risk is that either the servo and brake overlap in time and they fight, or they don't overlap and there is some drift in the meantime.

    I think you would be better off disabling and enabling the axis rather than playing with the MaxOutput. Setting the MaxOutput to 0 or 1 would force the DAC to zero, but with it being enabled the desired output might go to a large value so that as soon the MaxOutput is set to a large value the output instantly goes to the large value and the axis jumps.

    Here are some thoughts:

    While clamping you might set the I Gain to zero. This should basically freeze the Output at whatever offset is required to hold still. And any small induced error shouldn't cause the Output to ramp to a large value.

    Because the Brake takes some time to engage, after turning on the brake you might delay some fixed time or wait for the confirmation signal before disabling the axis. My guess would be that it might take 50ms for the brake to engage.

    I think unclamping might be simpler and less critical. I would think it would be ok to unclamp, possibly drift, then enable/resync to wherever the axis is, then move to wherever you need to go from there.

    You might write a C Program to record the Destination + Position while clamping and unclamping to observe any issues.

    HTH,
    Regards



  5. #29
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    314
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    I decided to try the simple code above, but also set I gain to zero as you recommended. I set it up as M codes and it works perfectly! Ran a little test program with an X move and back, unclamp, A axis move and back, clamp and repeat and it ran great! I monitored torque output with the DMM software and its at like +-1% when clamped.

    I just spent the last couple hours trying to get it to unclamp automatically from my forever loop but not much luck. Any suggestion how I might detect the start of an A axis move and then stop it right away, before it really gets anywhere? I tried using checkdone(3) and also lastfollowingerror to detect movement then did a stopcoordinatedmotion but it seems to get too far ahead of itself before stopping to get it to work well. I did get it work a little but its not very smooth. Jumps and sometimes gives following limit error.



  6. #30
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    314
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Forget about trying to unclamp it automatically. I have my post setup now to add in the M codes and its working really well.

    I did notice one little issue in Kmotioncnc, seems like if the position is very high, like over 4000 degrees it wont allow you to zero the axis sometimes. And occasionally when zeroing, it jumped to another large number instead of going to zero. Anybody else every notice this? Any idea what could cause it Tom?



  7. #31
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2920
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Hi mmurray70,

    What exactly do you mean by: "zero the axis" ?

    I haven't heard of any such issue.

    Regards



  8. #32
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    314
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Im talking about the the zero button next to the DRO in kmotioncnc. When you push it sometimes it will not set the dro to 0.000



  9. #33
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2920
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Hi mmurray70,

    Are your DROs displaying encoder position or commanded positions? What color are the DROs?

    Regards



  10. #34
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    314
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Dros display commanded position, they are green. I figured out exactly what conditions cause it. If the axis position is greater than 2147 degrees it does not save the right value in the fixture table to zero the DRO.

    For example, if I move to G53 A1800 and hit zero it works perfectly and sets the right fixture offset to zero the DRO.

    If I move to G53 A2200 or greater it stores an offset of -2147 for some reason. Making my DRO read 4347.

    If i move even higher like G53 A4000 it still sets -2147 in the fixture offset which is not right. If i move back inside 2147 it works properly again.

    Hopefully its an easy fix. No hurry as I can use everything as it is anyway. Also its the same problem in the negative direction.

    Attached Thumbnails Attached Thumbnails Adding a 4th axis and have a few questions...-error-jpg  


  11. #35
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2920
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Hi mmurray70,

    Thanks for figuring that out. You are correct it is a bug having to do with rounding large value offsets to 6 decimals causing an integer overflow.

    Here is a patch compatible with V4.34k that should fix that issue:
    http://dynomotion.com/Software/Patch...KMotionCNC.exe

    Please let us know if it works for you when you get a chance.

    Regards



  12. #36
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    314
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Hi Tom, I tried the new patch and it works great now. Thanks again!

    I had a hard time downloading 4.34K. Its not on the download page. I copied an old link and changed the letter to K and it worked.



Page 3 of 5 FirstFirst 12345 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

Adding a 4th axis and have a few questions...

Adding a 4th axis and have a few questions...