Need Help! Questions about Kmotion (Kflop+SnapAmp)


Page 1 of 3 123 LastLast
Results 1 to 20 of 59

Thread: Questions about Kmotion (Kflop+SnapAmp)

  1. #1
    Registered Buruhazard's Avatar
    Join Date
    Sep 2014
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Questions about Kmotion (Kflop+SnapAmp)

    I tried to determinate the following values, if here is and expert please let me know if something wrong, also I have questions about the last few values (FFV, FFA, Error):

    Encoder
    4.00 RES Resolution (2x, 4x)
    5,000.00 CPR Cycles Per Revolution
    20,000.00 PPR Pulse Per Revolution (RESxCPR)
    Ballscrew
    0.20 RPU Revolution Per Unit (Pitch) [Inch]
    5.00 RPI Revolution Per Inch (1/RPU)
    KMotion Settings
    100,000.00 PPI Pulse Per Inch (PPRxRPI)
    400.00 IPM Desired Feedrate [Inch Per Minute] 6.666666667 [Inch Per Second]
    666,666.67 V Velocity ((IPM/60)xPPI) [Pulse Per Second]
    1,333,333.33 A Acceleration (2xV) [Pulse Per Second2]
    13,333,333.33 J Jerk (10xA)
    ? FFV
    ? FFA
    ? Output +/- 10000 (+/-~30Apms)
    ? Integrator [%]
    ? Error


    Similar Threads:


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

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hi Buruhazard,

    You can leave FFV (Velocity Feed Forward) and FFA (Acceleration Feed Forward) zero. I think it is best to tune your servos for best performance without Feed Forward. Feed Forward can sometimes be used to reduce errors but unlike feedback it doesn't adjust for changing conditions (friction, load, etc...). After your servos are optimally tuned you might try adding some to reduce following errors. I don't know of any method other than finding empirical values through trial and error.

    Max Output corresponds to the Maximum Output Current that you want to be applied to the Motor. For Brush Motors on SnapAmp the Maximum value is 1024 for 35A of current. Start with a small number (200?) and increase as necessary to get the acceleration you require.

    Max Integrator is the maximum amount of output that you wish to allow to be applied by the integrator. This is actually in the same units of counts as the max Output (not a %). The Integrator is often used to correct small but persistent errors (either while stationary or moving) that are not big enough to cause the proportional gain to make a correction. Using the smallest possible value that allows this to occur will avoid excessive Integrator wind-up (and violent overshoot) if something abnormal causes an error that persists for a long time.

    Max Error should be set to a value slightly larger than the maxim following error (in units of encoder counts) that occurs under all normal conditions. So for example if after your system is tuned it is always able to follow within 100 counts, then you might set it to 150 counts. In this way if something abnormal happens to cause a larger error (ie force the axis way off target and let go) then the servo will not react so violently to correct it. Often the Max Following Error is set to a small value and will disable the Axis anyway on a large error, so in that case the Max Error setting is somewhat irrelevant. I usually set the Max Following Error to a huge value until after the Axis is tuned. I also set the Max Following Error to a moderately small value so if the axis goes unstable while tuning it will disable itself.

    HTH
    Regards
    TK

    Regards
    TK http://dynomotion.com


  3. #3
    Registered Buruhazard's Avatar
    Join Date
    Sep 2014
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hi Tom!

    Thanks fo the reply!

    The V A J calculation it correct?

    Another thing is, when I'm using like 100 (just sample) value for Velocity and 200 (just sample) for Acceleration, do I need to add this two numbers to Mach 3 also? I just figurated out the Velocity is better to be same in Mach 3, (Inch/min), but I don't know is a good idea to using the half of the velocity (converted to inch/sec) to acceleration (inch/sec^2) in Mach3?



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

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hi Buruhazard,

    Yes your other calculations look correct.

    Yes you would also need to set the Acceleration and Velocity in the Mach3 Tuning Parameters in Inch Units, inches/sec2 and inches/minute (assuming Mach3 is set to be configured in Inches).

    Mach3 only performs 2nd order motion (Infinite Jerk). So tune using a huge value of Jerk (ie 1000X the Acceleration value) and use those Acceleration and Velocity Values for Mach3. Jogging and other KFLOP motions (ie Homing) can be performed using 3rd order motion which might allow slightly higher Acceleration and Velocity values combined with a lower Jerk. Leave those Values in KMotion/KFLOP.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  5. #5
    Registered Buruhazard's Avatar
    Join Date
    Sep 2014
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hey Tom.

    It broadly working. Thanks. I have another thing. There is a example about VFD control (0-10V) with Konnect board. It said use JP4 instead of JP6, but what happend when I have a SnapAmp connected to JP4? Can I use SpanAmp on JP6? I also have a Kanalog too, but I can't figurate out how can I use the analog outputs on that. There is any solution to generate PWM (not VFD 0-10) from Konnect?

    Zoltan,
    http://zoltan.buru.hu/


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

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    There is a example about VFD control (0-10V) with Konnect board. It said use JP4 instead of JP6, but what happend when I have a SnapAmp connected to JP4? Can I use SpanAmp on JP6?
    SnapAmp must connect to JP4 (Aux0). Konnect can connect to either JP4 or JP6. By default Konnect connects to JP6 (Aux1) to avoid a conflict with SnapAmp use. With Konnect on JP6 use:

    AddKonnect(0,&VirtualBits,VirtualBitsEx);

    instead of:

    AddKonnect_Aux0(0,&VirtualBits,VirtualBitsEx);

    I also have a Kanalog too, but I can't figurate out how can I use the analog outputs on that.
    If you have a Kanalog that is the simplest way to create a 0-10V Analog Spindle control signal (Although Kanalog's signals are not isolated if that is an issue). You can test by using Console commands like DAC0=-500 to output 2.5V. See here for how to configure Spindle Control with an open loop DAC:



    There is any solution to generate PWM (not VFD 0-10) from Konnect?
    The example you might have been looking at here creates a PWM signal to the external circuit described. If the external circuit is removed then the PWM signal is available. Because Konnect updates at only a moderate rate (90us) the PWM is implemented as sort of a delta sigma approach to get better response than a normal fixed frequency PWM would.

    Regards
    TK http://dynomotion.com


  7. #7
    Registered Buruhazard's Avatar
    Join Date
    Sep 2014
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    I already did the "KONNECT - PWM to Analog Example", It wont work. In the comments there are: "// Attach Service to Aux0 Port (KFLOP JP4) instead of standard Aux1 Port (KFLOP JP6)".
    I think Kanalogshould be work. How can I controll the analog output on Kanalog from C code? I would like to control a device whith needs analog VFD, open loop, no feedback, (laser). Can I send the parameters from Mach 3 to one of the threads where the VFD control running?

    Zoltan,
    http://zoltan.buru.hu/


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

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hi Zoltan,

    I already did the "KONNECT - PWM to Analog Example", It wont work. In the comments there are: "// Attach Service to Aux0 Port (KFLOP JP4) instead of standard Aux1 Port (KFLOP JP6)".
    I explained how to change the example to use JP6. But regardless it should be simpler to use a Kanalog DAC instead.

    I think Kanalogshould be work. How can I controll the analog output on Kanalog from C code? I would like to control a device whith needs analog VFD, open loop, no feedback, (laser). Can I send the parameters from Mach 3 to one of the threads where the VFD control running?
    Were you able to follow the link I provided to how to use a DAC to control a Spindle?

    The steps would be:

    #1 wire it and test control with Console Screen DAC Commands.
    #2 configure an axis channel as described so that "Jogging" the Axis can control the Speed - Console Screen Jog Commands
    #3 configure Mach3 | Plugins | Dynomotion to use the \C Programs\Mach3LatheSteppersSpindleEnc\SpindleMach3 Jogs.c

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  9. #9
    Registered Buruhazard's Avatar
    Join Date
    Sep 2014
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hey Tom!

    This is serious: Now the system looks like: KFlop+SnapAmp+Konnect, everything just works fine (everything just so accurate). So then I add the Kanalog, then everything just going crazy, the stage just start doing unwanted movements. Any suggestion?

    Thanks!

    Zoltan,
    http://zoltan.buru.hu/


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

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hi Zoltan,

    Can you be more detailed and specific? All you do is attach Kanalog with nothing connected to Kanalog and you have "unwanted movements"? Do the movements begin before you initialize the axes? Do you have anything Flashed to KFLOP? Are the movements controlled? What do the Positions and Destinations show on the Axis Screen before and after the "unwanted movements"?

    Regards

    Regards
    TK http://dynomotion.com


  11. #11
    Registered Buruhazard's Avatar
    Join Date
    Sep 2014
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hi Tom!

    Now I just forget the Kanalog, (I'm using and Atmel controler to control the laser power, so I don't need the Kanalog). Short: My Kflop+SnapAmp+Konnect is working (using it with Mach3), everything just fine. When I connect the Kanalog the whole system just start doing weried things. We will talk about it later. Now I'm tuning a BDC servo, yesterday everything just worked fine, but today it starts losing steps or accumulate errors. My Step respond and Bode is looks like this now (see photos), the isn't any IIR filter. The problem is, if I'm jogging in Mach3 the axis act like it is sharking (like "bumps on the road") when accelerateing and deaccelerateing. Any suggestions?

    Thanks,
    Zoltan

    Questions about Kmotion (Kflop+SnapAmp)-srw-jpgQuestions about Kmotion (Kflop+SnapAmp)-bpw-jpg

    Zoltan,
    http://zoltan.buru.hu/


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

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hi Zoltan,

    The Step Response Plot looks reasonable. Is the motion irregular when you move from the Step Response Screen?

    A common problem is to not understand how parameters are set in KFLOP. The Step Response Screen will download the Screen parameters to KFLOP when the "Move" button is pushed. Mach3 requires the same parameters in a C Program so that when Mach3 is "RESET" the same parameters are applied in KFLOP. Please see this Flash Video:

    http://www.dynomotion.com/Help/Flash...ers/index.html

    I wouldn't get involved with Bode Plots at this point. But your measurement doesn't have enough amplitude to get useful information. One of the issues with making a Bode Plot is to stimulate the system with enough amplitude to get useful information (if the position doesn't move significantly then there will be little information obtained). On the other hand too much stimulation will operate the system in a saturated non-linear mode which will also not be useful. Observe the response in the time domain to set the amplitude to a reasonable level. See also:

    Bode Screen

    Regards

    Regards
    TK http://dynomotion.com


  13. #13
    Registered Buruhazard's Avatar
    Join Date
    Sep 2014
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hey Tom!

    KMotion_dotNet question:

    I did someting same program in C# for testing (Based on the SimpleFormsCS, everything is the same!)

    This thing what I'm doing:

    Sending the "Version" to the console:

    private void sendButton_Click(object sender, EventArgs e)
    {
    try
    {
    KM.WriteLineWithEcho(commandTextBox.Text);
    KM.CheckIsReady();
    }
    catch (DMException ex)
    {
    MessageBox.Show(ex.InnerException.Message);
    }
    }

    Durring this time I'm updateing the X axis data with the Timer as in SimpleFormsCS:

    if (KM.WaitToken(100) == KMOTION_TOKEN.KMOTION_LOCKED)
    {
    KM_MainStatus MainStatus;

    try
    {
    MainStatus = KM.GetStatus(false); // we already have a lock
    KM.ReleaseToken();
    Console.WriteLine(MainStatus.GetDestination(0));
    //XEnabled.Checked = (MainStatus.Enables & (1 << 0)) != 0;
    }
    catch (DMException ex) // in case disconnect in the middle of reading status
    {
    KM.ReleaseToken();
    MessageBox.Show(ex.InnerException.Message);
    }
    }

    No just writing the code staight to the Console.

    So, I'm sending the "Version" few times, it responsing, but sometimes getting this on the console, and it is no longer respond:

    0
    0
    0
    0
    0
    2.03716911043454E-312
    2.03716911043454E-312
    A first chance exception of type 'KMotion_dotNet.DMException' occurred in KMotion_dotNet.dll

    Another thing, the original SimpleFormerCS done the SAME think, when you hit the Send (the "Version") many times.

    Any suggestion?

    Zoltan,
    http://zoltan.buru.hu/


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

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hi Zoltan,

    You are correct there is a bug in the .NET interface regarding the CheckIsReady function and the SimpleFormsCS C# example. Although the CheckIsReady() funtion should not be needed for most applications. It's only purpose is to provide a means of allowing a User to manually enter Console Commands. In that case it would be hard to know what the response from KFLOP would be. So we just capture all the responses until we finally see a "Ready" response. Normally when an App issues a Console Command it knows what the response will be and doesn't need to do this.

    Here is an announcement of a Test Version that corrects that issue and with an updated SimpleFormsCS C# Example.

    Yahoo! Groups

    Regards

    Regards
    TK http://dynomotion.com


  15. #15
    Registered Buruhazard's Avatar
    Join Date
    Sep 2014
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hey Tom,

    Any idea?

    Questions about Kmotion (Kflop+SnapAmp)-vscser-jpg

    Sincerely,
    Zoltan

    Zoltan,
    http://zoltan.buru.hu/


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

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hi Zoltan,

    Hmmm... looks like the binaries were somehow not current in that Test Release. Please try opening the BuildAllLibs.sln solution and re-building all for debug and release configurations to see if that solves the issue.

    Regards
    TK

    Regards
    TK http://dynomotion.com


  17. #17
    Registered Buruhazard's Avatar
    Join Date
    Sep 2014
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    I have only VS 2008 and VS 2012, can I use 2012 for rebiuld all of them?

    Zoltan,
    http://zoltan.buru.hu/


  18. #18
    Registered Buruhazard's Avatar
    Join Date
    Sep 2014
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    It looks, it is fixed the issue, thanks Tom!

    Zoltan,
    http://zoltan.buru.hu/


  19. #19
    Registered Buruhazard's Avatar
    Join Date
    Sep 2014
    Location
    USA
    Posts
    31
    Downloads
    0
    Uploads
    0

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hey Tom:

    Few questions about KMotion .NET:

    -What the C program doing when you hit the "Reset" button (I mean program reset, liek Rewind), What I have to do in KMotion dotNET.
    -Where can I get the actual feed rate, and how the feedrate override working.
    -This thing is really slow (when hit the pause, the resume is faster). What is the function (KM.Coo....Inter....getSomething()) alternative of this one? I just seen it somewhere but I can't find it in the Object Browser.
    String s = KM.WriteLineReadLine("GetStopState");
    if (s == "0")
    {
    KM.WriteLineReadLine("StopImmediate0");
    }
    else
    {
    KM.WriteLineReadLine("StopImmediate1");
    }
    -Any suggestion how to make the STEP command? I mean line by line stepping.
    -If I'm making a custom MDI, just use the KM.CoordMotion.Interpreter.Interpret(programContro l.FilePath);, and send it into a temp file, or there is some MDI command functions?

    Zoltan,
    http://zoltan.buru.hu/


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

    Default Re: Questions about Kmotion (Kflop+SnapAmp)

    Hi Zoltan,

    -What the C program doing when you hit the "Reset" button (I mean program reset, liek Rewind), What I have to do in KMotion dotNET.
    Not sure exactly what you are asking. Are you referring to the KMotonCNC Restart Button? KMotionCNC only clears any displayed error line, sets the current line to be executed to the first line of the file, and clears any resume/stopped conditions.


    void CKMotionCNCDlg::OnRestart()
    {
    ThreadHadError[m_Thread]=false;
    CurrentLine[m_Thread]=0;
    Interpreter->CoordMotion->m_PreviouslyStopped = STOPPED_NONE;
    }

    Where can I get the actual feed rate
    This is fairly complex as there are many modes of operation inches/min, inches/rev, mm/rev, angular axes, etc... The basic idea is that bulk status records are requested from KFLOP usually a few times per second. The bulk status contains all the axis positions and a time stamp. The difference between two status records can be used to determine current feed rate. You might look at how KMotionCNC does all this in KMotionCNCDlg.cpp search for "// display current feed rate"

    how the feedrate override working
    There is a property called:

    CoordMotion.FeedRateOverride

    -This thing is really slow (when hit the pause, the resume is faster). What is the function (KM.Coo....Inter....getSomething()) alternative of this one? I just seen it somewhere but I can't find it in the Object Browser.
    String s = KM.WriteLineReadLine("GetStopState");
    if (s == "0")
    {
    KM.WriteLineReadLine("StopImmediate0");
    }
    else
    {
    KM.WriteLineReadLine("StopImmediate1");
    }
    Not sure what you mean. FeedHold should be instant depending on your accelerations and jerk settings. This Line:

    KM.WriteLineReadLine("StopImmediate0");

    Is only sending a command to Stop. There is no response. So WriteLine should be used not WriteLineReadLine. Waiting for a response that never comes will cause communication problems.

    Any suggestion how to make the STEP command? I mean line by line stepping.
    The Call to the Interpreter has a parameter for what line to start and what line to end. Set the starting line and ending line to be the same to execute one line of GCode.


    -If I'm making a custom MDI, just use the KM.CoordMotion.Interpreter.Interpret(programContro l.FilePath);, and send it into a temp file, or there is some MDI command functions?
    The GCode Interpreter is all setup to execute files. To execute one line of MDI command you must write the line to a temporary file. The overhead is negligible.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


Page 1 of 3 123 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

Questions about Kmotion (Kflop+SnapAmp)

Questions about Kmotion (Kflop+SnapAmp)