Scara with ball spline in Z,C axis

More
29 Apr 2021 15:59 - 29 Apr 2021 16:02 #207382 by nhanpham
Hi everyone!
I am new in linuxcnc and I am trying to do a scara robot..
My scara is using ball spline to control Z, C axis.
With ball spline, when the C Axis rotary will do Z-axis move.
This is an issue with scarakins kinematic.
Can you help me fix this?
If you have any ideas, I will be forever grateful!.
thank you very much!!
Last edit: 29 Apr 2021 16:02 by nhanpham.

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

More
29 Apr 2021 23:33 #207419 by andypugh
The scarkins file is here:
github.com/LinuxCNC/linuxcnc/blob/master...nematics/scarakins.c

You probably need to re-arrange the calculations in the kinematicsForward and kinematicsInverse functions. The rest of the file can probably be left as-is. Do you know C?

scarakins is a simple enough module that you can compile it standalone to suit your purposes.

modify the file then
sudo halcompile --install scarkins.c
should compile it and install it on your system.

You should probably rename the file, so that next update your kins is not overwritten by the original scarakins. If you do rename the file it is important to update line 204 to match.
The following user(s) said Thank You: nhanpham

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

More
30 Apr 2021 10:30 - 30 Apr 2021 10:33 #207436 by nhanpham

The scarkins file is here:
github.com/LinuxCNC/linuxcnc/blob/master...nematics/scarakins.c

You probably need to re-arrange the calculations in the kinematicsForward and kinematicsInverse functions. The rest of the file can probably be left as-is. Do you know C?

scarakins is a simple enough module that you can compile it standalone to suit your purposes.

modify the file then
sudo halcompile --install scarkins.c
should compile it and install it on your system.

You should probably rename the file, so that next update your kins is not overwritten by the original scarakins. If you do rename the file it is important to update line 204 to match.


Yes, I have knowledge about C and python
But I'm newbie for scara robot, I don't have knowledge about kinematic for ball spline.
I bought an old scara machine from IAI IX. I'm using linuxcnc to control it.

thank you for your help
Last edit: 30 Apr 2021 10:33 by nhanpham.

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

More
30 Apr 2021 10:47 #207437 by andypugh

But I'm newbie for scara robot, I don't have knowledge about kinematic for ball spline.


I don't really understand the problem that you are having, or why it matters that there is a ball spline.

Can you explain exactly what scarkins gets wrong for your machine?
The following user(s) said Thank You: nhanpham

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

More
30 Apr 2021 11:43 - 30 Apr 2021 11:44 #207444 by nhanpham

But I'm newbie for scara robot, I don't have knowledge about kinematic for ball spline.


I don't really understand the problem that you are having, or why it matters that there is a ball spline.

Can you explain exactly what scarkins gets wrong for your machine?


Hi,
With ball spline
- Z, C motor control the same vitme.
- When the C motor rotates then the Z-axis is changed
- When the Z motor rotates then the C axis does not change.

ball Spline Video 1
ball Spline Video 2

I added videos to describe how ball spline working

can we need a kinematic for Z and C?

Sorry for my English

thank you for your help
Last edit: 30 Apr 2021 11:44 by nhanpham.

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

More
30 Apr 2021 11:59 - 30 Apr 2021 12:00 #207446 by andypugh
In this case there is probably no need to edit the kinematics, though that is definitely one way to do it.

You can probably do it it in HAL.

I think that you just pass the C axis position to the C motor and and Z + C to the Z motor. Use the HAL "sum2" component between the motor-pos-cmd output pins and the stepgen/pid input pins of the Z motor.
Last edit: 30 Apr 2021 12:00 by andypugh.
The following user(s) said Thank You: nhanpham

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

More
30 Apr 2021 13:06 #207449 by nhanpham

In this case there is probably no need to edit the kinematics, though that is definitely one way to do it.

You can probably do it it in HAL.

I think that you just pass the C axis position to the C motor and and Z + C to the Z motor. Use the HAL "sum2" component between the motor-pos-cmd output pins and the stepgen/pid input pins of the Z motor.


it is:

loadrt sum2 count=1
addf sum2.0 servo-thread

setp sum2.0.gain0 1
setp sum2.0.gain1 1

net J2pos sum2.0.in1 <= joint.2.motor-pos-cmd
net J3pos hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-cmd sum2.0.in0 <= joint.3.motor-pos-cmd
net sum2.0.out => hhm2_[HOSTMOT2](BOARD).0.stepgen.02.position-cmd


I will test this in next week

thank you very much

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

More
01 May 2021 07:17 #207528 by newbynobi
Do you have your Scara working?
If so, please post your config, as I got the same problem on a Bosch Scara

Norbert

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

More
01 May 2021 10:14 #207539 by nhanpham

Do you have your Scara working?
If so, please post your config, as I got the same problem on a Bosch Scara

Norbert


hi, I will check it and inform to this topic next week.

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

More
03 May 2021 04:07 - 03 May 2021 04:13 #207701 by nhanpham

Do you have your Scara working?
If so, please post your config, as I got the same problem on a Bosch Scara

Norbert


Hi, you can check my config. I am testing this and it's working
loadrt sum2 count=1
addf sum2.0 servo-thread

#set gain for sum2 = in0*gain0 + in1*gain1
setp sum2.0.gain0 1
#gain1 = (gear-cAxis/gear-zAxis)
setp sum2.0.gain1 0.066667
#set Joint2 to sum input 0
net J2pos sum2.0.in0 <= joint.2.motor-pos-cmd  
#set Joint2 to C-Axis and  sum input 1
net J3pos hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-cmd sum2.0.in1 <= joint.3.motor-pos-cmd
# set SUM to Z-axis
net J2posE hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-cmd <= sum2.0.out
Last edit: 03 May 2021 04:13 by nhanpham.

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

Moderators: cncbasher
Time to create page: 0.108 seconds
Powered by Kunena Forum