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

More
22 Apr 2021 07:55 - 22 Apr 2021 07:59 #206774 by TheRoslyak
Hi Grotius.
Can you help with creating a simple QML project with opencascade?
I figured out a bit with your work and was able to import my models, but I cannot find simple examples: How to use opencascade with QML (On Linux!)
Last edit: 22 Apr 2021 07:59 by TheRoslyak.

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

More
22 Apr 2021 12:31 #206791 by Grotius
Hi,

Can you help with creating a simple QML project with opencascade?
I think opencascade is not used with qml until today.
What i can do for you is take a look. But don't expect i will do it today. ;)

First thing to do for me is to compile the latest opencascade libs into .deb archives for the linux pro version.
After that i can start a qt qml project and see what happen's. I did some qml with android app's before. qml is handy
for web app's.

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

More
22 Apr 2021 13:53 - 23 Apr 2021 07:55 #206796 by TheRoslyak

I think opencascade is not used with qml until today.

github.com/ShabalinAnton/opencascade_qml This person did it but project is for windows.
Thanks in advance.)

And one moment. May be you know how to fix it.
I make a model in Solidworks and save in *.step. If I try to open by "OpencascadeWidget->Readstepfile" - It does not open.
Then I open my model in Freecad and save *.step. It open but with small crosses.
Attachments:
Last edit: 23 Apr 2021 07:55 by TheRoslyak.

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

More
22 Apr 2021 18:17 #206824 by Grotius
Ok. Thanks for the info. Will let you know.

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

More
23 Apr 2021 11:32 #206863 by udoS
Hi Grotius

Remember: 1. At some point lcnc will become slow, after multiple command's. Like overloaded. Maybe you can trigger this problem, and report back at some time.

If you just want to have a look at these screen-shot.
Shows IPCS calls.
Attachments:

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

More
23 Apr 2021 11:41 #206864 by udoS
I did not look it up in your app just yet
(hell of a job by the way; Where did you find all that info about the nml's. AND the TIME)
I guess you know better where you make this calls to the shm. Something connects but does not release.
So mem usage is building up and finaly ....buuummmmm. loi

Best Regards

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

More
23 Apr 2021 19:06 - 23 Apr 2021 19:29 #206885 by Grotius
Hi TheRoslyak,

You mean something like this?

It was a hell of a job.
I had to re-#define opengl stuff.

c++ program version
github.com/grotius-cnc/Linux-Embedded/re...cascade-cplus.tar.gz

qml program version
github.com/grotius-cnc/Linux-Embedded/re...encascade-qml.tar.gz

I have tested above code with new pre-compiled library's i made earlyer today, you can install them from the linux-pro repository :
opencascade.deb => sudo dpkg -i opencascade.deb
github.com/grotius-cnc/Linux-Pro/release....0.0/opencascade.deb

kdl-kinematics.deb => sudo dpkg -i kdl-kinematics.deb
github.com/grotius-cnc/Linux-Pro/release...0/kdl-kinematics.deb

If you wanne be a linux-pro some day B)
sourceforge.net/projects/linux-11-pro/




Redefined stuff :
Warning: Spoiler!
Attachments:
Last edit: 23 Apr 2021 19:29 by Grotius.

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

More
23 Apr 2021 19:11 #206886 by Grotius
Hi Udos,

(hell of a job by the way; Where did you find all that info about the nml's. AND the TIME)
Just take a look into the /src/ dir.
About time i have a nice story to tell. Will let you know soon.

I guess you know better where you make this calls to the shm. Something connects but does not release.
I don't know at the moment. I agree, something connects. If you try using only halcommand's then it is not happening i guess?
Can you try that?
Then if you look into the halcommand c++ code in the project, maybe you can see the difference.

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

More
26 Apr 2021 22:36 - 26 Apr 2021 22:45 #207177 by Grotius
Hi,

I managed to get a realtime path controller working.
This is one piece of a bigger project. Last week i did finalize the s-curve.

It works more or less like a video player, but then with 1000 frames (position line's) a second.
It took me quite a while to make the code.

It uses textfiles as input. Each textfile is about 1000 lines, this may be less or a few more.
Then each textfile has data for 1 sec robot or machine movements when it contain's 1000 lines.
It's not fixed, but may vary.

The program can do :
1. Start, Stop, Pause, Resume.
2. Forward, Reverse, from Start & Resume.
3. Run from line forward or reverse.
4. Run at 1ms realtime. Or run slower user defined.

The program spec's :
One vector string buffer
Can load text files and can create test files
It is compiled as shared library .so file and inserted as widget.
It uses detached thread's and chrono timers.

Goal :

1. Preprosessing:
If the robot path (gcode, points, 3d arc's or whatever) is pre-processed trough the kinematics library, we then pre-process the output
trough the s-curve path planner to get super nice moves.
After that the 1ms textfiles are processed. (Imagine a video file of 115Mib for one hour robot moves.)

2. When the pre-processed data is completed, and eventually checked by the user in the opencascade cad viewer, we may have
confidence.

3. Then this controller can be used to play the motion in realtime on a real machine trough hal. (hardware abstract layer).
4. Beside this controller there can be made a "teach in" and "jog" widget.
5. The teach in mode can be a 1ms file streamer that records the robot moves during jogging, It can also be done offline
with the help of the opencascade cad viewer.

Attachments:
Last edit: 26 Apr 2021 22:45 by Grotius.

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

More
29 Apr 2021 12:54 #207368 by TheRoslyak
Hi Grotius
Can you help with one problem
I try to built own project and write
m_3d_widget -> update_joint(0, mJoint0);
When I write only
#include "opencascade.h"
in Robot.h - get error (pic2)
Can you check what I forgot to write?
dropmefiles.com/zY8nj
Attachments:

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

Time to create page: 0.984 seconds
Powered by Kunena Forum