Running halui in real time space?
13 Oct 2024 01:31 - 13 Oct 2024 01:35 #311915
by Benb
Running halui in real time space? was created by Benb
After reading:
forum.linuxcnc.org/10-advanced-configura...e-feed-range-problem
@Baxedm can not use halui because it is to slow which affects the operation of his edm machine.
It would be remarkable if halui could be re-coded to run in realtime space. But I am not sure if it is achievable. I find halui as good complement to hal and Linuxcnc in general.
Anyone out there with c++ and rtos skills willing to take on the challenge?
Just me day dreaming on a Saturday night.
Good night Ben
@Baxedm can not use halui because it is to slow which affects the operation of his edm machine.
It would be remarkable if halui could be re-coded to run in realtime space. But I am not sure if it is achievable. I find halui as good complement to hal and Linuxcnc in general.
Anyone out there with c++ and rtos skills willing to take on the challenge?
Just me day dreaming on a Saturday night.
Good night Ben
Last edit: 13 Oct 2024 01:35 by Benb.
Please Log in or Create an account to join the conversation.
22 Oct 2024 20:47 #312896
by Grotius
Replied by Grotius on topic Running halui in real time space?
Hi Ben,
The halui sleeps 20ms between polls. This is then too slow for your app?
You could set the timer faster by changing this line and recompile :
line to change
You can compile it as a rt component. What will you do with it then?
The halui sleeps 20ms between polls. This is then too slow for your app?
You could set the timer faster by changing this line and recompile :
line to change
You can compile it as a rt component. What will you do with it then?
Please Log in or Create an account to join the conversation.
23 Oct 2024 00:14 #312919
by Benb
Replied by Benb on topic Running halui in real time space?
Grotius, thank you for you interest in this subject. 20ms is not bad for a component such as halui, the problem is mainly to do with timing, since it runs in user space its execution time is unpredictable. Now when you connect halui to hal components (realtime components) configuring becomes difficult. When I configure hal logic I rely on experience and intuition, if I encounter an execution problem I correct it by setting he proper execution order of the components. But with halui the execution time is unpredictable. Configuring mix of hal and halui is a pita.
If you have chance have a look at simple logic such as run/step pause resume logic and you will see that its not easy to configure such simple logic. If the same configuration was done with halui running in realtime that configuration would be much simpler to create and behavior will be predictable and repeatable.
In nutshell halui running in user space its execution time is unpredictable.
Since I am not C++ & RTOS programmer. I am hopping that someone from the community with those skills would try convert (probably no the proper word) halui from user space to realtime space. It's probably a lengthy process. I will be more than happy to help with the testing.
Thanks again Ben
If you have chance have a look at simple logic such as run/step pause resume logic and you will see that its not easy to configure such simple logic. If the same configuration was done with halui running in realtime that configuration would be much simpler to create and behavior will be predictable and repeatable.
In nutshell halui running in user space its execution time is unpredictable.
Since I am not C++ & RTOS programmer. I am hopping that someone from the community with those skills would try convert (probably no the proper word) halui from user space to realtime space. It's probably a lengthy process. I will be more than happy to help with the testing.
Thanks again Ben
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
23 Oct 2024 20:05 #313000
by Grotius
Replied by Grotius on topic Running halui in real time space?
Hi Ben,
If you have chance have a look at simple logic such as run/step pause resume logic and you will see that its not easy to configure such simple logic
I have seen yesterday that this is nml command. So that's not directed to hal realtime but instead to nml server.
In nutshell halui running in user space its execution time is unpredictable.
I understand your concerns. It's a reason to not use it.
halui from user space to realtime space. It's probably a lengthy process.
How would you like to send command's from user space? Or have you something else in mind?
To understand your situation even more i need at least one example outside the start,stop commands.
3 weeks ago i made a websocket implementation for nml. This is very responsive. You may say the data exchange is realtime.
So maybe you can better use a websocket server & client connected to hal rt.
Then for example the websocket server is running from inside a realtime component.
Then from user space you can sendt halcommand's in a string. You can use all the commands from the halcmd program.
This is then a example, also using start, stop etc. Only using nml interface here :
youtube.com/shorts/IDJHTxdfp6Y
So best is let me know exactly what you want, wich programming language you use or not use. etc.
If you have chance have a look at simple logic such as run/step pause resume logic and you will see that its not easy to configure such simple logic
I have seen yesterday that this is nml command. So that's not directed to hal realtime but instead to nml server.
In nutshell halui running in user space its execution time is unpredictable.
I understand your concerns. It's a reason to not use it.
halui from user space to realtime space. It's probably a lengthy process.
How would you like to send command's from user space? Or have you something else in mind?
To understand your situation even more i need at least one example outside the start,stop commands.
3 weeks ago i made a websocket implementation for nml. This is very responsive. You may say the data exchange is realtime.
So maybe you can better use a websocket server & client connected to hal rt.
Then for example the websocket server is running from inside a realtime component.
Then from user space you can sendt halcommand's in a string. You can use all the commands from the halcmd program.
This is then a example, also using start, stop etc. Only using nml interface here :
youtube.com/shorts/IDJHTxdfp6Y
So best is let me know exactly what you want, wich programming language you use or not use. etc.
The following user(s) said Thank You: Benb
Please Log in or Create an account to join the conversation.
Time to create page: 0.172 seconds