584,805 active members*
5,059 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 23
  1. #1
    Join Date
    Jul 2018
    Posts
    47

    DAC Spindle Speed Feedback

    Hi Tom

    Hopefully the last Question regarding this build as almost everything is functioning perfectly

    i have configured my VFD servo Drive as an axis with DAC 0-10v control and is all working through Kanalog board and direction is controlled through a latching relay

    The Machine spindle is belt driven from the servo motor and has a disk on the spindle with 50 holes around it , onto which is mounted a slotted opto switch (RS stock Number 306-061) , the output is an npn photo transistor .
    Is it possible to use this for speed measurement for the spindle ? and could you point me to an article to set up the speed measuring function

    Regards

    Sean

  2. #2
    Join Date
    May 2006
    Posts
    4043

    Re: DAC Spindle Speed Feedback

    Hi Sean,

    KFLOP encoder inputs require a quadrature signal so it can track direction and therefore position. If you could mount another opto sensor shifted 1/4 of the hole pitch then it could be used.

    What is the max RPM you will be using? If not too fast you may be able to count hole transitions in software.

    Otherwise an RC (resistor - capacitor) circuit can be used to generate a phase shifted version of the pulses to create quadrature. See this Thread.
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Jul 2018
    Posts
    47

    Re: DAC Spindle Speed Feedback

    Tom

    Thank you for your reply , after a few hours searching i found a thread that mentioned using an RC delay to the signal. it kind of worked but the delayed signal was more rounded that the original pulse. if you can imagine bottom of the signals starting at the same time but the tops separated by 5us.

    I have now made a new bracket to mount two opto sensors side by side , which will be a better solution i think

    Max speed of the spindle is 3750rpm @ 10v .

    regards

    Sean

  4. #4
    Join Date
    May 2006
    Posts
    4043

    Re: DAC Spindle Speed Feedback

    Hi Sean,

    Two optos should be the best solution. Note they don't need to necessarily be side-by-side. For example they might be 10.25 hole pitches apart.
    TK
    http://dynomotion.com

  5. #5
    Join Date
    Jul 2018
    Posts
    47

    Re: DAC Spindle Speed Feedback

    Tom

    Managed to find two opto sensors in a draw with built in triggers and 10K resistors

    i have added the encoder trace before connecting , not sure 4.8v is ok into the kanalog encoder connections ? (seems ok on my axis inputs )

    i have no idea what the settings for my spindle should be , i have added config screen and step response output screens

    spindle motor is 7100rpm @11.2v for some reason that is what comes out of DAC0 at max rpm
    spindle is 3750rpm
    encoder disk has 50 holes




    sean

  6. #6
    Join Date
    May 2006
    Posts
    4043

    Re: DAC Spindle Speed Feedback

    not sure 4.8v is ok into the kanalog encoder connections ? (seems ok on my axis inputs )
    it is ok


    i have no idea what the settings for my spindle should be , i have added config screen and step response output screens
    encoder input gain seems to be set near zero. I'd put it at 1. Is the Position changing? There should be 200 counts/rev.

    You should be able to operate closed loop for accurate RPM control. FF is probably too high set to zero for now.

    Try a move of 10 revs (2000 counts). Vel = 2000 counts/sec = 10revs/sec = 600 RPM Jerk 20000 counts/sec (apply Acceleration in 0.1 seconds)

    Adjust PD gains to follow trajectory reasonably.

    spindle motor is 7100rpm @11.2v for some reason that is what comes out of DAC0 at max rpm
    Not sure what you mean by this. It should not be possible for the DACs to go that much over 10V.

    HTH
    TK
    http://dynomotion.com

  7. #7
    Join Date
    Jul 2018
    Posts
    47

    Re: DAC Spindle Speed Feedback

    Tom

    if i put FF = 0 nothing moves , at 2047 it gives me full speed

    ground seems to be floating at 1.2v between the Kanalog and VFD ?


    Sean

  8. #8
    Join Date
    May 2006
    Posts
    4043

    Re: DAC Spindle Speed Feedback

    Hi Sean,

    if i put FF = 0 nothing moves , at 2047 it gives me full speed
    Please answer my questions and do what I suggested.


    ground seems to be floating at 1.2v between the Kanalog and VFD ?
    Do you have a GND connection between Kanalog and the VFD?
    TK
    http://dynomotion.com

  9. #9
    Join Date
    Jul 2018
    Posts
    47

    Re: DAC Spindle Speed Feedback

    Quote Originally Posted by TomKerekes View Post
    encoder input gain seems to be set near zero. I'd put it at 1. Is the Position changing? There should be 200 counts/rev.
    encoder input set to 1 ( where would i see position change ?)

    Quote Originally Posted by TomKerekes View Post
    You should be able to operate closed loop for accurate RPM control. FF is probably too high set to zero for now.
    i have set the config screen to encoder input and FF =0

    Quote Originally Posted by TomKerekes View Post
    Try a move of 10 revs (2000 counts). Vel = 2000 counts/sec = 10revs/sec = 600 RPM Jerk 20000 counts/sec (apply Acceleration in 0.1 seconds)
    see plots , no movement

    Quote Originally Posted by TomKerekes View Post
    Adjust PD gains to follow trajectory reasonably.
    any number in P motor just runs once move is pressed (Edit in the I box not P )

  10. #10
    Join Date
    May 2006
    Posts
    4043

    Re: DAC Spindle Speed Feedback

    Hi Sean,

    where would i see position change ?
    On the KMotion.exe | Axis Screen


    see plots , no movement
    With PID and FF gains zero output will remain at zero and be as expected.


    any number in P motor just runs once move is pressed
    Where's the plot? That would show what is happening. A common problem is to have something reversed resulting in positive feedback and runaway. If the motor moves away from the target instead of towards the target the error and output will increase forever. In this case try reversing the sign of the input or output gain. Otherwise maybe the encoder position isn't changing at all?
    TK
    http://dynomotion.com

  11. #11
    Join Date
    Jul 2018
    Posts
    47

    Re: DAC Spindle Speed Feedback

    Quote Originally Posted by TomKerekes View Post

    On the KMotion.exe | Axis Screen
    Cannot see any axis move should it be in the lower the S box ? . i can see the encoder pulses working in encoder 3 A/B in the digital I/O screen

    Quote Originally Posted by TomKerekes View Post
    Where's the plot? That would show what is happening. A common problem is to have something reversed resulting in positive feedback and runaway. If the motor moves away from the target instead of towards the target the error and output will increase forever. In this case try reversing the sign of the input or output gain. Otherwise maybe the encoder position isn't changing at all?
    changed the input gain to -1 trace attached

  12. #12
    Join Date
    Jul 2018
    Posts
    47

    Re: DAC Spindle Speed Feedback

    Hi Tom

    1 thing i have noticed when doing the step/response is the DAC voltage goes +10v then goes - 10v and stays there until i disable the axis ??

  13. #13
    Join Date
    May 2006
    Posts
    4043

    Re: DAC Spindle Speed Feedback

    Hi Sean?

    Cannot see any axis move should it be in the lower the S box ?
    ?? No the KMotion.exe Axis Screen

    Attachment 466898

    It would have been helpful to describe what physically happened and post the raw data. Also include the Filter and Configuration Screens.

    A is crazy low so the commanded position barely moves several counts.

    I Gain is crazy high so even with tiny error the Output ramps a lot quickly.

    Regardless of being configured oddly the result is very strange. See in the plot the output curves up to ~1200 counts over about a full second. This should be about 6V not the 10V you mentioned. But its strange the spindle does nothing at all while being commanded over 50%. Then the spindle suddenly jumps about 50 counts (1/4 rev) and stops. Because of the low A we should have only moved about 2 counts so this is a huge overshoot. The Output immediately slams to 100% full reverse. Yet the encoder continues to show weird "steppy" positive motion of approximately 1/4 turns.

    Please verify the encoder is counting properly. You might also command DAC commands from the Console Screen to verify the VFD is behaving properly. ie it can be commanded slowly, reversed, fast, etc.

    BTW are the encoder signals connected to Kanalog differential? Or are you leaving inputs floating?
    TK
    http://dynomotion.com

  14. #14
    Join Date
    Jul 2018
    Posts
    47

    Re: DAC Spindle Speed Feedback

    Quote Originally Posted by TomKerekes View Post
    No the KMotion.exe Axis Screen
    yes the position is moving looked like missed counts or something weird , checked factory installed holed disk and was seeing +/- 0.25mm runnout have remounted it today and not missing hole edges .
    4 of the holes at 90degs are actually slots for indexing i guess so was picking up these and some holes

    Quote Originally Posted by TomKerekes View Post
    It would have been helpful to describe what physically happened and post the raw data. Also include the Filter and Configuration Screens.

    A is crazy low so the commanded position barely moves several counts.

    I Gain is crazy high so even with tiny error the Output ramps a lot quickly.

    Regardless of being configured oddly the result is very strange. See in the plot the output curves up to ~1200 counts over about a full second. This should be about 6V not the 10V you mentioned. But its strange the spindle does nothing at all while being commanded over 50%. Then the spindle suddenly jumps about 50 counts (1/4 rev) and stops. Because of the low A we should have only moved about 2 counts so this is a huge overshoot. The Output immediately slams to 100% full reverse. Yet the encoder continues to show weird "steppy" positive motion of approximately 1/4 turns.
    I have now attached test 4 plots and raw data after making sure encoder is counting properly , the output goes into reverse but spindle doesn't reverse as anything below 0v is stopped so the motor just slows down

    Quote Originally Posted by TomKerekes View Post
    You might also command DAC commands from the Console Screen to verify the VFD is behaving properly. ie it can be commanded slowly, reversed, fast, etc.
    DAC Commands in console screen work ,after i realised have to disable drive from step/response screen DAC0= -51 is the slowest i can get and works all the way up to DAC0= - 2047.

    my VFD only accepts + 0-10 v i am controlling direction with bit 154 and 155 into a latching relay . (is there a way to have the step/response screen move not to go negative voltage)

    Quote Originally Posted by TomKerekes View Post
    BTW are the encoder signals connected to Kanalog differential? Or are you leaving inputs floating?
    I thought this maybe the problem single ended into the differential on the kanalog board (before i noticed the hole problem ) so i rewired the encoder into pin 13 and 14 on the KFLOP JP7

    i hope this makes it clearer as to what is happening

    and thanks again for your continued patience

    Sean

  15. #15
    Join Date
    May 2006
    Posts
    4043

    Re: DAC Spindle Speed Feedback

    Hi Sean,

    Thanks for all the info.

    my VFD only accepts + 0-10 v i am controlling direction with bit 154 and 155 into a latching relay . (is there a way to have the step/response screen move not to go negative voltage)
    Not easily. You would need to set the Axis to No Output and then write the ch3->Output to the DAC yourself with a C Program while taking the absolute value and controlling the relays and so forth. Its probably not worth the trouble just to get the Step Response Diagnostic to work.

    I see the input gain magnitude is set for 1/50. I would probably have left it at 1 (hole transitions) or 1/200 to be Revs. But that's ok as long as we know 1 unit is 1/4 rev.

    A Velocity setting of 2000/4 = 500 revs/sec = 30,000 RPM is way too high. In the test the trajectory's Velocity is only reaching 320/4 = 80revs/sec = 4800RPM before it needs to start stopping (based on Acceleration and move size).

    Also Acceleration is too high as you can see from the plot the red line can't keep up with the blue line even with the Output pegged at max 10V.

    This isn't telling us anything about the tuning because the gains are set so high the Output is just slamming to both rails.

    So please try a smaller move (10 revs = 40 units) at lower A and V. Remove FF. I'd use P gain rather than I gain..
    TK
    http://dynomotion.com

  16. #16
    Join Date
    Jul 2018
    Posts
    47

    Re: DAC Spindle Speed Feedback

    Hi Tom
    Quote Originally Posted by TomKerekes View Post
    I see the input gain magnitude is set for 1/50. I would probably have left it at 1 (hole transitions) or 1/200 to be Revs. But that's ok as long as we know 1 unit is 1/4 rev.
    The plate has 50 holes in so i set input gain at 1/50

    Quote Originally Posted by TomKerekes View Post
    A Velocity setting of 2000/4 = 500 revs/sec = 30,000 RPM is way too high. In the test the trajectory's Velocity is only reaching 320/4 = 80revs/sec = 4800RPM before it needs to start stopping (based on Acceleration and move size).
    Max Spindle speed is 3750 , so that would be a max V =250 , so i should use something smaller than this ie 200

    Quote Originally Posted by TomKerekes View Post
    Also Acceleration is too high as you can see from the plot the red line can't keep up with the blue line even with the Output pegged at max 10V.
    When i set the A Lower the spindle spins up slowly - stops - then spins up faster but is outside of the plot area

    Quote Originally Posted by TomKerekes View Post
    So please try a smaller move (10 revs = 40 units) at lower A and V. Remove FF. I'd use P gain rather than I gain..
    If i use P gain rather than I gain the motor doesn't move ?

  17. #17
    Join Date
    May 2006
    Posts
    4043

    Re: DAC Spindle Speed Feedback

    Hi Sean,

    The plate has 50 holes in so i set input gain at 1/50
    Each hole creates a quadrature cycle so creates 4 counts.


    When i set the A Lower the spindle spins up slowly - stops - then spins up faster but is outside of the plot area
    Unfortunately the plot is limited to 3.5 seconds. Most systems aren't that slow to respond. Maybe your still using I gain and it is unstable (slowly increasing, overshooting, then undershooting).


    If i use P gain rather than I gain the motor doesn't move ?
    It should move. Maybe it is too low value. Post a plot to see how much output there is. Because your count units are so large (1/4 rev = 1 count) with an error of a full rev the error will only be 4. So with a gain of 1 this will only be 4 DAC counts.
    TK
    http://dynomotion.com

  18. #18
    Join Date
    Jul 2018
    Posts
    47

    Re: DAC Spindle Speed Feedback

    Tom

    you were correct i was using to small a P gain

    new plot attached


    Sean

  19. #19
    Join Date
    May 2006
    Posts
    4043

    Re: DAC Spindle Speed Feedback

    Hi Sean,

    That seems reasonable albeit so slow to respond. What kind of VFD is this? Are there any settings to speed it up?

    Anyway it may work. If you Jog from the console does it go to proper speed and maintain speed without variation?

    Jog3=66.67

    Should be 1000RPM
    TK
    http://dynomotion.com

  20. #20
    Join Date
    Jul 2018
    Posts
    47

    Re: DAC Spindle Speed Feedback

    Tom

    JOG3=66.66 click Send seems like a delay of a second then ramps up to approx. 1500 rpm then down to 800 rpm over another second then stabilizes at 1000rpm

    VFD is a Lenze 534 speed controller

    according to the manual i have found online acceleration time is 1-10 S which is really slow unless i am missing something

    sean

Page 1 of 2 12

Similar Threads

  1. Inverter Speed Reference & Encoder Feedback
    By lukebarber in forum Tormach Personal CNC Mill
    Replies: 0
    Last Post: 01-17-2019, 12:18 AM
  2. Mazak QT10 missed the feedback of speed spildle
    By gorkthor in forum Mazak, Mitsubishi, Mazatrol
    Replies: 0
    Last Post: 10-05-2018, 01:49 PM
  3. Spindle Interference on Kanalog DAC ground causing Kflop Step issues?
    By slimneill in forum Dynomotion/Kflop/Kanalog
    Replies: 8
    Last Post: 01-06-2016, 01:41 AM
  4. Replies: 1
    Last Post: 08-02-2013, 10:07 PM
  5. AC servo run at constant speed without feedback?
    By jsheerin in forum Servo Motors / Drives
    Replies: 12
    Last Post: 03-10-2010, 02:25 AM

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
  •