- Posts: 10
- Thank you received: 0
Advice on Designing a GUI for a Custom C-Based EtherCAT CNC Controller on Linux
1 week 4 days ago #350356
by ajanfahri
Advice on Designing a GUI for a Custom C-Based EtherCAT CNC Controller on Linux was created by ajanfahri
Hello everyone,I'm developing a custom CNC controller on Ubuntu Linux with real-time capabilities. The core control system is being written in C, and I'm working on integrating EtherCAT for servo drive communication.I'm now considering the best approach for designing the user interface (HMI).My main questions are:
- Should I develop the entire application, including the GUI, in C/C++ using a native Linux GUI framework?
- Would it be better to build a modern web-based interface using React, with a separate backend communicating with the C control core?
- What architecture would you recommend for a CNC controller that requires reliable real-time motion control, low latency, and a responsive user interface?
- Are there any existing LinuxCNC components or libraries worth considering for this purpose?
Please Log in to join the conversation.
- tommylight
-
- Online
- Administrator
-
Less
More
- Posts: 22009
- Thank you received: 3
1 week 3 days ago #350371
by tommylight
Replied by tommylight on topic Advice on Designing a GUI for a Custom C-Based EtherCAT CNC Controller on Linux
There are plenty of GUI's included with LinuxCNC that you can test and run without a machine, even without installing anything, just download the ISO, burn to a USB, boot the PC from it and test as much as you like.
There are also:
-QtPyVCP, a separate project for LinuxCNC for small and big industrial mills with toolchangers and everything, and a lathe version being actively developed
-FlexGUI, a GUI editor/maker for LinuxCNC, very easy to use and very capable as far as i can see/read here on the forum, depending on what you need you can have a working GUI very fast (i would guess under an hour).
There are many other versions of web based or even LabView (i am not sure about the name, but expensive proprietary software that can be made to work with LinuxCNC), etc.
-
My advice, start with FlexGUI:
forum.linuxcnc.org/flex-gui/57726-flex-gui
There are also:
-QtPyVCP, a separate project for LinuxCNC for small and big industrial mills with toolchangers and everything, and a lathe version being actively developed
-FlexGUI, a GUI editor/maker for LinuxCNC, very easy to use and very capable as far as i can see/read here on the forum, depending on what you need you can have a working GUI very fast (i would guess under an hour).
There are many other versions of web based or even LabView (i am not sure about the name, but expensive proprietary software that can be made to work with LinuxCNC), etc.
-
My advice, start with FlexGUI:
forum.linuxcnc.org/flex-gui/57726-flex-gui
Please Log in to join the conversation.
1 week 1 day ago #350395
by ajanfahri
Replied by ajanfahri on topic Advice on Designing a GUI for a Custom C-Based EtherCAT CNC Controller on Linux
Thanks for your suggestions! I'll look into your recommendations.(FlexGUI and QtPyVCP.)
However, I'm developing my own CNC controller from scratch rather than using LinuxCNC. The real-time control core is written in C, and I'm integrating EtherCAT for servo communication.
I'm mainly trying to decide on the best HMI architecture for my own system: a native C/C++ GUI or a modern React-based web interface communicating with the C control core through a separate backend.
I'd be interested in your thoughts on this architecture, particularly regarding reliability, real-time performance, and communication between the HMI and the control core.
However, I'm developing my own CNC controller from scratch rather than using LinuxCNC. The real-time control core is written in C, and I'm integrating EtherCAT for servo communication.
I'm mainly trying to decide on the best HMI architecture for my own system: a native C/C++ GUI or a modern React-based web interface communicating with the C control core through a separate backend.
I'd be interested in your thoughts on this architecture, particularly regarding reliability, real-time performance, and communication between the HMI and the control core.
Please Log in to join the conversation.
1 week 1 day ago #350398
by NWE
Replied by NWE on topic Advice on Designing a GUI for a Custom C-Based EtherCAT CNC Controller on Linux
Where can we view the source code?
Please Log in to join the conversation.
- tommylight
-
- Online
- Administrator
-
Less
More
- Posts: 22009
- Thank you received: 3
1 week 1 day ago #350399
by tommylight
Replied by tommylight on topic Advice on Designing a GUI for a Custom C-Based EtherCAT CNC Controller on Linux
Trajectory planner is not an easy task, so i would stick with LinuxCNC for that (as do most companies using it) and do your HMI/GUI for it.
C/C++ is fine, React i have no clue (is that a version of Java script?), but whatever you end up using, make sure that if it crashes, it does not take the trajectory planner and real time stuff with it.
-
For me reliability is paramount, so i stick with Axis GUI mostly, i distinctly recall some 10 years back messing with Linux deleting stuff while the machine was working, i broke something, screen went black, keyboard was not doing anything, but the machine went on to finish the part over two hours after blacking out!
Having industrial machines With LinuxCNC running 24/7 for nearly 15 years without ever having any issues is something big companies can not do, of course as most of those still use windoze!
C/C++ is fine, React i have no clue (is that a version of Java script?), but whatever you end up using, make sure that if it crashes, it does not take the trajectory planner and real time stuff with it.
-
For me reliability is paramount, so i stick with Axis GUI mostly, i distinctly recall some 10 years back messing with Linux deleting stuff while the machine was working, i broke something, screen went black, keyboard was not doing anything, but the machine went on to finish the part over two hours after blacking out!
Having industrial machines With LinuxCNC running 24/7 for nearly 15 years without ever having any issues is something big companies can not do, of course as most of those still use windoze!
Please Log in to join the conversation.
1 week 1 day ago #350402
by ajanfahri
Replied by ajanfahri on topic Advice on Designing a GUI for a Custom C-Based EtherCAT CNC Controller on Linux
The project is still under development. The CNC software I have worked with is proprietary, so I cannot share its source code.
My current project is a separate development using Linux, Xenomai for real-time capabilities, and EtherCAT for motion control. I'm still working on the architecture and exploring the HMI approach.
My current project is a separate development using Linux, Xenomai for real-time capabilities, and EtherCAT for motion control. I'm still working on the architecture and exploring the HMI approach.
Please Log in to join the conversation.
1 week 1 day ago #350403
by ajanfahri
Replied by ajanfahri on topic Advice on Designing a GUI for a Custom C-Based EtherCAT CNC Controller on Linux
You're absolutely right, trajectory planning is a challenging task.
Our journey started about 20 years ago with milling and EDM machines. Back then, we were developing our software in C/C++ on DOS 6.22. I still remember spending days debugging our milling and EDM applications.
You can take a look at some of our old DOS applications here:
doscapture.fahriworks.com/
Later, we moved on to plasma cutting machines, and now I'm working on a laser cutting machine using Linux, Xenomai, and EtherCAT.
Your points about reliability and keeping the GUI separate from real-time motion control are very valuable. Thank you for sharing your experience and advice!
Our journey started about 20 years ago with milling and EDM machines. Back then, we were developing our software in C/C++ on DOS 6.22. I still remember spending days debugging our milling and EDM applications.
You can take a look at some of our old DOS applications here:
doscapture.fahriworks.com/
Later, we moved on to plasma cutting machines, and now I'm working on a laser cutting machine using Linux, Xenomai, and EtherCAT.
Your points about reliability and keeping the GUI separate from real-time motion control are very valuable. Thank you for sharing your experience and advice!
Please Log in to join the conversation.
Time to create page: 0.092 seconds
