586,149 active members*
3,633 visitors online*
Register for free
Login
Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2015
    Posts
    11

    4th tangential axis

    Hi im using dynomotion controller (Kanalog and Kflop) to build a cnc 5 axis machine
    i changed the Kinematics file to get corrections X Y and Z when moving A and B angles to remain in the same point
    i also changed A and B angle to become theta and phi while in motion
    my final step is to get the A axis to move tangentially on a curve or circle without telling it inside the Gcode
    for exemple :

    G0 X0 Y0 Z0 A0 B0
    G0 X-10
    G2 X0 Y10 R10 A90

    in this case the A goes from 0 to 90degrees as wanted tangential to the arc of circle but i want to do it without telling the A motor inside the gcode
    can anyone help
    thanks

  2. #2
    Join Date
    May 2006
    Posts
    4045

    Re: 4th tangential axis

    Hi Charbely27,

    Could you explain what you mean by: "changed A and B angle to become theta and phi".

    There is an "Arcs to Segs" option that will convert arcs to small segments based on the Collinear Tolerance that may help. In this case your Kinematics will be called for many points along the arc instead of just the endpoints.
    Tool Setup Trajectory Planner

    HTH
    Regards
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Sep 2015
    Posts
    11

    Re: 4th tangential axis

    Hi Tom thanks for your reply
    yes i think arcs to seg will help me i will try to use it
    i changed my motor A and B to phi and theta ( spherical coordinates )
    if i move B 25 degrees it becomes phi, i can move A from 0 to 360 while rotating around the z axis.
    Thank You
    Kind Regards

  4. #4
    Join Date
    Sep 2015
    Posts
    11

    Re: 4th tangential axis

    Hey Tom ,
    Can You Please Explain how can i get x's and y's of each segment in the kinematics file so i can make a correction for the angle using atan ( y1-y0)./(x1-x0) x0 and y0 being the begining of a segment and x1 y1 being the end of that segment in order to get a correction for the A angle along the arc
    thanks

  5. #5
    Join Date
    May 2006
    Posts
    4045

    Re: 4th tangential axis

    Hi charbely27,

    Sorry for the delay but this seems much more complicated than I originally thought. Original GCode segments (and arcs) are subdivided, smoothed (deleted), inserted (rounded), etc until we finally have the defined path that the Trajectory Planner will use to plan all the accelerations and velocities for the path while keeping all actuators within constraints. It isn't clear how you want to handle the angles. Do you wish them to be totally excluded from the GCode and always computed based on the path tangent? Or do you sometimes want to control the angle based on pure angular movement? It seems like that would be required to get things oriented to begin and after transitions.

    A problem arises when we have something like a square in XY. If we just set the angle to the tangent of the path we will have a discontinuity when the tangent angle jumps 90 degrees. I'm thinking to have the angle linearly transition form the previous tangent angle to the current segment tangent angle over the current segment. Not exactly correct, but if the segments are small the angular rotation should mainly occur in the corners. If the corners are "rounded" with even smaller angles and shorter segments then the result should be reasonable.

    Attachment 308142

    Do you have any thoughts on this? Comments welcome

    Regards
    TK
    http://dynomotion.com

  6. #6
    Join Date
    Sep 2015
    Posts
    11

    Re: 4th tangential axis

    Dear Tom,
    to start from the beginning, I have done corrections to the motion so when i move A-axis or B-axis, three corrections gets involved so that the tip of the nozzle remains at the same place.
    in addition to that, i changed my A and B angle from simply the rotation of the motor to spherical coordinates so now when i have for example B = 25 ( 25 degrees from the Z-axis which is phi )
    i can rotate A from 0 to 360 (which is theta ) while the tip of the nozzle remains in the same place, this way ill be getting a cone.
    those formulas where added to TransformCADtoActuators and TransformActuatorstoCAD in the kinematics.cpp file.
    my next step is to try and get my machine to cut a curved path that contains arcs and segments without the need to give the angles inside the Gcode, for exemple i can get my phi to 25 and my theta should change accordingly so that the tip of the nozzle stays tangential to the path,
    so for testing purposes I'm trying a quarter of a circle, it goes from the (0,0) in the XY plane to (50,50) with B=25 degrees,
    so A starting from 0 deg should end at 90 degrees
    in normal Gcode this would be easy by writing G2 X50 Y50 A90 but i want to do it without adding the angle because later ill be having multiple curves that i don't know the angle used,
    after i contact you, i started my research on ARCSTOSEG, i enabled it inside the settings and tried to see the behavior of the two functions above by printing x and y at each call of the functions,
    i tried to add a correction A at each call which is equal to arctan(y1-y0)/(x1-x0) which give the slope and add 90 or -90 to it so i can stay perpendicular to the path depending on direction of motion
    the correction gave good results while printing it it goes from 0 to 90 in both functions, but upon trying to add it the functions the machine just quickly moves and the axis gets disbaled.
    im still working on it,
    I hope this answers the first part of ur post, if anything is unclear kindly inform
    in regards to the second part, i agree for using this method should be okay but i'm currently working on the arcs alone.
    ill let u know if something new comes up
    thanks so much for your time
    Kind Regards,
    Charbel Y

  7. #7
    Join Date
    May 2006
    Posts
    4045

    Re: 4th tangential axis

    Hi Charbely,

    I was thinking you might add a new function call of Kinematics->ComputeAnglesOption(i) into the CCoordMotion:: DoRateAdjustments function (see code fragment below). The DoRateAdjustments function is executed after the trajectory segments have been finalized in the sense that they will no longer be split, deleted, or moved. The XYZ path has already been finalized but the motion trajectory has not yet been planned. It then examines each i'th segment to determine the kinematic actuator limitations on velocity and acceleration based on the direction and "curvature" (direction change from the previous segment). The Trajectory structure for the i'th segment can be referenced with GetSegPtr(i). The trajectory structure (SEGMENT) contains the starting and ending point of the segment so the tangent angle could be computed. The a0 a1 values could be modified to perform the angular rotation from the previous angle to the tangent angle as I described in the previous diagram. ComputeAnglesOption would be a virtual function where each Kinematic subclass could do whatever it wants including nothing as defined in the base class. The rate adjustments would then be subsequently performed that would include limiting the motion to avoid exceeding any actuator constraints including the A axis. I'm not sure what other issues would need to be handled but that seems like the best approach to me.


    Code:
    // limit speeds based on proportion in that direction
    
    int CCoordMotion::DoRateAdjustments(int i0, int i1)
    {
    	double tdx,tdy,tdz,tda,tdb,tdc,rate,FeedRateToUse,Accel,AccelToUse;
    	
    	for (int i = i0; i<=i1; i++)
    	{
    		if (i>=0)
    		{
    			SEGMENT *s=GetSegPtr(i);
    
    			if (Kinematics->ComputeAnglesOption(i)) return 1;
    
    			CalcBegDirectionOfSegment(s, tdx, tdy, tdz, tda, tdb, tdc);
    HTH
    Regards
    TK
    http://dynomotion.com

  8. #8
    Join Date
    Sep 2015
    Posts
    11
    Hey tom
    Thanks for your time
    What ive been trying to do lately is add a correction to the a angle (theta in spherical coordinate ) in the transformcadtoactuators function by using atan(y1-y0)/(x1-x0) x0,y0 being the first point called and x1,y1 the point after it
    So if i am at a certain point, i can draw an arc and follow it
    Ive been having 2 problems
    Imagine im at (200.200) i want to draw an arc quarter of a circle to 0,400 this means my radius is 200
    So A must go from 0 to 90 in order to stay tangenitial to the path at a certain angle phi.
    I successfuly done this but without the last point so my angle is going from 0 to 89.5 for example.
    I noticed that the function is being called twice with the same coordinates
    So im getting two equal consuctives angles
    Is there a way to know who is calling this function at this moment and to know how many times it is being called to add a condition when a certain i is reached to get from 0 to 90
    The other main problem is
    Imagine im going from (160.320) to (0,400) so im not drawing a arc that start from theta = 36 and not theta = 0
    In this case my angle has to go from 0 to 36 in a very short time and continue from 36 to 90
    If i do this my axis get disabled because im not able to go from 0 to 36 in this short time
    What im thinking of as a solution is to add a condition if the correction is different then the starting angle to set the angle to 36 and then draw the arc
    In oder to do this i must know also who is calling the function transfocadtosctuators to return a certain value to it and add a code to move a to that starting angle
    What are your thoughts
    Thanks

  9. #9
    Join Date
    May 2006
    Posts
    4045

    Re: 4th tangential axis

    Hi Charbely,

    That all makes sense and I don't have any easy answers. The TransformCADtoActuators gets called from different places and I think too late (after everything has been planned) to do what you need to do. You seemed to ignore my suggestion of adding the function ComputeAnglesOption(). That function will have access to the segments so it should be able to compute the tangent to the segment and and the previous segment's tangent angle so it won't do the angle change instantly (as shown in the earlier diagram) and cause your axis to disable.

    We're trying to get a new test Version out soon. We'll try to include that function as a stub.

    Regards
    TK
    http://dynomotion.com

  10. #10
    Join Date
    May 2006
    Posts
    4045

    Re: 4th tangential axis

    Hi Charbely,

    See this post for the Test Release

    http://www.cnczone.com/forums/dynomo...ml#post1850380

    which has the call to the new function:

    if (Kinematics->ComputeAnglesOption(i)) return 1;

    which may help you. Let me know if you are able to get the code to run under VS2015 and are able to step into this function.

    Regards
    HTH
    TK
    http://dynomotion.com

Similar Threads

  1. 4th axis tangential
    By charbely27 in forum Tormach Personal CNC Mill
    Replies: 2
    Last Post: 02-10-2016, 08:09 AM
  2. Rubber cut with tangential knife
    By limacchina in forum Uncategorised WoodWorking Machines
    Replies: 1
    Last Post: 12-03-2012, 11:05 AM
  3. Tangential machining possible ???
    By altair in forum SprutCAM
    Replies: 6
    Last Post: 10-28-2011, 01:16 PM
  4. Tangential Knife Setup Help !!!
    By Clax in forum Mach Software (ArtSoft software)
    Replies: 0
    Last Post: 11-11-2009, 03:42 PM
  5. Add a tangential knife option
    By avengine in forum Community Club House
    Replies: 3
    Last Post: 04-13-2006, 12:40 PM

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
  •