TCP 5-axis kinematics

More
17 Jun 2019 18:53 #137144 by jsskangas
Replied by jsskangas on topic TCP 5-axis kinematics
Mine is fully working 5-axis switching kinematic machine.
I use M128 and M129 user M command to switch TCP on/off.

Please Log in or Create an account to join the conversation.

More
17 Jun 2019 18:58 #137145 by jsskangas
Replied by jsskangas on topic TCP 5-axis kinematics
Hello 3D-Master

Machine zero is machine zero and you should not change its place, for that you have G54-G59 zero points.

You need to zero machine with index pulse from encoders.
this way you will get correct machine zero.

then you always know where your rotary center is and you can use parameters to tell to kinematics.



Zero point can not

Please Log in or Create an account to join the conversation.

More
18 Jun 2019 15:42 #137200 by pl7i92
Replied by pl7i92 on topic TCP 5-axis kinematics
on a 5 axis there is only the tool length that cananges
there is no part zero
as the postprocessor refers to mashine ZERO
thats the same as G54
X center C table G53 eq G54-G59
SAME on Y
Z is ON MY MASHINES calibrated to 100mm from AC hight
the TOOLs are Mesurerd against this to the AC
A is horizontal with -15 +95 WAY movement
C is zero to a precise switch and the encoder Index

so all is only one coordinate there is NO part Touch off AT all
partzero is Bottom MID point

if you use a 4Axis G-code eighter A is fixed to Zero or 90 deg depending on part
i use a Different Config depending on part

Please Log in or Create an account to join the conversation.

More
18 Jun 2019 21:07 #137230 by 3D-Master
Replied by 3D-Master on topic TCP 5-axis kinematics
@pl7i92

of course 5 axis machines have Part zero
also Machine zero is not the same as G54, because G54 is the part zero.
"X center C table G53 eq G54-G59" Only if the machine zero is at the center of rotation AND you have set G54-G59 without offset.

this way you are limited to "having to perfectly align a part respectively to the CAM part", which we want to avoid.

@jsskangas

yes, what i ment was to use parameters from the .var file to dynamically change the center of rotation point. The machine zero might be just slightly off the real center of rotation point so the part will be inaccurate to a degree. So you could probe the real center of rotation, feed the X,Y,Z values to the .var file and the kinematics module will read those values. I think this is what industrial controllers like Heidenhain do. Also if it is possible to do it like this, you could set the machine zero at Z-Max or wherever you want to.

I hope you understand what i mean

Please Log in or Create an account to join the conversation.

More
18 Jun 2019 21:18 #137231 by jsskangas
Replied by jsskangas on topic TCP 5-axis kinematics
This is the case. my machine zero is far away from rotary center.
My machine zero is at tool change position and following parameters will tell kinematics where rotary center is located.

setp XYZBCsmkins.X-rotpoint 102.8505
setp XYZBCsmkins.Y-rotpoint 0.0968
setp XYZBCsmkins.Z-rotpoint -455.3930


Also zeropoint used in operation can be set to part.
with this kinematics zeropoin does not need to be located in rotary center.
The following user(s) said Thank You: 3D-Master

Please Log in or Create an account to join the conversation.

More
18 Jun 2019 21:49 #137232 by 3D-Master
Replied by 3D-Master on topic TCP 5-axis kinematics
i have not actively followed this thread, does switching kinematics now work when rotarys are not at zero? Also this is for 2.8 right? can you change the centerpoint position values on the fly without restarting the machine? could you maybe, when you have time, upload the newest machine files?

thanks

Please Log in or Create an account to join the conversation.

More
19 Jun 2019 20:29 #137306 by Hakan
Replied by Hakan on topic TCP 5-axis kinematics
I am also interested in the current status.
Especially around the shifting of kinematics at arbitrary position.
Is that real now?

Please Log in or Create an account to join the conversation.

More
19 Jul 2019 14:31 - 29 Aug 2019 17:31 #139881 by plopes9000
Replied by plopes9000 on topic TCP 5-axis kinematics
I too have joined the club of getting TCP to work and be practical in LinuxCNC.

I have read this thread and looked at the code/configs of jsskangas and automata/r.lol.
In my view the switchkins approach is sound and its working.
jsskangas approach to include the rotary axis machine coordinates in the kinematics calculations is key to make it practical to use.

Since I wanted to get the latest dev branch, I actually retrofitted the switchkins branch changes into the 2.9pre dev branch.
Key topics:


1) change the switchKins kinematics to take into account the machine coordinates of the rotary axis - see switchKins.c attached.
net :tool-offset motion.tooloffset.z xyzac-trt-kins.tool-offset
setp xyzac-trt-kins.y-offset -0.15
setp xyzac-trt-kins.z-offset -27.59
setp xyzac-trt-kins.x-rot-point 407.565
setp xyzac-trt-kins.y-rot-point 154.229
setp xyzac-trt-kins.z-rot-point -228.145


