Setting up KFlop + KStep closed loop stepper system


Results 1 to 19 of 19

Thread: Setting up KFlop + KStep closed loop stepper system

  1. #1
    Registered
    Join Date
    Jan 2008
    Location
    Finland
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default Setting up KFlop + KStep closed loop stepper system

    Hello everyone,

    A few months ago I bought a KFlop and Kstep combination attracted by the possibility to build a closed loop stepper system. My only earlier attempt in CNC was to use Mach3, but I found it not quite reliable enough. Tom was very helpful in answering my questions while I was taking the first steps on the road to set up my system. As his answers may help someone else as well, below the whole email chain:

    ----------
    2012/07/14 Eero Haahti:

    Hello Tom,

    Finally during my summer holidays I have had time to rebuild my router and start to study the KFlop/KStep boards. I guess the setting up is going ok. Going to try the open loop stepper system first before closing the loop.
    I have some odd behaviour when trying to flash the user memory with my settings. Following the help file it seems to start ok saying something approximately "Writing to Flash Memory". Then I get the following screens and after them I have to do a Flash recovery before KMotion can connect to the board again. I tried now three times and every time with the same result. Am I doing something wrong?

    The other question is about microstepping. Is KStep set to 16microstep/Step in the hardware. I don't see any mention or any jumper setting for microsteps. And following this should I set the KFlop Channel config to "Step Dir" or Microstep , and later with closed loop to "CL Step" or "CL Micro"?

    I haven't connected the board to my router yet... I wan't to be sure the settings are right first.

    All the best,

    Eero


    -------------
    2012/07/14 Tom Kerekes:

    Hi Eero,
    *
    I don't know why you are getting that Exception.* I just tied it with V4.29 and it works ok for me.* But there is no reason for you to Flash User Data and we do not recommend it.* It is simpler to initialize your settings each time with a C program.* Flashing User programs is usually only required if you are running stand alone without a PC to configure the board.
    *
    KSTEP is fixed at 16microsteps/step.* We don't see any benefit to reduce it to a lower setting.
    *
    When using KSTEP use "Step Dir" or "CL Step" modes.
    *
    Regards
    TK

    -------------

    2012/7/15 Haahti Eero:

    Thanks Tom for your quick reply even during weekend.

    I understood that flashing the settings was a secure way of having the starting setup always the same, but as I'm the only one using the machine I guess it doesn't make any difference and may even be a better practice.

    One more question for now - there will probably be many later on: KStep is fixed at 16 microsteps/step, but I'm using Step Dir output from KFlop. Does this mean that KFlop sends 200 steps/revolution to KStep to drive my steppers correctly? - or do I have to include these microsteps in my settings? I ask this because of the following:

    Following the help file I understand that when configuring KFlop one has to use inches not mm as unit. Am I right?
    I have a millimeter system (as most of Europe). If I understand, the "InvDistPerCycle" setting tells KFlop to send the right amount of steps to the KStep and the steppers to move the correct distance.
    All my lead screws have a pitch of 4mm. *1 inch travel translates to 6.35 revolution and one revolution being 50 full cycles results in *InvDistPerCycle = 6.35 x 50 =*317.5 (cycles/1"). Am I right?*
    Then in the beginning of my G-codes I include G21 (mm units) and after that I can comfortably use my mm distances. I tested my setup with these settings.
    A G-code:
    G90
    G21
    F5000
    G1 Y0
    G1 Y80
    G1 Y0
    M2
    should move the Y axis for 20 full revolutions (= 80 mm), but in reality it only moved slightly less then one full turn. It did return exactly to the same spot (G1 Y0).

    Obviously there is something I didn't get right.
    I'm sure there is some very simple explanation for this and I'm looking forward to your answer.

    Regards
    Eero

    P.S. I didn't test the setup with G20, but I guess that doesn't make any difference...

    -------------
    2012/07/16 Tom Kerekes:

    Hi Eero,
    *
    Yes invDistPerCycle is not used with Step/Dir Drives like KSTEP.* KSTEP does 16x microstepping so there is 3200 steps per revolution.* You will need to determine the resolution in counts per inch for your system based on any gear ratios and leadscrew pitch.* This should be entered in:
    *
    KMoiotnCNC | Tool Setup | Trajectory Planner | Axis Parametes | Counts per inch
    *
    Although the configuration setting for KMotionCNC are in inches the GCode can be in mm or inches depending on G20 or G21.
    *
    You can also set the max speeds and acceleration in units of inches and seconds in the Too Setup | Trajectory Planner Screen.
    *
    G0 moves perform independent axis motions and use the settings for the Axes Parameters in KFLOP.* Coordinated Motions uch as G1,G2,G3 us the trajectory planner settings.
    *
    It would be good if you asked these questions on the cnczone forum.
    *
    Regards
    TK

    Similar Threads:
    Attached Thumbnails Attached Thumbnails Setting up KFlop + KStep closed loop stepper system-user_flash_error_messages-jpg  


  2. #2
    Registered
    Join Date
    Jan 2008
    Location
    Finland
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default Steppers working, trying to close the loop

    Thanks Tom for your help. I got my steppers working. Very nice. And indeed as many people here have stated, much smoother and quieter then Mach3.

    Aiming to have a closed loop stepper system, I bought a set of linear glass scales (precision 5micron). If I have understood right this gives 200 quadrature-counts/mm.
    Steppers 200steps/rev with KSteps microsteps (x16) and a leadscrew pitch of 4mm/rev gives: (200 x 16)/4 steps/mm = 800 steps/mm from KFLop. This gives an input gain of 800/200 = 4

    Testing the signal from my glass scales with I = 0 (no correction) in the "Step response"-screen I get the following (see screens attached as well as my initiation file for the test). To start with I only tested the Y-axis (Ch1) and Z-axis (Ch2).

    With "move" button the axis should move the given distance and after a while return to the original position. With Z-axis this happens, but with Y-axis the original position is not quite reached. ?
    Other very odd thing is that from the readings of the encoders it seems that the axis is continuing to move on instead of returning, which is not what happens in reality. ?
    Is there something wrong with my connections?
    The scales give a standard TTL signal - the wiring: A and B to KFlop JP5, +5vdc, 0vdc (=KFlop Ground) and Reference signal (later to be used for homing).

    Regards,
    Eero

    Attached Thumbnails Attached Thumbnails Setting up KFlop + KStep closed loop stepper system-step_response_y-jpg   Setting up KFlop + KStep closed loop stepper system-step_response_z-jpg  
    Attached Files Attached Files


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

    Default

    Hi Eero,

    It looks like both encoders are not working correctly at all. My guess would be that only one of the A or B signals is connected rather than both. If one is left floating an encoder will count something like that as the disconnected wire will be capacitively coupled to the driven signal and always lag causing an intermittent count in one direction.

    Check the signals with a scope or voltmeter near KFLOP. When the encoder is moving very slowly both the A and B should be toggling high and low relative to ground. Low should be less than 0.4V and high should be more than 2.8V.

    Regards

    Regards
    TK http://dynomotion.com


  4. #4
    Registered
    Join Date
    Jan 2008
    Location
    Finland
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default Encoders working now...

    Thanks Tom,

    Indeed there was a problem with wiring. I corrected that and now all encoders seem to work ok.

    I attached below the new step response screens for X, Y, Z and A-axis. Could you give me some advice how to proceed...
    I believe there is a little backlash on all axis's. I don't know if I should enter some value to correct it first - or will KFlop correct it with the encoder feedack?
    The position seems follow quite well the command... If I understand right there is no correction yet with P, I and D values all zero.

    Looking forward to your opinion.
    Ciao,
    Eero

    Attached Thumbnails Attached Thumbnails Setting up KFlop + KStep closed loop stepper system-step_response_x-jpg   Setting up KFlop + KStep closed loop stepper system-step_response_y-jpg   Setting up KFlop + KStep closed loop stepper system-step_response_z-jpg   Setting up KFlop + KStep closed loop stepper system-step_response_a-jpg  

    Attached Files Attached Files


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

    Default

    Hi Eero,

    Yes, great now the encoders seem to be working.

    It looks like all the errors are less than about 10 microsteps.

    10/800 = 0.0125mm = 12.5micron (~ 0.5 mils).

    You are only making a small move (1mm) so it is hard to tell if the error is due to a slight scale factor or backlash and such. Make a big move like 100mm to see if the scale is correct.

    The encoder position looks a little rough. I’m not sure if that is error from the encoder or real motion. When errors are small they are easier to see if you plot the error or zoom in on the plot (left mouse click drag).

    But anyway it looks pretty much as expected. With PID gains set at zero there are no corrections being made. The Green plot would be the correction and as you can see it is flat line at zero.

    I would try some I gain of ~ 0.01 with a low pass filter of ~ 100Hz to see if it is better.

    With encoder feedback you shouldn’t need backlash compensation.
    Regards

    Regards
    TK http://dynomotion.com


  6. #6
    Registered
    Join Date
    Jan 2008
    Location
    Finland
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default With correction axis stays oscillating

    Hello Tom,

    Here some screenshots of the step response screen with bigger moves and higher speed, some without correction and some with.
    I only tried the Y and Z axis. The Y-axis stays oscillating when I have the correction of I=0.01. I tried some values both a bit bigger and a bit smaller but the oscillating was still there. I tried as well 80 and 60 Hz instead of 100Hz for the Low Pass filter. This changed the oscillation frequency somewhat. (I don't really know what these values exactly do and should read more about it...).
    What would you recommend seeing the Y-axis behavior?
    The Z-axis on the other hand didn't seem to have any correction active with the value I=0.01 and Low pass filter 100Hz. Does that look normal seeing the command and position lines?

    As my table has A-axis slaved to X I try first to get some sense of tuning by concentrating on Y and Z as they may be more straight forward...

    Looking forward to hearing from you.
    All the best,
    Eero

    Attached Thumbnails Attached Thumbnails Setting up KFlop + KStep closed loop stepper system-step_response_y-jpg   Setting up KFlop + KStep closed loop stepper system-step_response_y_higher_speed_no_correction-jpg   Setting up KFlop + KStep closed loop stepper system-zoom_y_no_correction-jpg   Setting up KFlop + KStep closed loop stepper system-step_response_y_lowpass100hz-jpg  

    Setting up KFlop + KStep closed loop stepper system-step_response_z-jpg   Setting up KFlop + KStep closed loop stepper system-zoom-z-correction-jpg   Setting up KFlop + KStep closed loop stepper system-step_response_z_lowpass100hz-jpg  


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

    Default

    Hi Eero,

    The Y closed loop plot looks a bit odd but it is hard to see because it wasn't zoomed in. As you noted the Axis 2 (Z) is not making any correction. Maybe one of your settings. There are 3 KMotion Screens involved in an Axis configuration. They are the Step Response, Config/Flash, and Filters screens. Please post those so we can see all the settings. Also there is a "Save Data" button that will save all the plot data to a file. If you post that in addition to the screen shots then we can zoom in ourselves and plot the response in various ways - position error, velocity, etc...

    I wouldn't really describe the Y axis as "oscillating". Oscillation is usually used to describe more sinusoidal oscillation at a higher frequency and amplitude. This is more like limit cycle hunting. Your axis is stuck with stiction with a small error. The stepper creeps and creeps building up tension (belt?) with no motion of the encoder until eventually the axis breaks free and moves. Or maybe backlash also plays a role. All closed loop servos will do this to some degree. In your case it seems pretty severe (~ 100 microsteps). 100 uSteps / 800 uSteps/mm = 12um. I suppose that is in the range of your backlash. Better plots would help us see. It may be difficult to eliminate without reducing stiction or backlash.

    Possibly adding P gain may help. When the axis breaks free and moves then P Gain should cause the stepper to reverse quickly to help avoid overshooting.

    Regards
    TK http://dynomotion.com


  8. #8
    Registered
    Join Date
    Jan 2008
    Location
    Finland
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default Things look better...

    Hi Tom,

    Thanks for your comments.
    Today I looked through my settings. I didn't really change anything except adding the same closed loop stepper settings for Ch0 and and its slave Ch3. Whatever the reason, all the curves on the stepper response screen looked much better. And I got corrections for the Z and X axis as well. There must have been a problem that was corrected by restarting the system...

    Attached files and screenshots of the stepper response. I did two times the same move with different speeds for each axis.

    Is there a way to test the A (Ch 3) slaved to X (Ch 0)? Should I change the slaving so that X is slaved to A?

    The error seems to be quite small with these values, but maybe you can have a look and tell me if there is something I should experiment with.

    What values would you recommend for the "max follow error" on the config screen? Is this value in steps? My resolution is 800 steps/mm.
    And the "Max limit" in the Stepper response screen?
    The "feed forward" and "dead band" concern more a servo setup I guess?
    And the "motion profile" settings - are they only used, when testing the stepper response since the axis parameters are set in the "Trajectory planner" tab of the "Tool setup" screen? or if not, when are they valid and what kind of values could be reasonable ? How does the jerk value work?

    Sorry many questions... I try to get a picture of how all these settings work together.

    Thanks already for your help,
    Eero

    Attached Thumbnails Attached Thumbnails Setting up KFlop + KStep closed loop stepper system-x_response-jpg   Setting up KFlop + KStep closed loop stepper system-x_response_higher_speed-jpg   Setting up KFlop + KStep closed loop stepper system-x_config-jpg   Setting up KFlop + KStep closed loop stepper system-x_filters-jpg  

    Setting up KFlop + KStep closed loop stepper system-y_response-jpg   Setting up KFlop + KStep closed loop stepper system-y_response_higher_speed-jpg   Setting up KFlop + KStep closed loop stepper system-y_config-jpg   Setting up KFlop + KStep closed loop stepper system-y_filters-jpg  

    Setting up KFlop + KStep closed loop stepper system-z_response-jpg   Setting up KFlop + KStep closed loop stepper system-z_response_higher_speed-jpg   Setting up KFlop + KStep closed loop stepper system-z_config-jpg   Setting up KFlop + KStep closed loop stepper system-z_filters-jpg  

    Attached Files Attached Files


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

    Default

    Hi Eero,

    I think things are working well. It appears that the closed loop is correcting the backlash well. The Output Plot (green) show what corrections are being made. It looks like there is backlash of:
    X - 40 uSteps = 50um
    Y – 100 uSteps = 125um
    Z – 30 uSteps = 38um

    Hmmm. These seem pretty big and larger than what there seemed to be in your earlier open loop plots. But I think those were made with small and slow moves. But ideal backlash should be unaffected by speed.

    It would be interesting to plot both open loop and closed loop moves while plotting the Position Error.

    But regardless of what it is it is being corrected.

    Your X axis seems to have some issue with the leadscrew. The move size was 16000uSteps or 20mm. With a 4mm pitch screw there would be 5 rotations. Note the 5 wave shaped cycles in the plot. Corrections of abut +/- 9um are being made.

    If you plot Position Error is easier to see the amount of error. When I do this(thanks for including the raw data files), I can see some ~100 Hz vibration. Not sure exactly what this is. The closed loop feedback might be causing it if the correction gains are too high, or it might be dampening it. You might try different gains and filters to see the effect.

    But the bottom line is if things are working well enough for your application.

    Yes to test the A axis you would temporarily need to slave X to A.

    Yes the Max Follow Error is in uSteps. The idea is to set this slightly larger than your worst case following error under normal conditions so that if anything goes wrong they system will disable and stop. Probably something like 200 counts in your case.

    Similarly with the Max settings on the Step Response Screen. The Max Output is mainly created from the Integrator so those should be set to similar values. The max error can be used to respond les violently to a huge error. However when Max Following Error is used it really doesn’t come into play as a big Following Error will disable the system on a huge error. For CL Step Mode the units of all of these are in uSteps.

    Dead band is normally used to reduce the amount of hunting when stopped. Your system doesn’t seem to need it as it “sits still” well with zero encoder counts of error. You might command to a non integer position to test this more thoroughly. For example 16002. Because your input gain is 4 a single encoder transition will change the Position by 4. So the closest Positions are 16000 and 16004. So the closed loop will dither back and forth keeping the average error to zero.

    The Motion Profile settings of Velocity, Acceleration, and Jerk are set into the Axis Parameters for each axis and are used for “Independent Motions”. For example for doing Homing and Probing from KFLOP C Programs. They are also used in KMotionCNC Rapid (G0) moves. This is so that 3rd order motion can be used for Rapid moves that can be potentially smoother and faster than 2nd order motions. 2nd order motion slams the full motor torque (acceleration) on and off instantly potentially generating a lot of disturbance and ringing in a mechanical system. This corresponds to infinite jerk (slope of ramping up the acceleration is infinite). This is like hitting the brakes quickly in your car. It is more likely to spill your coffee then applying the brakes more gradually even for the same degree of braking. For the same degree of acceleration and velocity 3rd order motion will take longer than 2nd order motion (applying the brakes gradually will take longer to stop) but will be much smoother. However 3rd order motion with higher acceleration can sometimes be faster and smoother. The units on the Step Response Screen are in uSteps (and seconds). The units for the KMotionCNC Trajectory planner are in inches (and seconds). I see in your configuration the Jerk Setting is 20X the Acceleration. This means Max Acceleration will be applied over 50ms. This is probably a reasonable value. To test what 2nd order motion would look like temporarily set the Jerk to a huge vale (1000X the acceleration).

    Hope this helps and wasn’t too long winded :}

    Regards

    Regards
    TK http://dynomotion.com


  10. #10
    Registered
    Join Date
    Jan 2008
    Location
    Finland
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default ToolZero and Problem with EnableAxisDest

    Hi,
    Some months went by without me getting to my router, but now I have worked on it again setting up the limit/home switches. I got the homing routine working and working on Tool Zero and Spindle.
    Today I bumped into a problem with EnableAxisDest command. I want to set the Z-coordinate to touchplate thickness at the end of my probe routine, but I end up with a disabled axis. ??
    I tried the same command in different places for example at the end of my MachineInit code and it seems to just not enable the given axis.
    Here is my ToolZero.c
    #include "KMotionDef.h"

    #define PROBE_PIN 169
    #define Z_AXIS 2
    #define FAST_SPEED 1600
    #define SLOW_SPEED 30
    #define TOUCHPLATE_THICKNESS 1.55
    #define Z_RES 800
    #define PROBE_BACK_OFF 35 //mm
    #define PROBE_DISTANCE 40 //mm




    main() // Home Z up first - jog fast til limit and slowly out of switch
    {
    double triggerPos = 0.0;

    if (ReadBit(PROBE_PIN)) //check that probe not active
    {
    printf("Probe active. Please correct!\n");
    return;
    }
    printf("Tool zeroing.\n");
    MoveRelAtVel(Z_AXIS,-PROBE_DISTANCE * Z_RES,FAST_SPEED); // jog faster positive
    while (!ReadBit(PROBE_PIN)) ; // loop until IO bit goes down
    Jog(Z_AXIS,SLOW_SPEED); // jog slowly negative
    while (ReadBit(PROBE_PIN)) ; // loop until out of switch
    triggerPos = chan[Z_AXIS].Dest;
    Jog(Z_AXIS, 0); // Stop the axis
    while (!CheckDone(Z_AXIS));
    MoveAtVel(Z_AXIS,triggerPos,SLOW_SPEED); // Move back to trigger position
    while (!CheckDone(Z_AXIS));
    DisableAxis(Z_AXIS);
    EnableAxisDest(Z_AXIS,TOUCHPLATE_THICKNESS * Z_RES);
    Move(Z_AXIS,PROBE_BACK_OFF * Z_RES);
    }

    I never wrote any code in any language, is there something wrong in the way I use the commands?
    I'll attach my GantryHoming.c here as well if anyone has any suggestions or use for it. At least it seems to work.

    Looking forward to some advice.

    Eero

    Attached Files Attached Files


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

    Default

    Hi Eero,

    I think you are generating a following error. It should be printed on the KMotion Console Screen if you look for it.

    I believe you have a closed loop system with encoders. If the encoder is reading some value, for example zero, and you Enable the axis and set the desired servo Destination to 1200 then the servo will immediately see a large error and attempt the drive the motor to make the encoder move to 1200. This may also generate an immediate following error if the max allowed following error is less than 1200.

    You should probably set the Encoder to be the position you want the current position to read, and then enable the Servo to target that same destination. So try:

    DisableAxis(Z_AXIS);
    chan[Z_AXIS].Position = TOUCHPLATE_THICKNESS * Z_RES;
    EnableAxisDest(Z_AXIS,chan[Z_AXIS].Position);

    Your program looks very good for someone who doesn't program.

    Regards

    Regards
    TK http://dynomotion.com


  12. #12
    Registered
    Join Date
    Jan 2008
    Location
    Finland
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default

    Thank you Tom for your quick reply. ToolZero works perfectly now.
    Still some struggle with USB underflow message telling me to increase the look ahead time. I tried to raise it from 3 to 5 sec - without result. I'm now using the closed loop stepper system. And ss things worked ok in open loop I guess my computer has some difficulties keeping up... It's an old 2.4 GHz Core 2 Duo with 6G of RAM. I'm going to try with my newer laptop if things work better.
    I'm not very experienced with PC/Windows systems as I normally use Mac. Would probably help if I could shut off most of the unnecessary processes when starting up Windows. How is this done? I have XP sp3 or WIndows 8.
    Sorry this is a simple PC handling question not really related to KFlop/KMotion.
    Thanks for your help,
    Eero



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

    Default

    Hi Eero,

    The System shouldn't be that sensitive to the speed of the PC or what is loaded on it. That is the main idea behind KFLOP to relieve the PC from the hard real time functions.

    Until the most recent Test Versions an Axis being disabled from a Following Error or Limit Switch would end up being reported as a buffer under flow. That is more likely what is happening. Check the KMotion Console Screen to see if there are any messages

    Regards

    Regards
    TK http://dynomotion.com


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

    Default

    Hi Eero,

    The System shouldn't be that sensitive to the speed of the PC or what is loaded on it. That is the main idea behind KFLOP to relieve the PC from the hard real time functions.

    Until the most recent Test Versions an Axis being disabled from a Following Error or Limit Switch would end up being reported as a buffer under flow. That is more likely what is happening. Check the KMotion Console Screen to see if there are any messages

    Regards

    Regards
    TK http://dynomotion.com


  15. #15
    Registered
    Join Date
    Oct 2007
    Location
    Switzerland
    Posts
    35
    Downloads
    0
    Uploads
    0

    Default Re: Setting up KFlop + KStep closed loop stepper system

    Thank you for posting this! It helped me a lot to get my Kflop running.



  16. #16
    Registered
    Join Date
    Jan 2010
    Location
    USA
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default Re: Setting up KFlop + KStep closed loop stepper system

    Tom,
    I have a couple of basic questions that might fit this forum topic, which I can't seem to find with searching.
    (big fan of your support and positive demeanor)

    questions related to a cnc router layout.
    1) if I put linear encoders along the axis, like Renishaws or USDigital EM1, can I install dumb steppers(open loop)? Why have closed loop on the stepper if I close the loop to controller directly? Will the Kflop modify the step/dir based on actual feedback, to achieve this?
    2) in high speed machining of wood, plastics and aluminum, (30k RPM, small endmills, like Datron) it seems the cutting forces on the bit are low, meaning the machines speed capabilities are largely tied to just it's masses and motion driving power.
    Could this mean a strong (Poly belt, T5, 50mm wide) could be used using simple driven pulley arrangements (not servobelt concept)? I wonder if the elastic nature of belts would be compensated for. the cost of driving each axis would be halved with belts vs screws.
    3) on a moving gantry machine, with two motors slaved, would each side need encoders and could Kflop manage synchronizing those two, while still handling the XandZ motions? (still thinking of open loop driven motors)

    I'm currently building a simple mach3/BOB/gecko mill, using Parker Daedals 404XR linears and a Hitachi router spindle. my plan is to use this to make the mechanical bits for a larger granite based Datron clone. It's a long road.

    Dave



  17. #17
    Registered
    Join Date
    Oct 2007
    Location
    Switzerland
    Posts
    35
    Downloads
    0
    Uploads
    0

    Default Re: Setting up KFlop + KStep closed loop stepper system

    Hi Dave

    Since I just added some glass scales to my Kflop I might be able to answer your question:

    1) The only reason you want to add some glass scales (linear encoders) to your Kflop is if you want to improve accuracy. If your (mechanical) accuracy is good enough without any linear encoders you will do fine without the hassle and cost of additional encoders.
    But if you add linear encoders Kflop will measure the actual position at the glass scales and then pulse your steppers until the destination on your glass scale is reached. This is called a closed loop Step Dir.
    Closed Loop Stepper
    There is also closed loop for controlling servo motors. But that is something different.

    2) from my experience it is advisable to always make the driving of an axis as rigid as possible. The lost rigidity can not be compensated with a better regulation. Manly because of oscillation. Your belts will act like rubber bands and you might picture how difficult it is to position your machine with two rubberbands.

    Let me tell you from personal experience: If you start out with milling you will most likely underestimate the importance of rigidity be the factor of at least two. So if you make it twice as rigid as you think that would be enough for your application it might barely be useful. You will find backlash, freeplay, dynamic deformation where you never thought it was possible. I did most things twice because I had to learn....

    Leo



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

    Default Re: Setting up KFlop + KStep closed loop stepper system

    Hi Dave,

    if I put linear encoders along the axis, like Renishaws or USDigital EM1, can I install dumb steppers(open loop)? Why have closed loop on the stepper if I close the loop to controller directly? Will the Kflop modify the step/dir based on actual feedback, to achieve this?
    Yes KFLOP will generate additional motor steps in order to get the linear encoders to read the desired value. But the issue is more the dynamic stability of the control loop. Closing the control loop around linear glass scales includes more "bad" mechanical things inside the control loop making it more difficult to control. The main things are backlash/compliance/stiction. So for example say the linear encoder has a small error that the servo wants to correct. This will usually cause the servo to ramp up the motor torque. Eventually the motor will have enough torque to break stiction and begin accelerating. But the linear scales may not yet indicate any thing has moved because of the system's backlash/compliance. So the Servo will continue to ramp up torque further. Eventually when the backlash/compliance is taken out the Axes will move and the Linear scales will report the motion. But at that point the motor may be at such a velocity that it is difficult to avoid a significant overshoot. Most systems like this can be made to work and be stable but only with very low feedback gains (torque is ramped up very very gradually) resulting in poor dynamic performance (errors are not connected quickly and therefore are allowed to grow to larger values).

    With Servo Motors it is almost always necessary to have some feedback from the motor shaft. Either from a tachometer or rotary encoder. This allows the motor to move at a controlled speed through any backlash. Ironically Steppers have some inherent feedback from the motor. Once the motor breaks loose and begins to move the torque will naturally be reduced. You might consider the model of a stepper motor as a spring. Microstepping is like advancing the spring connected to a "stuck" load. The spring will stretch and apply more and more force until the load breaks free and moves. At that point the spring force will naturally be reduced.

    So in summary you may well not need encoder feedback on the steppers. However what performance you will be able to achieve is a complex dynamic problem dependent on the mechanical parameters of your system.

    in high speed machining of wood, plastics and aluminum, (30k RPM, small endmills, like Datron) it seems the cutting forces on the bit are low, meaning the machines speed capabilities are largely tied to just it's masses and motion driving power.
    Could this mean a strong (Poly belt, T5, 50mm wide) could be used using simple driven pulley arrangements (not servobelt concept)? I wonder if the elastic nature of belts would be compensated for. the cost of driving each axis would be halved with belts vs screws.
    I don't have the experience to answer this other than more elastic nature (compliance) is likely to reduce performance. But how much is hard for me to say.

    on a moving gantry machine, with two motors slaved, would each side need encoders and could Kflop manage synchronizing those two, while still handling the XandZ motions? (still thinking of open loop driven motors)
    You should be able to configure KFLOP for the Master Axis to be closed loop and the Slave Axis open loop, but I think it would be better to have both sides closed loop. Otherwise your worst case errors will essentially be the same as if everything was open loop.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  19. #19
    Registered
    Join Date
    Jan 2010
    Location
    USA
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default Re: Setting up KFlop + KStep closed loop stepper system

    thanks! I have a lot to learn, and that's great advice Leo, to think stiffer than I estimate. 2x stiffer,.......that's what she said.....
    The whole granite idea is to help with the tramming and stability.
    My 80/20 framework and the tramming of it has been a real eye opener. Precision granite will solve a lot.

    I've been CAD'ing up ball screw, belt, servo belt etc ideas. I've also begun sorting out a spinning nut ball screw idea.
    I read the specs and you can only spin a ball screw shaft about 50 RPS or so, and there is some inertia to account for.
    The spinning nut concept eliminates some end bearing blocks and can spin faster.

    I'm obsessed in having the Datron results at home and am a designer and fabricator, like most here.
    I just spent 3 years immersed in the 3D printer realm, and am excited to get into this now. (videos on youtube Mitus Prints, and failed Kickstarter X-truder)

    thanks again.

    Dave



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

Setting up KFlop + KStep closed loop stepper system

Setting up KFlop + KStep closed loop stepper system