Trajectory Planner using Ruckig Lib

More
09 Aug 2024 10:00 #307324 by rodw

I know I was reading a while ago that the solution for having jerk control in linuxcnc was to use some sort of mathlab algortithm to do some complex calculations, but there was a licensing problem between linuxcnc and mathlab. Since the guys from OpenCN have behind an university, they had the mathlab with an expensive license on which they were able to generate that c/c++ algorithm.
 

I'm not convinced there was really a licensing problem when I reviewed OpenCN but I can't remember the detail.
The university is obligated to release the code as open source. I could not see where Mathlab's rights were infringed if the Universities code was actually used! Anyway, we can just wait for Grotius now! :) What I find amazing is that he has taught himself how to Code in C as well as mastering the maths!
The following user(s) said Thank You: akb1212, Grotius

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

More
09 Aug 2024 10:09 #307326 by Grotius
Hi,

You maybe used the sai as "external interpreter", this sai i made some modifications, like read current plane, etc.
I had the same issue. Not reading in as should. But now it worked quite nice.

As an example original lcnc sai code for arc feed :
saicanon.cc

And edited code :
saicanon.cc

As a result i edited code in the sai to get it functional in different planes, retrieve more info etc.
I could draw the most of lcnc gcode files, also the 3d test file with circles in different planes.

Here you see how i startup the sai, read info and close it when gcode file is done.
This worked good. I had no issue's anymore. But it took a while to get everything done.
interpreter.cpp

but without spindle sync, I would make my lathe not functional.
Depending on your current distance from the centerline of your lathe, the spindle speed is adjusted.
This could be done by a component. Or is it more complex?
The following user(s) said Thank You: akb1212

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

More
09 Aug 2024 10:18 #307330 by Grotius
Hi Rod,

Thanks for your kind words! But the math at a certain level is still a problem.
I am still unable to read for example the clothoid science papers and turn them into code.

Beef is now doing his master degree. I asked him, should i go to college and get a phd ?
He said something back like, your level is already equal to phd. But i don't feel like that.
The following user(s) said Thank You: akb1212, rodw

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

More
09 Aug 2024 10:22 #307332 by vmihalca

I'm not convinced there was really a licensing problem when I reviewed OpenCN but I can't remember the detail.

Perhaps I explained wrong, from what I understood, we needed mathlab to properly solve jerk in linuxcnc, but mathlab was needed for that and we did not had the license. 
They had it and they applied it on their solution.
The following user(s) said Thank You: akb1212

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

More
09 Aug 2024 10:29 #307333 by vmihalca

You maybe used the sai as "external interpreter", this sai i made some modifications, like read current plane, etc.
I had the same issue. Not reading in as should. But now it worked quite nice.

As an example original lcnc sai code for arc feed :
saicanon.cc

And edited code :

saicanon.cc

As a result i edited code in the sai to get it functional in different planes, retrieve more info etc.
I could draw the most of lcnc gcode files, also the 3d test file with circles in different planes.

Here you see how i startup the sai, read info and close it when gcode file is done.
This worked good. I had no issue's anymore. But it took a while to get everything done.

interpreter.cpp

but without spindle sync, I would make my lathe not functional.
Depending on your current distance from the centerline of your lathe, the spindle speed is adjusted.
This could be done by a component. Or is it more complex?

Yes, I was talking about sai. The guy who developed JCNCScreen said that there are some units mm/inch hardcoded into the sai that are causing bugs and also that is quite behind the internal interpreter. I see an issue with having two different versions of interpreters. I would like to render the output of the code that will get executed. When there are fixes or changes, if the internal one changes and the external one is not kept up to date, I won't see the real thing. 

As for spindle synchronization, I am talking about threading on a lathe or rigid tapping on a mill. 
For that, on ethercat we would need to read the encoder slice from beckhoff and then sync the Z axis according to the spindle encoder
The following user(s) said Thank You: Grotius

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

More
09 Aug 2024 10:32 #307334 by rodw

Perhaps I explained wrong, from what I understood, we needed mathlab to properly solve jerk in linuxcnc, but mathlab was needed for that and we did not had the license. 
They had it and they applied it on their solution.

But they solved it and published the generated code which was all you needed.
The following user(s) said Thank You: akb1212

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

More
09 Aug 2024 10:53 #307336 by Grotius
Hi,

That inch or mm is covered here in the interpreter.cc file i showed before at this line

I see an issue with having two different versions of interpreters.
Yes, the sai didn't cover everything. But that's not a big deal. Just add some code to the sai to retrieve more info.

The guy who developed JCNCScreen
I know Reinhard. He is good coder. Did a lot off research himself for opencascade. Also on opencascade forum he asked questions.

quite behind the internal interpreter.
Dont let it sqare you. Reinhard was doing a quite diffucult job. He had not the cmake overview as i have these day's. So
he was much complaining about spagetti code i remember.

For that, on ethercat we would need to read the encoder slice from beckhoff and then sync the Z axis according to the spindle encoder
I don't fully understand yet.
The following user(s) said Thank You: akb1212

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

More
09 Aug 2024 12:28 #307352 by Grotius
I did a linuxcnc clone tag: v2.9.3
Then added : linuxcnc-ethercat and set path to halcompile, then did make, and make install.

Then edited the axis_mm.ini configuration to run with ethercat.
It's maybe unusuall to add a extra thread for the ethercat bus, but it works.

Now i can test the ethercat production machine.

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

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

More
09 Aug 2024 20:58 - 09 Aug 2024 21:26 #307386 by Grotius
Hi guys,

Tonight i did a test on the ethercat production machine, i brought a pc for the machine, pre installed linuxcnc and halcore on it.
This pc was already tested ok on the ethercat test board.

At the machine, after a while i came to the conclusion that one of the lcec output module's was broken, the stepper dir module.
altough it's brand new.  So maybe it is thanks to Stuxnet that i had so much trouble this week.

I had to drive to home again, and get a other lcec module. Then replaced it, and it worked.
But then the 24v input's where a problem. The input lights are burning on the module, but in halview, no signal is incoming.
So that's a problem i still have to solve. It was no problem for testing the machine altough.

Ok i made a few video's to show you.

The machine is never used before, and is software limited to 15000mm/min, it can run up to about 19000mm/min.
The machine has 2 x-axis motors, 1 for y, 1 for z. The machine setup is backslash free.
At the time it was configured with steppers. Nowaday's i think i would use servo's.

The machine in the workshop, the workshop i a collection of items, you see an old car in the background.
 

First video, running halcore.


Surface test.



Lcevette file milling, tiny product.
Attachments:
Last edit: 09 Aug 2024 21:26 by Grotius. Reason: removing white space.
The following user(s) said Thank You: robh, akb1212, tommylight, Clive S, tivoi, pommen, rodw, yrsiddhapura, Aciera, DHeineck and 6 other people also said thanks.

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

More
10 Aug 2024 22:56 #307445 by Lcvette
@Grotius

the model/gcode is in inches for that last video..lol  maybe try it in inch to see the correct moves?  :D :D :D

i couldn't tell if the machine was moving..lol
 
The following user(s) said Thank You: akb1212, Grotius

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

Time to create page: 0.153 seconds
Powered by Kunena Forum