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

More
5 years 5 months ago #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 to join the conversation.

More
5 years 5 months ago #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

Please Log in to join the conversation.

More
5 years 5 months ago #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 to join the conversation.

More
5 years 5 months ago #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

Please Log in to join the conversation.

More
5 years 4 months ago #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 to join the conversation.

More
5 years 4 months ago #211599 by TheRoslyak
Hi
My Robot.h is your mainwindow.h
I do this but it didn’t work.

Please Log in to join the conversation.

More
5 years 4 months ago #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 to join the conversation.

More
5 years 4 months ago #211606 by TheRoslyak

Please Log in to join the conversation.

More
5 years 4 months ago #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 to join the conversation.

More
5 years 4 months ago #211612 by TheRoslyak
Honestly, I don't understand what has changed
Error appears if I uncomment
Code:
#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

Please Log in to join the conversation.

Time to create page: 0.281 seconds
Powered by Kunena Forum