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

More
05 May 2021 03:16 #207924 by Grotius
Hi,

Your errors are mostly typo's.
A "int" in not of type "pos".
When you take your time, you can solve this. And try to code as simple as possible.
Try to use only the std:: lib function's instead of using qt libs. Only use qt lib's if there are no other solutions.

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

More
14 May 2021 16:00 - 14 May 2021 23:02 #208814 by udoS
Hi Grotius

This call is made periodically to update the values in the HMI.
______________________________________________________
void update_status(){ //function used in display/display.h
const char *cstr = nmlfile.c_str();
RCS_STAT_CHANNEL *stat = new RCS_STAT_CHANNEL(emcFormat, "emcStatus", "xemc", cstr);
___________________________________________________________________________________
So every call you open a NEW channel. I don't see a "close" or "cleanup " or something like that.


I have a 'little' request.

Could you supply a very basic sample in Qt or other c++ app showing the initialisation and communication with linuxcnc over nml. I just don't get it extracted from your Qt_c++_hmi.
Specific: the shared mem semaphore part.

Best Regards

udo
Last edit: 14 May 2021 23:02 by udoS.

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

More
17 May 2021 11:51 #209217 by Grotius
Hi,

So every call you open a NEW channel. I don't see a "close" or "cleanup " or something like that.
That's correct. During code reverse engineering there is not been added something to close or cleanup the
channel. It's a while ago.

Could you supply a very basic sample in Qt or other c++ app showing the initialisation and communication with linuxcnc over nml.
I think on my github channel there is some info about that. link

About nml i have no more info. I did not use it, or extended the code after above example was made.

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

More
31 May 2021 09:42 - 01 Jun 2021 09:16 #210783 by TheRoslyak
Hi grotius
Can you check project? Problem is same - I include "opencascade.h" in Robot.h and project is crash
dropmefiles.com/VUTzL
Last edit: 01 Jun 2021 09:16 by TheRoslyak.

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

More
05 Jun 2021 14:45 #211218 by Grotius
Hi,

Opencascade must be included in the mainwindow.h file, just as the example does.
You can not include opencascade several times. It will trow error's.

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

More
09 Jun 2021 08:52 - 09 Jun 2021 08:54 #211599 by TheRoslyak
Hi
My Robot.h is your mainwindow.h
I do this but it didn’t work.
Last edit: 09 Jun 2021 08:54 by TheRoslyak.

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

More
09 Jun 2021 09:45 #211603 by Joco
When you say "throws errors" are you referring to compile or running?

I have working code that includes opencascade.h multiple times other files need to reference the definitions. So I know that side of things works. Although you may need to be careful on the order of inclusion. I seem to recall that mattered.

If you are getting run time errors then that is a different kettle of fish.

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

More
09 Jun 2021 10:02 #211606 by TheRoslyak

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

More
09 Jun 2021 10:38 #211609 by Grotius
Hi,

I checked the project. It works. The robot loads. To my surpise he actually uses the qml interface.

I had to set some includepaths. This is because he has a different linux version.
Warning: Spoiler!


For the rest the code look fine. It's nice too to see code modified by other users.

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

More
09 Jun 2021 11:05 - 09 Jun 2021 11:09 #211612 by TheRoslyak
Honestly, I don't understand what has changed
Error appears if I uncomment
#include <opencascade.h>
in Robot.h
I want to connect slider to 3d model, but this string crash all compile

PS. I have been working on the design of the project so far
Can you check forum.linuxcnc.org/38-general-linuxcnc-q...elerations?start=150 topic
Attachments:
Last edit: 09 Jun 2021 11:09 by TheRoslyak.

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

Time to create page: 0.133 seconds
Powered by Kunena Forum