Several POSTGUI HAL files in .ini
31 Jan 2019 05:55 #125373
by Nico2017
Several POSTGUI HAL files in .ini was created by Nico2017
Hi all,
I was trying to improve my linuxcnc project and was wondering if you can have several POSTGUI_HALFILE files
When I tried in the .ini file to do :
POSTGUI_HALFILE = postgui_module1.hal
POSTGUI_HALFILE = postgui_module2.hal
POSTGUI_HALFILE = postgui_module3.hal
only the postgui_module1.hal is actually loaded. I would like to split my POSTGUI in several files as it become bigger and bigger with the progress of my project. Would be nice to separate the POSTGUI in dedicated functioning part (for instance one motion related and one tool control related). Otherwise I guess I will have to call a POSTGUI_HALFILE = postgui_modules.hal and from postgui_modules.hal call the different files. Only issue, I am not sure about the command from a hal file to call another hal file when it is in the POSTGUI.
Thank you for your help,
Nicolas
I was trying to improve my linuxcnc project and was wondering if you can have several POSTGUI_HALFILE files
When I tried in the .ini file to do :
POSTGUI_HALFILE = postgui_module1.hal
POSTGUI_HALFILE = postgui_module2.hal
POSTGUI_HALFILE = postgui_module3.hal
only the postgui_module1.hal is actually loaded. I would like to split my POSTGUI in several files as it become bigger and bigger with the progress of my project. Would be nice to separate the POSTGUI in dedicated functioning part (for instance one motion related and one tool control related). Otherwise I guess I will have to call a POSTGUI_HALFILE = postgui_modules.hal and from postgui_modules.hal call the different files. Only issue, I am not sure about the command from a hal file to call another hal file when it is in the POSTGUI.
Thank you for your help,
Nicolas
Please Log in or Create an account to join the conversation.
31 Jan 2019 13:09 #125384
by dgarrett
Replied by dgarrett on topic Several POSTGUI HAL files in .ini
In general, guis support a single POSTGUI_HALFILE.
A common work around:
from the halcmd man page:
Ref: linuxcnc.org/docs/devel/html/man/man1/halcmd.1.html
A common work around:
[HAL]
...
POSTGUI_HALFILE = main_postgui.hal
$ cat main_postgui.hal
source postgui_1.hal
source postgui_2.hal
source postgui_3.hal
...
from the halcmd man page:
source filename.hal
Execute the commands from filename.hal.
Ref: linuxcnc.org/docs/devel/html/man/man1/halcmd.1.html
Please Log in or Create an account to join the conversation.
03 Feb 2019 19:50 #125601
by Nico2017
Replied by Nico2017 on topic Several POSTGUI HAL files in .ini
Hi, thanks for your answer.
I had a look to the man halcmd to find some elements for another quick question: can I split a command line into several line into a halcmd file?
Especially I tend to use more the loadrt with the names options, but it tends to finish with really long lines that I would like to split on different lines to make it easier to read.
Thank you,
Nicolas
I had a look to the man halcmd to find some elements for another quick question: can I split a command line into several line into a halcmd file?
Especially I tend to use more the loadrt with the names options, but it tends to finish with really long lines that I would like to split on different lines to make it easier to read.
Thank you,
Nicolas
Please Log in or Create an account to join the conversation.
03 Feb 2019 22:28 #125616
by dgarrett
If you use twopass processing, you can use multiple short
loadrt lines in the same or multiple files. Example:
As mentioned here:
forum.linuxcnc.org/24-hal-components/359...rgument-limit#124857
Replied by dgarrett on topic Several POSTGUI HAL files in .ini
No.I had a look to the man halcmd to find some elements
for another quick question: can I split a command line into
several line into a halcmd file?
Especially I tend to use more the loadrt with the names
options, but it tends to finish with really long lines that
I would like to split on different lines to make it easier
to read.
If you use twopass processing, you can use multiple short
loadrt lines in the same or multiple files. Example:
loadrt mux8 names=z1,z2,z3
loadrt mux8 names=z4,z5,z6
As mentioned here:
forum.linuxcnc.org/24-hal-components/359...rgument-limit#124857
The following user(s) said Thank You: Nico2017
Please Log in or Create an account to join the conversation.
03 Feb 2019 22:38 - 03 Feb 2019 22:44 #125617
by Grotius
Replied by Grotius on topic Several POSTGUI HAL files in .ini
For readers,
The Postgui.hal file is a very important file, loaded at the end of all normal hal files.
It's really loaded at the end of loading all normal .hal files. So it's the last hal file to load. It's a special custom file to load.
The Postgui.hal file can have information about thing's that must be keep the same after updating linuxcnc.
The Posthui.hal file can not be made multiple times. Hal files can be made multiple times, Postgui.hal only once.
Multiple hal files for example : init.hal - servo.hal - inputs.hal - outputs.hal - gmoccappy.hal - gscreen.hal , etc. etc.
A real life example :
You have 1 machine with Gmocappy 3 installed just yesterday. Okey you sell this machine from Bosnie to Afganistan. The guy in afganistan does a linux update after a few month's, after typing the wrong thing, he does dis perhaps without knowing what he is doing.... or dist-upgrade or whatever he want's, even a new stepper configuration setup would not affect the installation files. Then the Postgui.hal file is not changed and he can be using the machine without calling you for any help.
The Postgui.hal file is a very important file, loaded at the end of all normal hal files.
It's really loaded at the end of loading all normal .hal files. So it's the last hal file to load. It's a special custom file to load.
The Postgui.hal file can have information about thing's that must be keep the same after updating linuxcnc.
The Posthui.hal file can not be made multiple times. Hal files can be made multiple times, Postgui.hal only once.
Multiple hal files for example : init.hal - servo.hal - inputs.hal - outputs.hal - gmoccappy.hal - gscreen.hal , etc. etc.
A real life example :
You have 1 machine with Gmocappy 3 installed just yesterday. Okey you sell this machine from Bosnie to Afganistan. The guy in afganistan does a linux update after a few month's, after typing the wrong thing, he does dis perhaps without knowing what he is doing.... or dist-upgrade or whatever he want's, even a new stepper configuration setup would not affect the installation files. Then the Postgui.hal file is not changed and he can be using the machine without calling you for any help.
Last edit: 03 Feb 2019 22:44 by Grotius.
The following user(s) said Thank You: Nico2017
Please Log in or Create an account to join the conversation.
04 Feb 2019 01:05 #125626
by Nico2017
Replied by Nico2017 on topic Several POSTGUI HAL files in .ini
Hi,
thanks dgarrett for your answer.
I have explored the name convention with two pass but the limitation to 16 item is actually annoying even though you can extend it thanks recompiling the required components.
Thank you,
Nicolas
thanks dgarrett for your answer.
I have explored the name convention with two pass but the limitation to 16 item is actually annoying even though you can extend it thanks recompiling the required components.
Thank you,
Nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.077 seconds