Developments on my Home built 5C CNC Lathe - Polar interp. and Live tooling

More
15 Nov 2021 19:25 #226599 by dgarrett
added updates to clarify use of halcompile for a kinematics
module:

github.com/LinuxCNC/linuxcnc/commit/e452c3803d4
github.com/LinuxCNC/linuxcnc/commit/bbc87f960ef

$ man userkins
...
NOTES:
1 A 'dummy' pin is required to satisfy the requirements of
the halcompile utility but it is not accessible to
kinematics functions.

2 Hal pins and parameters needed in kinematics functions
(kinematicsForward(), kinematicsInverse()) must
be setup in a function (userkins_setup()) invoked
by the initial motion module call to kinematicsType().
...
The following user(s) said Thank You: NoJo

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

More
18 Nov 2021 19:39 #226911 by NoJo
Good Progress on the Lathe. The software side is about done - some refinements here and there, but in all it works well.
I have done some machining trials and the emphasis now shifts to the mechanics, setting all tool offsets correctly, getting the live tool centre height spot on with spindle height, else edges such as those of the U shapes in the photos end up offset - the X (G54) offset for the live tool is critical and has a huge effect when machining on the stock face where the live tool centre approaches the lathe spindle centre. At that point there are large C axis Theta changes for very small X axis changes. For the U, when C is near 90deg, incorrect X offsets result in bowed cut lines, etc.  My X axis home sensor - a Hall effect sensor, is inadequate - repeated home to a fixed point shows up to 0.2mm variations, so a new home sensor is needed.
The C axis encoder - a magnetic encoder, is also poor - there seems to be a nonlinearity in the pulse output train, as though the excitation magnet is not rotating about its centre. Also, the encoder provide 1024 pulses ( 4096 edges) which is 0.08deg - that with a 3 edge deadband and a 1 edge repeatability gives around 0.3deg accuracy,, which is not great for a C axis. Looking for a 2000pulse Optical encoder now...

This shows the error due to incorrect tool height - to low by 0.2mm
 

This bulge is due  to the X offset (G54) being 0.21mm to much
 

Same as above, but without the yellow lines
 

After setting tool height and X offset almost correct..
 

 

 
Attachments:
The following user(s) said Thank You: tommylight

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

More
19 Nov 2021 01:53 #226942 by andypugh
for the X axis, do you have an encoder with index on the axis? If so you can home to that after the hall switch trips, for very good accuracy.

As for the C axis, you should be able to calibrate out the nonlinearity. I am not sure if a C axis can use a screw-comp file, but if not I am fairly sure that lincurve could be used to linearise the encoder.

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

More
19 Nov 2021 05:21 - 19 Nov 2021 13:55 #226953 by NoJo
The axes motors are stepper workalikes - they are brushless motors with an integrated closed loop servo-controller using an integrated 6200 pulse encoder which I believe does have an index segment but the encoder outputs are not available outside the motor - the control loop is closed internally. Motors are Clearpath SDSK series. In later versions of the motor firmware Clearpath provides a programmable output that can be set to show an equivalent of your concept ( they call it 'Precision homing), but my motor lags in version and appears not to be upgradeable. A new motor is around $350 - I think a better home sensor may be more economical in this case

Problem with linearising the C encoder is how to measure the actual angle during the process - I have good met. equipment for linear motion, not rotary.

EDIT - I am going with your idea - attached a single slot disc on the X motor shaft, with a slotted optical detector.
Last edit: 19 Nov 2021 13:55 by NoJo.

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

More
20 Nov 2021 10:29 - 20 Nov 2021 16:26 #227073 by NoJo
Seems this might not be so simple.
I have fitted the external index only disc and sensor and feed the sensor index detect signal to the 7I76 di14 input.
Since my servos are internal-closed loop, with no external encoder or index, connection are not defined in the HAL file to joint.n.index-enable from the encoder.n.index-enable for this ( or any) axis.

Can I just define these or is Linuxcnc now going to expect to close that stepper control loop itself, since an encoder is now sort of defined?

EDIT:
Not the way to do this - Cannot define another encoder anyway - the 7i76 has only one encoder input which is currently for the Caxis/Spindle. Probably going to do my own Homing Component to home X using the index edge as a simple discrete input.


Does anyone know if there is a Bit file for the MESA 7I76D to implement Stepgen Indexes? I have found various references to this being needed to use Homing with index without additional encoders available.
 
Last edit: 20 Nov 2021 16:26 by NoJo.

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

More
21 Nov 2021 18:33 #227217 by andypugh

Does anyone know if there is a Bit file for the MESA 7I76D to implement Stepgen Indexes? I have found various references to this being needed to use Homing with index without additional encoders available.

 

You need both to be using the correct firmware _and_ to be using the LinuxCNC development version to be able to use stepgen index. 

The 7i76D is a largely passive device, you would need to fine a 5i25(?) firmware with the stepgen index. 

Looking in the latest 5i25 firmware package the only pinout files that definitely contain a stepgen index are:
PIN_SVST8_4IM2SI_72
PIN_7I96_StepIDXD_51
And the latter only appears to offer an index on stepgen.0. 

It might be mechanically difficult to offer a stepgen index with a 7i76 as it does not offer very many input pins direct to the host FPGA. The GPIO on-board is serially-addressed and so isn't directly visible to the FPGA itself in the way that hardware pins are. 

I suggest asking Mesa.

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

More
21 Nov 2021 19:42 #227224 by NoJo
Thanks Andy. Sorry, slipped up in my info there - I have the 7i92 with the 7i76 as the I/O part, so the bit file would be for the 7i92.
I think that route is becoming a little obtuse now...For kicks we made a few small changes/addition in source to implement the homing with index - moves to limit switch as normal, then moves till off limit and then look for index at low velocity.
that works so well, I might just compile and leave it like that. Dial gauge shows less that 1/3 of a 0.01mm division variation over a dozen home sequences. To progress with the rest, X homing stays like that for now!
The following user(s) said Thank You: tommylight

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

More
24 Nov 2021 12:14 - 24 Nov 2021 18:45 #227497 by NoJo
PLEASE IGNORE THIS ISSUE. I see my mistake was to not install all the .deb files

I have built a Debian Package and installed it on my machine. I have however lost halcompile in the process - if I try run halcompile I get a message indicating the the command cannot be found.

The steps I went through to do the Debian Install are as follows:
sudo apt-get install dpkg-dev
cd linuxcnc-dev/debian
> ./configure uspace
> cd ..
dpkg-buildpackage -b -uc

At this stage, halcompile was still working
>sudo apt install ../linuxcnc-uspace-dev_2.9.0~pre0_amd64.deb 

Hereafter halcompile is no longer available.
I assume the .deb I have installed does not include halcompile? Please could you let me know how to adjust my process above such that the .deb does include halcompile
Last edit: 24 Nov 2021 18:45 by NoJo. Reason: Problem found

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

More
24 Nov 2021 22:49 #227541 by andypugh
I have not had this problem. 

it's possible that your build created a linuxcnc-dev deb too. Do you see one? (also docs debs and c headers) 

 

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

More
25 Nov 2021 07:35 #227562 by NoJo
Thanks Andy. I have sorted the issue. As you suspected, there was a linuxcnc-dev deb as well which I had not installed. So installing that sorted the non-availability of halcompile. There is also a linuxcnc-dbgsym deb which I have installed - not sure if it is needed

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

Time to create page: 0.158 seconds
Powered by Kunena Forum