- Posts: 153
- Thank you received: 0
Several POSTGUI HAL files in .ini
7 years 9 months ago #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 to join the conversation.
7 years 9 months ago #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:
Code:
[HAL]
...
POSTGUI_HALFILE = main_postgui.hal
Code:
$ cat main_postgui.hal
source postgui_1.hal
source postgui_2.hal
source postgui_3.hal
...
from the halcmd man page:
Code:
source filename.hal
Execute the commands from filename.hal.
Ref: linuxcnc.org/docs/devel/html/man/man1/halcmd.1.html
Please Log in to join the conversation.
7 years 8 months ago #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 to join the conversation.
7 years 8 months ago #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:
Code:
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
Please Log in to join the conversation.
7 years 8 months ago #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.
Please Log in to join the conversation.
7 years 8 months ago #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 to join the conversation.
Time to create page: 3.948 seconds
