Need Help! Questions about Kmotion (Kflop+SnapAmp) - Page 3


Page 3 of 3 FirstFirst 123
Results 41 to 59 of 59

Thread: Questions about Kmotion (Kflop+SnapAmp)

  1. #41
    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,

    We have a diagram/description here:

    Dynomotion Motion Control Boards for CNC Manufacturing and Robotics Applications



    Do you have a specific question?

    Regards,

    Regards
    TK http://dynomotion.com


  2. #42
    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 for the diagram. In the future is there any possible way to use IJK absolute?

    Thanks,
    Zoltan

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


  3. #43
    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,

    Anything is possible 😃

    Why? Won't your CAD system generate incremental IJK?

    Regards

    Regards
    TK http://dynomotion.com


  4. #44
    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!

    Can you show me the circuit what you using to driver to output status LED on Konnect?

    Z

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


  5. #45
    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,

    We used a CD74ACT273PW Latch IC that can source 3.8V at 24ma. It drives both an LED indicator and a Opto coupler in a parallel configuration. The LTV-847S Opto coupler through a 150 ohm resistor to GND. The LTST-C171GKT indicator LED through a 470 ohm resistor to GND.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  6. #46
    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!

    I would like to try a converter 1 VPP (sinusoidal) to TTL (A,/A,B,/B) converter. I see there is the fold value and the input frequency on the converter. What is the maximum what I can use if the encoder have 10um lines.

    Sincerely,
    Zoltan

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


  7. #47
    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 don't know what "fold value" is.

    The max Encoder rate for KFLOP is 1MHz. So for example for resolution of 1um the max speed would be 1m/s.

    Regards

    Regards
    TK http://dynomotion.com


  8. #48
    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!

    I have a question: You told meg few posts ago that I have to use CoordMotion.Interpreter.ChangeFixtureNumber() instead of CoordMotion.Interpreter.SetupParams.OriginIndex.

    When I'm using the OriginIndex, it goes back to 0 when I start a cycle. So I rewrite to use ChangeFixtureNumber to change it, but I get error message that the emc.var file not found. But the CoordMotion.Interpreter.VarsFile is added, but I don't know how to test it (or it needed the, same as the "ToolFile" and "SetupFile".

    Thank you,
    Zoltan

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


  9. #49
    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,

    There was a bug in the void SetVarsFile(char *f); function (as well as SetToolFile and SetSetupFile).

    This was corrected in Test Version 4.34a

    What Language are you programming in? In C++ you can access the character arrays directly without using the Set Functions (that has the bug):

    char ToolFile[MAX_PATH];
    char SetupFile[MAX_PATH];
    char GeoFile[MAX_PATH];
    char VarsFile[MAX_PATH];

    Regards

    Regards
    TK http://dynomotion.com


  10. #50
    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!

    C#. Can I dead with this somehow in v433?

    I see new methods like GetAxis, GetIO. Do you recommend to use this or the "old style" (I mean the older samples) is still good solution too?

    Z

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


  11. #51
    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,

    Actually the C# functions do not have the bug. I tested:



    _Controller.CoordMotion.Interpreter.VarsFile = "C:\\KMotion433\\GCode Programs\\emc.var";

    String Test = _Controller.CoordMotion.Interpreter.VarsFile;

    _Controller.CoordMotion.Interpreter.ChangeFixtureN umber(2);


    And it seemed to work for me. Where is your emc.var file and what are you setting the VarsFile to?

    Regards

    Regards
    TK http://dynomotion.com


  12. #52
    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!

    I just added the default vars file what's in the KMotion folder. Now my program keep throwing error that the vars file not found.

    Z

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


  13. #53
    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,

    We would need to know where you put the file and what you are setting the Filename and path to.

    You can debug these things by placing breakpoint where it opens the file and see what filename it is trying to open. Note you may need to select Project Properties | Debug | Enable native code debugging.

    Regards

    Regards
    TK http://dynomotion.com


  14. #54
    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 removed everything about Origin's. Now I have some issues with the cycle start. Please let me know if there is any error wit this method.

    This is how I'm doing the CycleStart (this = KM_Controller)

    -this.CoordMotion.Interpreter.InvokeAction(KMotionI nvokeActions.ACTION_CYCLE_START, false);

    -Setup Motion Params (this.CoordMotion.MotionParams)

    -Setup Interpreter Files
    this.CoordMotion.Interpreter.VarsFile = this.VarsFilePath;
    this.CoordMotion.Interpreter.ToolFile = this.ToolFilePath;
    this.CoordMotion.Interpreter.SetupFile = this.SetupFilePath;
    My paths like: "VarsFilePath" = C:\\\KMotion433\\\GCode Programs\\\emc.var

    -this.CoordMotion.IsSimulation = this.CC_IsSimulation;
    Just check if it's a simulation.

    -this.CoordMotion.ClearAbort();

    -this.CoordMotion.ClearHalt();

    -this.CoordMotion.FeedRateOverride = 1.0;

    -this.CoordMotion.FeedRateRapidOverride = 1.0;

    -this.CoordMotion.Interpreter.Interpret(this.CC_Fil ePath, this.CC_FileStart, this.CC_FileEnd, 0);


    Z

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


  15. #55
    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,

    There are quite a few errors. I'm not sure why you are invoking the Cycle Start Action if you haven't configured any Action. Lots of syntax errors. "this" is normally a reserved word to reference the current object. You have triple backslashes in your file name paths.

    You should probably start with some example code that works. See the KMotion_dotNet Console example. It has a C# sequence to launch some GCode with the Interpreter.

    Regards

    Regards
    TK http://dynomotion.com


  16. #56
    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!

    Sorry for it, but I didn't explain it enough.

    "I'm not sure why you are invoking the Cycle Start Action if you haven't configured any Action."
    -I would like to test it, because I never tried how it's works. I will invoke my event listener for it, no? What it's the bool at the end? (I get it from you samples)

    "Lots of syntax errors. "this" is normally a reserved word to reference the current object."
    using KMotion_dotNet;
    namespace IMS
    {
    class KMotion : KM_Controller
    {

    -This is why you see "this"... I did a new class for all KMotion KM_Controller things...

    "You have triple backslashes in your file name paths."
    -I copied it from a VS2015 .settings file. That's why it's have that many \. It stored in XML, and sometimes it's doing weird thing it it's going to C++. Still not sure if the emc.var set working or not. I will start playing with the Origins and I will see.

    So, what do you think, when I'm using ChangeFixtureNumber, it's say "emc.var" not found and the path is "GCode Programs/emc.var" (I dunno if it's stripping the full path, or this coming from somewhere else, maybe a default path?)

    Z

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


  17. #57
    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 Flag in the InvokeAction call is FlushBeforeUnbufferedOperation. It basically determines if current GCode Motion should be Flushed before the Action is performed.

    Regarding the emc.var not found. You would need to specify the complete path properly for it to work.

    Regards

    Regards
    TK http://dynomotion.com


  18. #58
    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!

    I have a question about the limits.

    I have one input bit for the limit per axis. (Example: bit 1026). And I'm using two virtual bits for pos and neg limit (Example: bit 2026 and 2027).

    In the "Config and Flash" I added the 2026 and 2027 for neg and positive limit (Watch Limit) and Action: STOP MOVEMENT.

    In my main loop a try to determinate the direction of the movement, in here I have some issues sometimes.

    -What's the best way to look the direction (last Position > current Postion OR check the last Dest > current Dest?)
    -I wrote the code and it's working, but when I'm in the limit and I check the JOB in KMotionCNC looks like it's moving a little so it's flips the travel direction when I'm in the limit (limit bit low).
    -I also tries to delay the update of the last Position/Dest with the non blocking loops (used the Timer_sec to check it every .001 sec, as you show me in the example, but I also did it without it).
    -CheckDone is necessary in this case?

    Here is an example how I try to solve it:


    #include "KMotionDef.h"

    void WatchLimit(int ch, int limit, int limitNeg, int limitPos);

    main()
    {
    for(;
    {
    WaitNextTimeSlice();
    WatchLimit(1, 1026, 2026, 2027);
    }

    }

    void WatchLimit(int ch, int limit, int limitNeg, int limitPos)
    {
    static double dest = 0;

    if(ReadBit(limit))
    {
    ClearBit(limitNeg);
    ClearBit(limitPos);
    }
    else
    {
    if(!(ReadBit(limitNeg) || ReadBit(limitPos))) // Maybe "XOR" (^) instead of "OR" (||)
    {
    if(dest < chan[ch].Dest)
    {
    SetBit(limitPos);
    ClearBit(limitNeg);
    }
    else
    {
    SetBit(limitNeg);
    ClearBit(limitPos);
    }
    }
    }

    dest = chan[ch].Dest;
    }

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


  19. #59
    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,

    Determining exact direction is complicated due to microscopic numerical round off errors and such.

    But KFLOP maintains an Axis Parameter for that purpose:

    int LastNonZeroDir; // Last direction we actually moved some amount(+1=Positive, 0=undefined, -1=negative)

    So you should be able to delete your dest variable and change:

    if(dest < chan[ch].Dest)

    to

    if(chan[ch].LastNonZeroDir == 1)

    Minor note: if you use the # CODE tags the code won't loose all formatting and will be easier for us to read.

    Regards

    Regards
    TK http://dynomotion.com


Page 3 of 3 FirstFirst 123

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)