545,780 active members*
2,293 visitors online*
Register for free
Login
Results 1 to 20 of 20
  1. #1

    Join Date
    Jul 2018
    Posts
    47

    KFLOP Stepper Motor Encoder Set up

    Hi Tom

    After getting my Kstep/Kflop working fine a few months ago with external jog buttons and being away with work for 3 months in the US . I have decided to get the Kanalog connected after a few hiccups with which bits the step/dir controls are through JP5/JP26 connectors it is all working now as it was before adding the Kanalog

    i have now added a 200 PPR optical encoder to Channel 0 but i am not sure how to set up the counts , i know it is the channel input gain setting and i have read posts that show the command and position traces on top of each other but i cant seem to achieve this . see attached picture

    Also i cannot untick the output boxes on the digital I/O screen for bit 2 and 3 ( i have probably set it as an output somewhere by mistake )

    Regards

    Sean
    Attached Thumbnails Attached Thumbnails KFLOP encoder setup2.jpg  

  2. #2
    Junior Member
    Join Date
    May 2006
    Posts
    3833

    Re: KFLOP Stepper Motor Encoder Set up

    Hi Sean,

    It looks like the plots would overlay if you zeroed both the command and encoder position before the move so they both started at zero.

    I think you have

    KStepPresent=TRUE; // enable KSTEP input multiplexing

    still set in your INIT Program which tells KFLOP to use bits 2 and 3 to control the multiplexing of the 16 KStep Opto inputs. Remove that and re-boot KFLOP.

    HTH
    TK
    http://dynomotion.com

  3. #3

    Join Date
    Jul 2018
    Posts
    47

    Re: KFLOP Stepper Motor Encoder Set up

    Hi Tom

    Thank you for your speedy reply , zeroed the plots and overlayed perfectly

    i have commented out the ,

    KStepPresent=TRUE; // enable KSTEP input multiplexing

    saved the file and rebooted

    But channel 2 and 3 are still ticked ,if i click on them the tick disappears for a millisecond then re-enables as an output

    Thank you so much for your help


    Sean

  4. #4
    Junior Member
    Join Date
    May 2006
    Posts
    3833

    Re: KFLOP Stepper Motor Encoder Set up

    Hi Sean,

    Maybe you Flashed KStepPresent into KFLOP. Reset KFLOP to its default state by re-Flashing New Version.

    HTH
    TK
    http://dynomotion.com

  5. #5

    Join Date
    Jul 2018
    Posts
    47

    Re: KFLOP Stepper Motor Encoder Set up

    Hi Tom

    Thank you ,that was the problem have re-flashed new version and can no set 2 and 3 as inputs

    I have attached encoder output trace from channel 0 (x axis) if you wouldn't mind having a look to see if i'm on the right track as i'm not 100% sure what i am looking at :-)


    Sean

  6. #6
    Member
    Join Date
    Jul 2021
    Posts
    3

    Re: KFLOP Stepper Motor Encoder Set up

    Join the Illuminati official of wealth and powers fame and protection and get rich from generations to generations. interested contact us on WhatsApp +14305583146

  7. #7
    Member
    Join Date
    Jul 2021
    Posts
    3

    Join the illuminati brotherhood secret society

    Join the Illuminati official of wealth and powers fame and protection and get rich from generations to generations. interested contact us on WhatsApp +14305583146

  8. #8
    Member
    Join Date
    Jul 2021
    Posts
    3

    Join the illuminati brotherhood secret society USA

    Join the Illuminati official of wealth and powers fame and protection and get rich from generations to generations. interested contact us on WhatsApp +14305583146

  9. #9

    Join Date
    Jul 2018
    Posts
    47

    Re: KFLOP Stepper Motor Encoder Set up

    Hi Tom

    this topic seems to have been hijacked with spam

    I have added error v output plot

    sean



    Quote Originally Posted by sean69_uk View Post
    Hi Tom

    Thank you ,that was the problem have re-flashed new version and can no set 2 and 3 as inputs

    I have attached encoder output trace from channel 0 (x axis) if you wouldn't mind having a look to see if i'm on the right track as i'm not 100% sure what i am looking at :-)


    Sean

  10. #10
    Junior Member
    Join Date
    May 2006
    Posts
    3833

    Re: KFLOP Stepper Motor Encoder Set up

    Hi Sean,

    See how the error oscillates about 25 steps peak-peak? I don't think it is caused by the closed loop feedback. You might do an open loop move to verify that (set PID gains to zero). We don't know anything about your machine or how it is constructed or what the resolution is. Looks like there are about 16 oscillations. If you have a lead screw does it rotate about 16 times for that size of move?

    Note Alt-PrintScreen will capture a single window.

    Its good to attach the raw data so we can re-plot it and zoom in to see things. You may need to zip it to reduce the size so cnczone will allow it.
    TK
    http://dynomotion.com

  11. #11

    Join Date
    Jul 2018
    Posts
    47

    Re: KFLOP Stepper Motor Encoder Set up

    Hi Tom

    Sorry for Delay i'm still on central time

    My machine is a retro fit to a Boxford VMC
    Stepper motors are STC HY200-2232-190 200 Step hybrid running on 48v Supply
    16 T pulley on motor to a 20T pulley on a 2.5mm pitch Ball Screw
    200 ppr optical encoder mounted to motor shaft with channel A connected to A0+ and channel B to B0+ on kanalog

    Table moves approximately 35mm during the test 14 turns of ball screw , hard to measure accurately as its all enclosed

    hope this helps

    SEAN

  12. #12
    Junior Member
    Join Date
    May 2006
    Posts
    3833

    Re: KFLOP Stepper Motor Encoder Set up

    Hi Sean,

    Sorry for Delay i'm still on central time
    No rush from our end


    Stepper motors are STC HY200-2232-190 200 Step hybrid running on 48v Supply
    16 T pulley on motor to a 20T pulley on a 2.5mm pitch Ball Screw
    If I did the math right that comes out to 3200 steps/motor rev and 1600 steps/mm (40640 steps/inch)


    So the move of 50000 would be 50000/3200 = 15.625 motor revs which matches the number of oscillations. Strange to have 25 micro steps of error when measured at the motor shaft. If we were measuring at the lead screw or with linear scales at the stage then an off center pulley or lead screw wobble could be the cause. But this is measured right at the motor shaft. A poorly mounted encoder disk (off center) can cause something like this.

    This corresponds to +/-12 steps / 1600 step/mm = +/- 7.5um

    You might try moving very slowly or to specific motor rev angles and stopping to see if the error is purely a function of motor angle as opposed to time.

    channel A connected to A0+ and channel B to B0+ on kanalog
    I'm surprised this works. Connecting to one differential signal only and leaving the other floating is normally unreliable. But loosing counts and such would show up differently than an oscillation like this.
    TK
    http://dynomotion.com

  13. #13

    Join Date
    Jul 2018
    Posts
    47

    Re: KFLOP Stepper Motor Encoder Set up

    Hi Tom

    Thanks for the quick reply , i will re check the encoder wheel as its one of the Broadcom ones where the wheel is tiny and not part of the assembly you have to use a setting tool to align the sensor housing .


    i did try connecting the A-B channels to A0+ and A0- firstly on the kanqlog but didn't get an output signal .it is a single-ended quadrature encoder as only has A and B channels

    Sean

  14. #14
    Junior Member
    Join Date
    May 2006
    Posts
    3833

    Re: KFLOP Stepper Motor Encoder Set up

    i did try connecting the A-B channels to A0+ and A0- firstly on the kanqlog but didn't get an output signal .it is a single-ended quadrature encoder as only has A and B channels
    You should add a differential driver such as this or connect to KFLOP's single ended inputs.
    TK
    http://dynomotion.com

  15. #15

    Join Date
    Jul 2018
    Posts
    47

    Re: KFLOP Stepper Motor Encoder Set up

    KFLOP's Single ended inputs on JP7 that is connected to the kanalong JP14 , break into the ribbon cable ?

    "JP1 converts 8 of the signals and connects them to Kflop I/O bits 0-7 (Kflop JP7 Pins 7-14) which are Kflop's 4 encoder A/B input channels"

  16. #16
    Junior Member
    Join Date
    May 2006
    Posts
    3833

    Re: KFLOP Stepper Motor Encoder Set up

    The encoder inputs can be moved from JP7 and JP5 to JP4 and JP6. See the MuxEncoders.c example.
    TK
    http://dynomotion.com

  17. #17

    Join Date
    Jul 2018
    Posts
    47

    Re: KFLOP Stepper Motor Encoder Set up

    Tom

    Couldn't see any wobble in encoder wheel so replaced the whole encoder , larger wheel diameter with 500ppr

    attached are screen shots and file , all settings the same except input gain changed to 1.6 from 4 so command and position traces align
    Attached Thumbnails Attached Thumbnails open loop error new encoder.png   open loop position command new encoder.png  
    Attached Files Attached Files

  18. #18
    Junior Member
    Join Date
    May 2006
    Posts
    3833

    Re: KFLOP Stepper Motor Encoder Set up

    Hi Sean,

    That looks good to me. I think its time to go closed loop to see if you can reduce the errors. Low Pass filter, I gain, and Feed Forward.
    TK
    http://dynomotion.com

  19. #19

    Join Date
    Jul 2018
    Posts
    47

    Re: KFLOP Stepper Motor Encoder Set up

    Thanks tom

    glad thats ok , because enabling the MUX for encoder inputs on JP4 and JP6 messed everything up and all the bits stayed high regardless

    Am i adjusting I gain to get output trace to match the command and position traces as attached picture

  20. #20
    Junior Member
    Join Date
    May 2006
    Posts
    3833

    Re: KFLOP Stepper Motor Encoder Set up

    Hi Sean,

    glad thats ok , because enabling the MUX for encoder inputs on JP4 and JP6 messed everything up and all the bits stayed high regardless
    That doesn't make sense. Maybe you were missing a GND or miss wired?



    Am i adjusting I gain to get output trace to match the command and position traces as attached picture
    No. The goal is make the error plot as close to zero as possible. Right now the position is lagging behind by about -30 counts while moving positive and +30 counts while moving negative. The output should be going to 30 steps to correct this. The Integrator works by looking at the error and based on the magnitude of the error and the magnitude of the I gain and ramps correction (output) based on their product. In your case the Integrator is correcting the error but ramping so slowly it has only corrected 2 steps of the needed 30 by the time the move is over. Then on the move back the error is +30 so the Integrator ramps negative but only gets back to zero by the time that move is over. The idea is to make the Output correct the error as quickly as possible without over-correcting and going unstable.
    TK
    http://dynomotion.com

Similar Threads

  1. Encoder for stepper motor
    By ssjantonio in forum Dynomotion/Kflop/Kanalog
    Replies: 51
    Last Post: 12-16-2016, 03:25 AM
  2. Kflop + stepper motor axis drifts
    By konstantinshr in forum Dynomotion/Kflop/Kanalog
    Replies: 12
    Last Post: 10-13-2016, 05:32 PM
  3. best Big stepper motor work with Kflop+Kstep?
    By mismis in forum Dynomotion/Kflop/Kanalog
    Replies: 3
    Last Post: 09-19-2012, 04:16 PM
  4. encoder for stepper motor
    By 15mgtar in forum Stepper Motors / Drives
    Replies: 0
    Last Post: 09-22-2009, 04:47 PM
  5. encoder-stepper motor
    By granado in forum Stepper Motors / Drives
    Replies: 2
    Last Post: 11-29-2004, 11:38 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
  •