Closed loop feedback to glass linear encoders


Page 1 of 2 12 LastLast
Results 1 to 12 of 13

Thread: Closed loop feedback to glass linear encoders

  1. #1
    *Registered User* men8ifr's Avatar
    Join Date
    Oct 2018
    Posts
    58
    Downloads
    0
    Uploads
    0

    Default Closed loop feedback to glass linear encoders

    All,

    1st I don't own any CNC parts yet but am planning to build a machine..

    One decision is software and BOB.

    Mach 4 it seems cannot support any closed loop feedback, it sounds like this is possible with a KFLOP board and dynamotion free software?

    Any other info? would anything else be needed?

    I was planning to use closed loop stepper drivers my plan was to have 2 closed loop paths - 1st the drivers to the rotary encoder and 2nd a glass scale to the kflop board.

    Has any-one done this? Is any other hardware required?

    Any other thought/input?

    Similar Threads:


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

    Default Re: Closed loop feedback to glass linear encoders

    Hi men8ifr,

    Our KMotionCNC software and KFLOP can do closed loop to Step/Dir drives and typically works well because the motors can be moved in a controlled manner even when the glass scales are not providing information due to system compliance/backlash/stiction/etc. But overall performance will depend on your mechanics. See here for more info.

    KFLOP by itself can support this but only has single ended encoder inputs. See here for more info.



  3. #3
    *Registered User* men8ifr's Avatar
    Join Date
    Oct 2018
    Posts
    58
    Downloads
    0
    Uploads
    0

    Default Re: Closed loop feedback to glass linear encoders

    Hi Tom, what is the speed limit in terms of reading from glass scales, if I had 1um scales which I assume would work? At 3000mm/min that's 50mm/sec and in 50mm there would be 50 X 1000 = 50,000 reads /sec but if your board sampled at 50kb /sec it would only 'see' the marks not gaps so I think it would need to sample at 3x 50kb/s 150kb/s per axis... This is obviously asking a lot, max possible resolution at max possible speed but I wanted to see if it is plausible? Feel free to comment on any experience of 1um scales.



  4. #4
    *Registered User* men8ifr's Avatar
    Join Date
    Oct 2018
    Posts
    58
    Downloads
    0
    Uploads
    0

    Default Re: Closed loop feedback to glass linear encoders

    And I guess I need to check 1um scales use quadrature the same as 5um scales... Maybe the resolution is due to more than 4x sampling which wouldn't work..



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

    Default Re: Closed loop feedback to glass linear encoders

    Hi men8ifr,

    1um resolution shouldn’t be a problem. KFLOP has hardware encoder Inputs that can count well over 1 million quadrature counts/sec. The max speed would be 1m/s or 60,000mm/min. KFLOP will sample the measured position every 90us and perform the Servo calculations.

    HTH



  6. #6
    Registered
    Join Date
    Dec 2012
    Location
    Norway
    Posts
    313
    Downloads
    0
    Uploads
    0

    Default Re: Closed loop feedback to glass linear encoders

    I'm also planning to use glass scales on my stepper driven converted mill. Just to make sure I have understood this correctly, when I have 1/8th microstepping, normal C7 ballscrews and 1um glass scales, Input channel 0 should have a gain of 0.3203 (I have found I need to set steps/inch to 8135)? What will happen if I lose steps more than max error? Will movement stop? Before I do any tuning, I just want to make sure I can detect missed steps and stop movement, so is the configuration in this picture correct?

    Closed loop feedback to glass linear encoders-configuration-jpg

    Br,
    Stig



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

    Default Re: Closed loop feedback to glass linear encoders

    Hi Stig,

    Yes that all seems correct. But you might want a couple more digits of precision on the input gain.



  8. #8
    Registered
    Join Date
    Dec 2012
    Location
    Norway
    Posts
    313
    Downloads
    0
    Uploads
    0

    Default Re: Closed loop feedback to glass linear encoders

    Something is not quite right with my setup... :-)

    Either my gain is way off or the system doesn't detect the pulses from the linear scale. Is there any way I can test if KFLOP detects the data from the scales?

    Attached are my init-file and data from a step test.

    This is how it looks when I try a step test.
    Closed loop feedback to glass linear encoders-screendump-jpg

    Attached Files Attached Files


  9. #9
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    326
    Downloads
    0
    Uploads
    0

    Default Re: Closed loop feedback to glass linear encoders

    If you look at the Axis screen within KMotion, the Position column should display the encoder counts.
    Provided everything is wired correctly, the counts should change with everything powered up and the encoders moved. Nothing needs to be configured to check the encoders are working. The relevant channel should increase/decrease (I.e. if the encoder is connected to encoder channel 0, then on the axis screen Position #0 should change). If you then configure the KFlop to map an encoder to a different channel, then a different channel will count (I.e. if you map encoder channel #0 to say axis #3, then Position #3 would show the count)


    I personally would not use step moves on a stepper system, as the steppers are likely to just stall and give no meaningful data. Step moves are mostly for testing Servo systems to see how they react to sudden moves.
    Stick with using Move, and adjusting the figures to suit, as they'll give far more meaningful data for tuning.



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

    Default Re: Closed loop feedback to glass linear encoders

    Hi Stig,

    Everything seems to be working correctly but the motor is stalling when the speed reaches ~27000 steps/sec (~3.5 ips = 210ipm)

    Here is an error plot. It stalls when the oscillation goes beyond a full step (8 microsteps)

    Closed loop feedback to glass linear encoders-stall-png

    It isn't clear whether the feedback is causing the instability or not. You might try an open loop move to see what speed your system is capable of. Or reduced 'I' Gain



  11. #11
    Registered
    Join Date
    Dec 2012
    Location
    Norway
    Posts
    313
    Downloads
    0
    Uploads
    0

    Default Re: Closed loop feedback to glass linear encoders

    Hi, Tom.

    Thank you.

    It was the I-gain which caused it. When I set it to "0", I could move even faster without any problems.

    Another problem is that every time I start up KmotionCNC, Y-axis (the one with the enabled linear scale) is disabled. Even if I try to re-init the KFLOP, Y stays disabled. It works when I try a Move in KMotion. Any idea what could cause this?

    Edit: I found the issue with the disabled axis... I needed to EnableAxisDest(1,ch1->Position) instead of EnableAxisDest(1,0). Live and learn... :-)

    Br,
    Stig

    Last edited by Stigoe; 11-17-2018 at 09:21 AM.


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

    Default Re: Closed loop feedback to glass linear encoders

    Hi Stig,

    It was the I-gain which caused it. When I set it to "0", I could move even faster without any problems.
    You forgot to tell us your filter settings. You will need some I gain in order for corrections to be made. With proper tuning it may be possible to make the system more stable rather than less stable.



    I needed to EnableAxisDest(1,ch1->Position) instead of EnableAxisDest(1,0)
    Yes setting the target destination to zero when the current position is far from zero will generate an immediatly large following error.

    HTH



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

Closed loop feedback to glass linear encoders

Closed loop feedback to glass linear encoders