- LinuxCNC
- General LinuxCNC Questions
- How would you design a real time application for cnc control in c / c++ ???
How would you design a real time application for cnc control in c / c++ ???
- TheRoslyak
- Offline
- Elite Member
Less
More
- Posts: 238
- Thank you received: 37
22 Apr 2021 07:55 - 22 Apr 2021 07:59 #206774
by TheRoslyak
Replied by TheRoslyak on topic How would you design a real time application for cnc control in c / c++ ???
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!)
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.
22 Apr 2021 12:31 #206791
by Grotius
Replied by Grotius on topic How would you design a real time application for cnc control in c / c++ ???
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.
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.
- TheRoslyak
- Offline
- Elite Member
Less
More
- Posts: 238
- Thank you received: 37
22 Apr 2021 13:53 - 23 Apr 2021 07:55 #206796
by TheRoslyak
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.
Replied by TheRoslyak on topic How would you design a real time application for cnc control in c / c++ ???
github.com/ShabalinAnton/opencascade_qml This person did it but project is for windows.I think opencascade is not used with qml until today.
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.
Last edit: 23 Apr 2021 07:55 by TheRoslyak.
Please Log in or Create an account to join the conversation.
22 Apr 2021 18:17 #206824
by Grotius
Replied by Grotius on topic How would you design a real time application for cnc control in c / c++ ???
Ok. Thanks for the info. Will let you know.
Please Log in or Create an account to join the conversation.
23 Apr 2021 11:32 #206863
by udoS
Replied by udoS on topic How would you design a real time application for cnc control in c / c++ ???
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.
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.
Please Log in or Create an account to join the conversation.
23 Apr 2021 11:41 #206864
by udoS
Replied by udoS on topic How would you design a real time application for cnc control in c / c++ ???
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
(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.
23 Apr 2021 19:06 - 23 Apr 2021 19:29 #206885
by Grotius
Replied by Grotius on topic How would you design a real time application for cnc control in c / c++ ???
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
sourceforge.net/projects/linux-11-pro/
Redefined stuff :
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
sourceforge.net/projects/linux-11-pro/
Redefined stuff :
Warning: Spoiler!
#define PFNGLCLIENTACTIVETEXTUREPROC PFNGLCLIENTACTIVETEXTUREARBPROC
#define PFNGLMULTITEXCOORD1DPROC PFNGLMULTITEXCOORD1HNVPROC
#define PFNGLMULTITEXCOORD1DVPROC PFNGLMULTITEXCOORD1DPROC
#define PFNGLMULTITEXCOORD1FPROC PFNGLMULTITEXCOORD1DPROC
#define PFNGLMULTITEXCOORD1FVPROC PFNGLMULTITEXCOORD1DVPROC
#define PFNGLMULTITEXCOORD1IPROC PFNGLMULTITEXCOORD1DPROC
#define PFNGLMULTITEXCOORD1IVPROC PFNGLMULTITEXCOORD1DVPROC
#define PFNGLMULTITEXCOORD1SPROC PFNGLMULTITEXCOORD1DPROC
#define PFNGLMULTITEXCOORD1SVPROC PFNGLMULTITEXCOORD1DVPROC
#define PFNGLMULTITEXCOORD2DPROC PFNGLMULTITEXCOORD1DPROC
#define PFNGLMULTITEXCOORD2DVPROC PFNGLMULTITEXCOORD1DVPROC
#define PFNGLMULTITEXCOORD2FPROC PFNGLMULTITEXCOORD2DPROC
#define PFNGLMULTITEXCOORD2FVPROC PFNGLMULTITEXCOORD1FVPROC
#define PFNGLMULTITEXCOORD2IPROC PFNGLMULTITEXCOORD1IPROC
#define PFNGLMULTITEXCOORD2IVPROC PFNGLMULTITEXCOORD2FVPROC
#define PFNGLMULTITEXCOORD2SPROC PFNGLMULTITEXCOORD2DPROC
#define PFNGLMULTITEXCOORD2SVPROC PFNGLMULTITEXCOORD2FVPROC
#define PFNGLMULTITEXCOORD3DPROC PFNGLMULTITEXCOORD1DPROC
#define PFNGLMULTITEXCOORD3DVPROC PFNGLMULTITEXCOORD1DVPROC
#define PFNGLMULTITEXCOORD3FPROC PFNGLMULTITEXCOORD2FPROC
#define PFNGLMULTITEXCOORD3FVPROC PFNGLMULTITEXCOORD2FVPROC
#define PFNGLMULTITEXCOORD3IPROC PFNGLMULTITEXCOORD1IPROC
#define PFNGLMULTITEXCOORD3IVPROC PFNGLMULTITEXCOORD1IVPROC
#define PFNGLMULTITEXCOORD3SPROC PFNGLMULTITEXCOORD2SPROC
#define PFNGLMULTITEXCOORD3SVPROC PFNGLMULTITEXCOORD1SVPROC
#define PFNGLMULTITEXCOORD4DPROC PFNGLMULTITEXCOORD1DPROC
#define PFNGLMULTITEXCOORD4DVPROC PFNGLMULTITEXCOORD1DVPROC
#define PFNGLMULTITEXCOORD4FPROC PFNGLMULTITEXCOORD3FPROC
#define PFNGLMULTITEXCOORD4FVPROC PFNGLMULTITEXCOORD2FVPROC
#define PFNGLMULTITEXCOORD4IPROC PFNGLMULTITEXCOORD1IPROC
#define PFNGLMULTITEXCOORD4IVPROC PFNGLMULTITEXCOORD4DVPROC
#define PFNGLMULTITEXCOORD4SPROC PFNGLMULTITEXCOORD2SPROC
#define PFNGLMULTITEXCOORD4SVPROC PFNGLMULTITEXCOORD3SVPROC
#define PFNGLLOADTRANSPOSEMATRIXFPROC PFNGLLOADTRANSPOSEMATRIXFARBPROC
#define PFNGLLOADTRANSPOSEMATRIXDPROC PFNGLLOADTRANSPOSEMATRIXDARBPROC
#define PFNGLMULTTRANSPOSEMATRIXFPROC PFNGLMULTTRANSPOSEMATRIXFARBPROC
#define PFNGLMULTTRANSPOSEMATRIXDPROC PFNGLMULTTRANSPOSEMATRIXDARBPROC
Attachments:
Last edit: 23 Apr 2021 19:29 by Grotius.
Please Log in or Create an account to join the conversation.
23 Apr 2021 19:11 #206886
by Grotius
Replied by Grotius on topic How would you design a real time application for cnc control in c / c++ ???
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.
(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.
26 Apr 2021 22:36 - 26 Apr 2021 22:45 #207177
by Grotius
Replied by Grotius on topic How would you design a real time application for cnc control in c / c++ ???
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.
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.
- TheRoslyak
- Offline
- Elite Member
Less
More
- Posts: 238
- Thank you received: 37
29 Apr 2021 12:54 #207368
by TheRoslyak
Replied by TheRoslyak on topic How would you design a real time application for cnc control in c / c++ ???
Hi Grotius
Can you help with one problem
I try to built own project and writeWhen I write onlyin Robot.h - get error (pic2)
Can you check what I forgot to write?
dropmefiles.com/zY8nj
Can you help with one problem
I try to built own project and write
m_3d_widget -> update_joint(0, mJoint0);
#include "opencascade.h"
Can you check what I forgot to write?
dropmefiles.com/zY8nj
Please Log in or Create an account to join the conversation.
- LinuxCNC
- General LinuxCNC Questions
- How would you design a real time application for cnc control in c / c++ ???
Time to create page: 0.288 seconds