2) Improve my machine homing precision
This was not straight forward since my servo drive's connector and function to output the zero pulse are busy with the linuxcnc step/dir pulses and I certainly did not want to install additional encoders. I could use a different servo drive connector with 24V step/dir inputs but the frequency limit would go from 1MHz to 250KHz and I would need to fab a 5V differential (mesa 7i76) to 24V single ended circuit. Since I already use CanOpen over Ethercat for the servo drives and that gives me access to the motor rotary position - which is derived from the servo drive known absolute rotary position - I decided to write a small component to calculate the zero pulse.
net x-axis-zero-pulse-zero-pulse x.zero.pulse.zero-pulse <=> joint.0.index-enable
net x-axis-zero-pulse-rot-pos    x.zero.pulse.rotary-pos <= lcec.0.EL6751-CanOpen.x-rot-position
component axiszeropulserotposition "generate axis zero pulse from axis rotary position";

//---------------------------------------------------------------

pin io bit zero_pulse "generated rotary zero pulse";
pin in  u32 rotary_pos "axis rotary position";
param rw u32 deadband=10000 "axis rotary position deadband";
variable u32 old_rot_pos=0;
variable int old_dir=0;
variable int pulse_started=0;

//---------------------------------------------------------------

function _;
license "GPL";

;;

FUNCTION(_)
{
  u32 new_rot_pos = rotary_pos;
  if (new_rot_pos != old_rot_pos) {
		int new_dir=0;
		int over_deadband=0;

		if (new_rot_pos<old_rot_pos) {
			new_dir=-1;
			over_deadband=(old_rot_pos-new_rot_pos)>deadband;
		} else if (new_rot_pos>old_rot_pos) {
			new_dir=1;
			over_deadband=(new_rot_pos-old_rot_pos)>deadband;
		}

		if (over_deadband) { // skip 'deadband' size jumps in any direction
      if (zero_pulse && old_dir && new_dir && old_dir!=new_dir)
         zero_pulse = 0;
	 	  if (new_dir) { // exclude same reading cases
	 	    old_dir = new_dir;
        old_rot_pos = new_rot_pos;
      }
    }
  }
}

However the LinuxCNC index homing procedure assumes that the sync is done with an encoder that resets its position and counters upon seeing the zero pulse. For that reason I had to change emc/motion/homing.c to keep using the offsets.
case HOME_SET_INDEX_POSITION:
		/* This state is called when the encoder has been reset at
		   the index pulse position.  It sets the current joint 
		   position to 'home_offset', which is the location of the
		   index pulse in joint coordinates. */
		/* set the current position to 'home_offset' */
		joint->motor_offset = -joint->home_offset;
		joint->pos_fb = joint->motor_pos_fb -
		    (joint->backlash_filt + joint->motor_offset);
		joint->pos_cmd = joint->pos_fb;
		joint->free_tp.curr_pos = joint->pos_fb;


		// PL ++
		/* this moves the internal position but does not affect the
		   motor position */
		offset = joint->home_offset - joint->pos_fb;
		joint->pos_cmd += offset;
		joint->pos_fb += offset;
		joint->free_tp.curr_pos += offset;
		joint->motor_offset -= offset;
		// -- PL

		/* next state */
		joint->home_state = HOME_FINAL_MOVE_START;
		immediate_state = 1;
		break;

Finally, see attached test gcode file and video.
Attachments:
Last edit: 29 Aug 2019 17:31 by plopes9000. Reason: updated component axiszeropulserotposition

Please Log in or Create an account to join the conversation.

More
19 Jul 2019 15:22 #139886 by andypugh
Replied by andypugh on topic TCP 5-axis kinematics
Do you think this is generalisable? ie are there machine-specific constants compiled in to the kinematics? If it could be considered a generalisable kinematics then there might be an argument for building it in to LinuxCNC.

Please Log in or Create an account to join the conversation.

More
19 Jul 2019 15:25 #139887 by andypugh
Replied by andypugh on topic TCP 5-axis kinematics

plopes9000 wrote: Since I already use CanOpen over Ethercat for the servo drives and that gives me access to the motor rotary position - which is derived from the servo drive known absolute rotary position - I decided to write a small component to calculate the zero pulse


Are you aware that LinuxCNC now supports absolute encoders for homing?
linuxcnc.org/docs/2.8/html/config/ini-co...t__lt_num_gt_section
(HOME_ABSOLUTE_ENCODER)

Please Log in or Create an account to join the conversation.

Time to create page: 0.215 seconds
Powered by Kunena Forum