Need Help! How to setup kinematics RTCP in KmotionCNC


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

Thread: How to setup kinematics RTCP in KmotionCNC

  1. #1
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default How to setup kinematics RTCP in KmotionCNC

    Hi Everyone,

    I am using Kflop controller which has kmotionCNC app.

    Everything is working fine exept kinematics or RTCP for my machine configuration.

    I am using XYZAC trunnion table but in kflop gcode interpreter this is not there. I need help with this to run RTCP for my XYZAC machine.

    Regards
    Amit Kumar

    Similar Threads:


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

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Amit,

    I believe we were working with you and your co-worker. We asked some questions and there hasn't been a response.

    Its necessary to be able to home all axes to be able to define everything in consistent machine coordinates. Are you able to home all your Axes?

    Please make a diagram of your system's configuration that shows the locations of the rotary axes relative to the machine's origin.

    Regards

    Regards
    TK http://dynomotion.com


  3. #3
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Lightbulb Re: How to setup kinematics RTCP in KmotionCNC

    Hi tom,

    Yes its right , we did homed all axes for our machine.

    and in our machine, XY Linear and AC Rotary are in table and Z is on head.

    And in axes A rotates around X, C rotates around Z. And we are using trunnion table,

    The problem we are facing is how to change that kinematics 5AxiskinematicsBC to 5AxeskinematicsAC.

    the optimisation we are getting is good but the only problem is we have to switch motors of X and Y to make it work. So is there any idea by which we are able to run TCP without switching motors in that kinematics, i tried changing parameters in that kinematics class but there is no effect on running.

    Thank You
    Amit Kumar

    Regards

    Amit Kumar


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

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Amit,

    I assume your system is something like this?



    Did you mean to say Kinematics5AxisTableBC?

    Are you able to compile the Libraries?

    I've attached a new Kinematic class called CKinematics5AxisTableAC derived from CKinematics5AxisTableBC that may work.


    In addition to adding the new class files to the project you will need to add this to StdAfx.h
    #include "Kinematics5AxisTableAC.h"

    Also allow it to selected by CoordMotion.cpp by adding:
    if (strstr(s, "5AxisTableAC") != NULL)
    Kinematics = new CKinematics5AxisTableAC;


    And select it by specifying 5AxisTableAC in \Data\Kinematics.txt

    HTH
    Regards

    Attached Files Attached Files
    Regards
    TK http://dynomotion.com


  5. #5
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Tom,

    Yes i compiled all libraries in VC2015 by selecting BuildAllLibs.sln file in installation directory.

    But as you said " adding the new class files to the project " , in Which project do i have to add those class files that you attached, GCodeInterpreter.vcproj, GCodeInterpreter.vcxprojor other.

    and remaining as you said , i applied all the changes in
    StdAfx.h , CoordMotion.cpp but there is no optimization while rotating A, B, C. When i am running Z axis X, and Y moves, that is unnecessary.

    So first thing i want to know that i am doing right or not? if no then please tell me how to make it right.





    Regards

    Amit Kumar


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

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Amit,

    But as you said " adding the new class files to the project " , in Which project do i have to add those class files that you attached, GCodeInterpreter.vcproj, GCodeInterpreter.vcxprojor other.
    Add the two files to the GCodeInterpreter project. First copy the two files to the GCodeInterpreter directory. Then in VS2015 open BuildAllLibs.sln and right click on the GCodeInterpreter project in the Solution Explorer. Select Add | Existing Item and select the two files

    i applied all the changes in StdAfx.h , CoordMotion.cpp
    good. Did you also select it by specifying 5AxisTableAC in \Data\Kinematics.txt?

    but there is no optimization while rotating A, B, C
    I don't understand what you mean by "no optimization"

    When i am running Z axis X, and Y moves, that is unnecessary.
    If the A and C axes are not at zero, then when Z moves X and Y should also move.

    To verify A and C are at machine zero select "Machine Coord" in KMotionCNC and verify the A and C DROs show zero and are in Orange color.

    You might also set a breakpoint where TransformCADtoActuators() is called in CCoordMotion::OutputSegment(int iseg). On this line (1930)

    if (Kinematics->TransformCADtoActuators(p->x0,p->y0,p->z0,p->a0,p->b0,p->c0,p->u0,p->v0,Acts)) return 1;

    You should then be able to step through the code, verify the correct class is being called, verify A and C are zero, and step through the math.

    In order for RTCP to work correctly a number of things need to be defined correctly. That is why I thought a diagram and a good description of how things are homed and calibrated would save time. Is your Table similar to the one in the video I posted?

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  7. #7
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Tom,

    Yes i specified the 5AxisTableAC in \Data\Kinematics.txt
    By optimisation i meant the 5 axis kinematics on XYZ axis due to AC axis rotation.

    "If the A and C axes are not at zero, then when Z moves X and Y should also move"
    I have checked that, even with AC axis set to zero in machine coordinate, the other Axis are moving automatically when i try to move Z axis.

    I will try the other things you have said and let you know what the result is.


    "In order for RTCP to work correctly a number of things need to be defined correctly. That is why I thought a diagram and a good description of how things are homed and calibrated would save time. Is your Table similar to the one in the video I posted?"
    Yes the machine is similar to the one shown in the video.







    Regards

    Amit Kumar


  8. #8
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi, Tom

    I have tried that file you sent , 5AxisTableAC class and header file.

    I built all libraries in VS 2015 and then added that class to gcodeinterpreter project and then rebuilding it.

    But after that when i am trying to move A axis and C axis, there is no movement in X, Y, Z.

    But When i move Z axis , X and Y moves

    When i move X Axis, Y and Z moves

    When i move Y Axis , X and Z moves.

    So i think the file you sent 5axisTableAC.cpp, 5axisTableAC.h are linked with wrong axis. I homed all axes machine coordinates also zero. So help me in setting below RTCP optimisation

    When i will move C, X and Y should move to maintain tool center point.

    When i will move A axes , Y and Z should move to maintain tool center point.


    Thank You

    Regards

    Amit Kumar


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

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Amit,

    I tried it here and it seems to be working properly for me.

    I built all libraries in VS 2015 and then added that class to gcodeinterpreter project and then rebuilding it.
    good.

    But after that when i am trying to move A axis and C axis, there is no movement in X, Y, Z.
    That actually should depend on where you are. If your position happens to be on the center of rotation of the A/C Axis then there should be no movement in XYZ.

    I'm thinking the wrong Kinematics Class is being selected. The behavior you are observing would occur if the CKinematics3Rod class was selected. That is the result if Kinematics is to be used but the name in the Kinematics.txt file doesn't match any of the defined types. That's why I asked you to set a breakpoint and verify the correct class is called.

    Maybe you miss typed the name in the Kinematics.txt ?? It should be 5AxisTableAC with no quotes

    Or the code change in CCoordMotion was not made correctly to select the new class. Did you miss adding an "else". It should be like:

    Code:
    		if (strstr(s, "5AxisTableAC") != NULL)
    			Kinematics = new CKinematics5AxisTableAC;
    		else if (strstr(s, "5AxisTableBC") != NULL)
    			Kinematics = new CKinematics5AxisTableBC;
    		else if (strstr(s, "5AxisGimbalAB") != NULL)
    			Kinematics = new CKinematics5AxisGimbalAB;
    		else if (strstr(s, "GeppettoExtruder") != NULL)
    			Kinematics = new CKinematicsGeppettoExtrude;
    		else if (strstr(s, "Geppetto") != NULL)
    			Kinematics = new CKinematicsGeppetto;
    		else
    			Kinematics = new CKinematics3Rod;
    On a side note I hadn't realized the code I sent has this defined:

    ASaddleZCenterpoint = 4.000; //Machine Z coordinate of A rotation axis

    This assumes the XYZ Origin is on the surface of the platen and the A rotation axis is 4 inches above that point. You will likely need to change that.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  10. #10
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Tom,

    I have noticed that i had a wrong parameter " ASaddleZCenterpoint = 4.000; //Machine Z coordinate of A rotation axis" for my machine.

    When changing that
    ASaddleZCenterpoint according to our machine, everything seems to be running fine except direction of z.

    When i am moving Z by up arrow Z is going down

    and when i am moving Z by down arrow, Z is going up.

    I tried changing outputgain to -1 or direction reverse by stepper driver. but now Z direction in kinematics is reversed.

    And i already did all the things you said before.

    So How to resolve this issue i am facing with Z direction. ????

    and one more thing
    ASaddleZCenterpoint and CTableAZeroZZero parameters and i had to change everytime i change the tool height. Is there any solution for this too????

    Thank You



    Regards

    Amit Kumar


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

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Amit,

    Set OutputGain so Z moves in the correct direction (up arrow moves Z up).

    Maybe your A Axis is reversed?

    Please provide a clear example. What is your position (all axes)? What do you command? What happens?

    Regards

    Regards
    TK http://dynomotion.com


  12. #12
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default

    Hi Tom,

    Here is the example of my axes

    My X,Y,Z axes have output gain -1. Then x and y are going in right direction, as left arrow means negative and right arrow means positive.

    For y axis up arrow means positive down arrow means negative

    For z axis up arrow means dro is increasing value but it is going in reverse direction. As it is going downwards but dro is increasing its coordinates.

    My A axes has output gain 1 and at +90 angle, working bed is visible and in -90 angle working bed is on opposite side.

    Can you help me in settings it right by sending Initspindle6axis.c in which X, Y, Z, A, C has correct settings.

    May be gain or direction settings. And tell also that what should be the direction in stepper motor amplifier.

    One more thing i wanna addup is my homing is x,y,a,c are in center is zero but for z it is z max means z is zero on top of the z height.

    Thank You

    Regards

    Amit Kumar


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

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Amit,

    My X,Y,Z axes have output gain -1. Then x and y are going in right direction, as left arrow means negative and right arrow means positive.

    For y axis up arrow means positive down arrow means negative
    That description isn't helpful. + and - normally are in terms of the tool relative to the part. I assume your table moves in X and Y? So for example pushing the right arrow key should make the X DRO become more + but the table should move to the left. Is that what is happening?

    Similarly for the "up" Y arrow, the Y DRO should become more + and the table should move toward you.

    For z axis up arrow means dro is increasing value but it is going in reverse direction. As it is going downwards but dro is increasing its coordinates
    If the Head is moving down when you push the up arrow, then reverse the Z axis direction.

    My A axes has output gain 1 and at +90 angle, working bed is visible and in -90 angle working bed is on opposite side.
    I believe what you describe is backwards. Do you understand the right hand rule? Point your right thumb in the +X direction (to the right). Your curved fingers then point in what should be the +A direction. However again this should be in relation to the tool relative to the part. Since you are moving table instead of the tool the table should move in the opposite direction.

    It helps me to think of drawing with a pen on paper. If given a command to draw a line on the paper in the +X direction, I can either move the pen to the right, or the paper to the left.

    Can you help me in settings it right by sending Initspindle6axis.c in which X, Y, Z, A, C has correct settings.
    No. That's impossible to do without all the specifics of your machine. There are many things which effect the direction. The simple thing to do is to check the direction of each axis, and if wrong, reverse it.

    Did you think 5 Axes RTCP would be easy

    Regards
    TK http://dynomotion.com


  14. #14
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Tom,

    I assume your table moves in X and Y?
    Yes it is right.

    So for example pushing the right arrow key should make the X DRO become more + but the table should move to the left. Is that what is happening?
    Slightly opposite, when i am pushing right arrow key X DRO becomes more+ but table is moving to the right.

    Similarly for the "up" Y arrow, the Y DRO should become more + and the table should move toward you.
    Again opposite for this also, for up Y arrow Y DRO becoming more + and table is moving far away from me.

    I believe what you describe is backwards. Do you understand the right hand rule?
    Yes i do understand the right hand rule.

    Since you are moving table instead of the tool the table should move in the opposite direction.
    You mean i should change the direction of A too, or A is right ????

    There are many things which effect the direction.
    What are the things which affects the direction other than Output gain and Motor stepper reversing?????

    The simple thing to do is to check the direction of each axis, and if wrong, reverse it.
    Yes i will do it.

    And here is the file i attached with init file of mine and direction i told you earlier let me know if this is right. And one more thing i want to ask is Our homing of Z is in the max so is there any way of defining homing limit when i home the machine. i mean i want to make z home to some positive coordinates that is the Z max limit. So how to do that also????

    Thank You

    Attached Files Attached Files
    Regards

    Amit Kumar


  15. #15
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Tom,

    I did what you discussed ealier on my machine.

    Now all axes are moving with respect to tool, ealier it was table.

    But now one problem i am facing is, When i am running trial runs, tool center point is maintained but it cutting direction or tool vector is not normal to the surface.

    Tool vector should be normal to the surface always while maintaining Tool Center Point in cutting operation.

    I am attaching videos of simulation in CAM program, actual run on machine, Gcode File, and post processor file.

    CAM software simulation https://drive.google.com/open?id=0B-...GN6SVNxU3NBSTA

    ACTUAL machine running https://drive.google.com/open?id=0B-...XkxTWJXV2JYUTQ

    Simulation in CAM software and machine running should be same for proper cutting in my opinion.

    So please solve this issue i am facing. In which part there is problem ?

    Thank You

    Attached Files Attached Files
    Regards

    Amit Kumar


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

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Amit,

    The 5-axes GCode from the CAM seems correct. I ran it in the KMotionCNC Viewer



    Your A Axis still seems backwards. The Table should follow the Left-Hand-Rule As I tried to explain opposite of the commanded tool orientation.

    The GCode first commands:

    N40 G0 A0. C0.

    Then:

    N65 G0 A58.922 C-124.217

    The A Axis is commanded positive so should "roll away" toward the back of the machine as the Left-Hand-Rule. But the video seems to show it rotating the opposite way to face the front. We need to fix this first.

    If that messes up the RTCP then something else must be wrong. Possibly the ASaddleZCenterpoint? What is it? Where is your Z origin?

    You asked before on setting the Z home position at the top to Z Max. You can do that with EnableAxisDest(Zaxis,ZMax); But it shouldn't really matter where the origin is as long as all positions are properly defined relative to it.

    Regards

    Regards
    TK http://dynomotion.com


  17. #17
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi, Tom

    As you said earlier i have changed my A axis by changing the direction in amplifier.

    If that messes up the RTCP then something else must be wrong
    Yes this is messing up my RTCP everything is wrong now RTCP is working wrong.

    And my settings in kinematics class are

    CKinematics5AxisTableAC::CKinematics5AxisTableAC()
    {
    CTableAZeroZZero = 0; //Machine Z coordinate of C table face when A=0
    CTableAZeroXCenterpoint = 0; //Machine X coordinate of C rotation axis when A=0
    CTableAZeroYCenterpoint = 0; //Machine Y coordinate of C rotation axis when A=0
    ASaddleYCenterpoint = 0; //Machine Y coordinate of A rotation axis
    //Set A to 90,-90 and measure the centerpoint and give result in machine coordinates
    //Ideally this is equal to CTableAZeroYCenterpoint, but reality is rarely so nice
    ASaddleZCenterpoint = 0.511811023; //Machine Z coordinate of A rotation axis
    //Use CTableAZeroZZero and the measurements from ASaddleXCenterpoint (compensated for
    //tool centerpoint) to define an arc to find the center of rotation in machine coordinate Z


    m_MotionParams.MaxLinearLength = 0.05; // limit the segment lengths for nonlinear systems
    m_MotionParams.MaxAngularChange = 0.5; // limit the segment angle change for nonlinear systems
    m_MotionParams.MaxRapidFRO = 1.0; // limit the increase in Rapid HW FRO
    m_MotionParams.UseOnlyLinearSegments = true;
    m_MotionParams.DoRapidsAsFeeds = true;

    and my z origin is on the c table in program. but in my case A axis lies 13mm above the table. So i changed the parameter ASaddleZCenterpoint to 0.511811023 inches or 13 mm

    You asked before on setting the Z home position at the top to Z Max. You can do that with EnableAxisDest(Zaxis,ZMax);
    This is done.

    But it shouldn't really matter where the origin is as long as all positions are properly defined relative to it.
    How it is possible, origin should be defined in machine coordinates before TCP. ?

    Please help me in sorting it out. i already sent initialization file. Now what changes in which program i have to make to correct RTCP.

    Thank You

    Attached Files Attached Files
    Regards

    Amit Kumar


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

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Amit,

    I didn't notice before in the video that the C axis was backwards also. Did you fix it also? I think we want both to follow the Left-hand-rule.

    Then I believe the 'a' and 'c' angles in my math are backwards. Change:

    // Determine where the commanded XYZ point will be after C rotation
    Rotate3(CTableAZeroXCenterpoint, CTableAZeroYCenterpoint, CTableAZeroZZero, x, y, z, 0, 0, c, &CP_Rotated_C_x, &CP_Rotated_C_y, &CP_Rotated_C_z);
    // Determine where the commanded XYZ point will be after A rotation
    Rotate3(CTableAZeroXCenterpoint, ASaddleYCenterpoint, ASaddleZCenterpoint, CP_Rotated_C_x, CP_Rotated_C_y, CP_Rotated_C_z, a, 0, 0, &CP_Rotated_AC_x, &CP_Rotated_AC_y, &CP_Rotated_AC_z);

    to

    // Determine where the commanded XYZ point will be after C rotation
    Rotate3(CTableAZeroXCenterpoint, CTableAZeroYCenterpoint, CTableAZeroZZero, x, y, z, 0, 0, -c, &CP_Rotated_C_x, &CP_Rotated_C_y, &CP_Rotated_C_z);
    // Determine where the commanded XYZ point will be after A rotation
    Rotate3(CTableAZeroXCenterpoint, ASaddleYCenterpoint, ASaddleZCenterpoint, CP_Rotated_C_x, CP_Rotated_C_y, CP_Rotated_C_z, -a, 0, 0, &CP_Rotated_AC_x, &CP_Rotated_AC_y, &CP_Rotated_AC_z);

    Does that fix the RTCP? If not, please provide a clear example of what happens for a simple angular move.

    Regards

    Regards
    TK http://dynomotion.com


  19. #19
    Member amitkumar171's Avatar
    Join Date
    Aug 2017
    Location
    India
    Posts
    112
    Downloads
    0
    Uploads
    0

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Tom,

    RTCP is working same as before i did , necessary change that you said earlier.

    And i want to know that , RTCP applies to Machine coordinates (Coordinates in Orange) or according to Work offsets (Coordinates in Green).

    What if i apply some fixture offsets (G54, G55 or G92)

    Does RTCP will mess up or run according to machine coordinates.?

    Thank You

    Regards

    Amit Kumar


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

    Default Re: How to setup kinematics RTCP in KmotionCNC

    Hi Amit,

    RTCP is working same as before i did , necessary change that you said earlier.
    I don't understand what that means. I believe it means you reversed the AC Axis as the Left-hand-rule and made the code changes and now RTCP is working and the Tool has the proper angle as in the CAD simulation? Could you please put more effort into your responses?

    And i want to know that , RTCP applies to Machine coordinates (Coordinates in Orange) or according to Work offsets (Coordinates in Green).

    What if i apply some fixture offsets (G54, G55 or G92)

    Does RTCP will mess up or run according to machine coordinates.?
    The RTCP math must use Machine coordinates (Orange). It needs to know absolutely where everything is in order to do the Kinematics correctly.

    However I believe Axis and Fixture Offsets should now work properly. Those are simply alternate ways to command the tool position somewhere. ie:

    Offsets zero + GCode Move to X=1,Y=1,Z=1 -> Machine Position X=1,Y=1,Z=1

    or

    Offsets X=1,Y=1,Z=1 + GCode Move to X=0,Y=0,Z=0 -> Machine Position X=1,Y=1,Z=1

    In both cases the Tool Tip should be at Machine Position X=1,Y=1,Z=1

    AC Angle changes should then keep the tool tip at the same place relative to the table platen.

    Could you try it?



    I believe Tool Offsets are a different thing. In this case the offsets need to tell the Kinematics the Tool Tip Control Point is at a different position. We need to add a few lines of code for this. I've been waiting for the basics to be working before adding this. I think you are saying they are. Please try changing/adding the red lines below.

    Code:
    int CKinematics5AxisTableAC::TransformCADtoActuators(double x, double y, double z, double a, double b, double c, double *Acts, bool NoGeo)
    {
        double CP_Rotated_C_x,CP_Rotated_C_y,CP_Rotated_C_z;
        double CP_Rotated_AC_x,CP_Rotated_AC_y,CP_Rotated_AC_z;
    
        x -= m_MotionParams.TCP_X;
        y -= m_MotionParams.TCP_Y;
        z -= m_MotionParams.TCP_Z;
    
        // Determine where the commanded XYZ point will be after C rotation
        Rotate3(CTableAZeroXCenterpoint, CTableAZeroYCenterpoint, CTableAZeroZZero, x, y, z, 0, 0, -c, &CP_Rotated_C_x, &CP_Rotated_C_y, &CP_Rotated_C_z);
        // Determine where the commanded XYZ point will be after A rotation
        Rotate3(CTableAZeroXCenterpoint, ASaddleYCenterpoint, ASaddleZCenterpoint, CP_Rotated_C_x, CP_Rotated_C_y, CP_Rotated_C_z, -a, 0, 0, &CP_Rotated_AC_x, &CP_Rotated_AC_y, &CP_Rotated_AC_z);
    
        // Translate XYZ target for AC rotation
        x = CP_Rotated_AC_x + m_MotionParams.TCP_X;
        y = CP_Rotated_AC_y + m_MotionParams.TCP_Y;
        z = CP_Rotated_AC_z + m_MotionParams.TCP_Z;
    
    
        if (!NoGeo) GeoCorrect(x,y,z,&x,&y, &z);
    
        Acts[0] = x*m_MotionParams.CountsPerInchX;
        Acts[1] = y*m_MotionParams.CountsPerInchY;
        Acts[2] = z*m_MotionParams.CountsPerInchZ;
        Acts[3] = a*m_MotionParams.CountsPerInchA;
        Acts[4] = b*m_MotionParams.CountsPerInchB;
        Acts[5] = c*m_MotionParams.CountsPerInchC;
    
        return 0;
    }
    Note that for Tool Lengths/Offsets to be active they must be enabled with G43 Hn,

    You will also need to come up with some scheme of handling tool lengths. For example change the Kinematics so the Tool Chuck does RTCP with no tool length, then enter into the tool table how far each Tool extends out of the Tool Check as its length.

    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

How to setup kinematics RTCP in KmotionCNC

How to setup kinematics RTCP in KmotionCNC