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