How would you design a real time application for cnc control in c / c++ ???

More
16 Feb 2021 15:39 #199074 by aleksamc
I am not competent in such matters

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

More
16 Feb 2021 19:27 #199099 by TheRoslyak
Sorry for repiat
Hi everybody.
I'm ashamed of Grotius leading a topic on the forum forum.linuxcnc.org/27-driver-boards/4031...on-ethercat?start=40
And he gave me a link to his project and I try to build them.
I settled on an error. But "iso live-image-amd64.hybrid.iso, 3.275Gb" is broken.
Can you give me this iso or give advise to fix it?
Attachments:

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

More
11 Mar 2021 08:09 #201782 by TheRoslyak
I managed to build my own program. But I still couldn't start Skynet. All libraries seem to be installed, but some functions do not work
Attachments:

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

More
11 Mar 2021 21:42 #201872 by Grotius
Hi,

I settled on an error. But "iso live-image-amd64.hybrid.iso, 3.275Gb" is broken.
Can you give me this iso or give advise to fix it?


There is still a good iso on github for download. But there is a more recent one that takes some more time to download and
install, but is slighty better :

If you take a look here , you will be able to compile a program.
Take a cup off coffee. It will take some time.

At your previous picture the INCLUDEPATH+= => then the opencascade filepath name looks not right to me.
I think that's all.

At the moment i am building a new iso release for Debian 11 Bullseye. This is not easy, but step by step we go on.
There is a bug in the Debian live-build repository system. I finally managed to get a workaround.

I have managed to compile linuxcnc on it. The compile slogan is excluding gtk2. Gtk2 is lost on Debian 11.
Ethercat hg bus is working. Qt works, Opencascade Cad and Kdl Kinematics all work.

I did not get the dpkg-buildpackage program to make a linuxcnc deb package. I tweaked the script a little bit. But not enough.
I think i will make a deb package with another system that does not care about old dependencies, like python2.

And linuxcnc ethercat i have not done. A lot of work to do.
But Debian 11 Bullseye seems to perform slightly better for gaming then Debian 10 buster following a youtube video advice.

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

More
11 Mar 2021 22:28 #201890 by newbynobi
I think I am drunk, I see strange symbols on my screen B) :laugh: :P
The following user(s) said Thank You: Grotius

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

More
13 Mar 2021 09:41 - 13 Mar 2021 09:43 #202077 by TheRoslyak
Thanks for the answer.
What about

At your previous picture the INCLUDEPATH+= => then the opencascade filepath name looks not right to me.
I think that's all.

I do not think so. I try to use include opencascade 7.4.0 and 7.5.0 it turns out the same error.
If I comment out this line - it gives errors related to "opencascade".
I will try to install using the "skynet-software" guide and find what I have not installed.

As for the work of "skynet" and "STUXNET_Cascade". I do not understand where the discretization of coordinates occurs. Like it is done on linuxcnc. This is done in the basic soft that I build or should I correctly write * .hal.
Last edit: 13 Mar 2021 09:43 by TheRoslyak.

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

More
13 Mar 2021 11:33 - 13 Mar 2021 11:43 #202086 by Grotius
Hi,

There are differences in the opencascade library's. The one i provided with the distro is tested with the distro. If you install other opencascade libraries or versions you could end up with errors. On github mr. tpaviod is working on the library's.

I will try to install using the "skynet-software" guide and find what I have not installed.
This distro has is own opencascade library attached in the iso 2 archive. Do not us other libs unless you know what you are doing.

This is done in the basic soft that I build or should I correctly write * .hal.
If you can do it in hal by a component, do that.
If you need to do complex coordinate interpolation that needs a extern c++ lib, you can not do this in hal. Then you write it with Qt.
Your motion update time is then slower that when running a hal kernel module.

If you have a machine with a working linuxcnc motion planner, for example deltakins, gensterkins, etc.
You can import the encoder feedback values into a qt application to visualize the current machine position with opencascade cad.
Last edit: 13 Mar 2021 11:43 by Grotius.

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

More
16 Mar 2021 09:29 - 16 Mar 2021 09:32 #202460 by TheRoslyak
Ok. You mean I have to use
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
in hal? If in short)
Last edit: 16 Mar 2021 09:32 by TheRoslyak.

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

More
30 Mar 2021 12:54 - 30 Mar 2021 12:55 #204117 by TheRoslyak
Hi Grotius
I was able to run Skynet . To my disappointment, it turned out to be not quite what you showed in the last pictures.)
If you can to get last version of Skynet (like on 1 pic) I would be thankful
I still do not understand how to start coordinates on RT. May be the latest version has what I need there
Attachments:
Last edit: 30 Mar 2021 12:55 by TheRoslyak.

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

More
30 Mar 2021 13:10 - 30 Mar 2021 13:28 #204118 by Grotius
Hi,

I was able to run Skynet .
That is good new !!

Maybe you missed something no notice.

On the release page, there are about 20 releases.
One of them is your picture. This release can load multiple project's. So you have to load
2 projects in total to get it as the picture shows.

The code for loading multiple projects in the same environment this more complex then the last release. You will see this.
Everything that is loaded is stored in std::vector containers.

Every release has a zip file. Every zip file has different source code.
The containing zip file does (most of the time) match the preview picture of the release.

So you have to search trough the releases, you have to download the zip and see what's in.

About the rt coordinates. The last release is quite small coded (better to understand), but has the best rt performance.

The timer setup is quite different there. It calculates position on the current time. If a cycle takes longer time to calculate,
the steppers seems to perform better this way.

In other examples the rt performance is lower. I tested all the examples with a hardware test setup to see the motor performance.

I still do not understand how to start coordinates on RT
You mean start the robot to move in automode? In the last release there is a start button wich will execute
a few motion movements. There is been tested with s-curve motion profiles. But still the code is not finished.

There are improvements to do for motor acc-dcc ratio calculations when the robot is doing a G1.
To keep the tcp exact on the path. You will problably not notice this difference by eye. But it is something to mention.

The perfect solution would be bringing the kdl into a kernel module. But that would be much work.

I hope my above comments will help you further in the process.

Load multiple robots :
github.com/grotius-cnc/Skynet_Robot_Cont.../releases/tag/1.0.14
github.com/grotius-cnc/Skynet_Robot_Cont...ad/1.0.14/Skynet.zip

This one is more advanched with workpiece roll pitch yaw.
github.com/grotius-cnc/Skynet_Robot_Cont.../releases/tag/1.0.17
github.com/grotius-cnc/Skynet_Robot_Cont...ad/1.0.17/Skynet.zip

Don't get lost in the code complexity !
Last edit: 30 Mar 2021 13:28 by Grotius.
The following user(s) said Thank You: thefabricator03, TheRoslyak

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

Time to create page: 0.109 seconds
Powered by Kunena Forum