Multiple HAL files, what should go where? and avoiding conflicts

More
24 Mar 2024 17:44 - 24 Mar 2024 17:48 #296630 by slowpoke
I'm just starting to get somewhat comfortable customizing hal files and have a couple of niggling questions, I'm using Axis with a Mesa 7i95t board.

Presently I have main.hal generated by MesaCT and I now have a postgui.hal that I created to add a bit of customization.

I see that some users have other custom named hal files for example t2030_7i96.hal or zx45.hal that are specific to their system. There are other potential hal files as well for example:
custom.hal
shutdown.hal
haluiUserInterface.halĀ  (It seems logical that this would be used for configuration specific to a pendant or custom control board)

1) Are the various hal files loaded in a particular order and do I need to be aware of the that and its implications?
2) It's not clear to me when you would use custom and if for example zx45.hal is just a specifically named custom?
3) I stuffed all my special stuff in postgui.hal, what is the significance of the "postgui", should somethings be in this file or excluded?
4) What about shutdown.hal, when would this be used? and example would be helpful.
5) Now that I have some custom code in postgui.hal, I had to comment out a few things in man.hal to avoid a conflict, for example (net joint-pos-cmd => pid.x.command) . if/when I use MesaCT again it will over-write my commented out lines and I will need to comment them out each time. I'm guessing there is no easy work around for this, so enter MesaCT at your own risk?

Thanks in advance for any tidbits of wisdom.
Last edit: 24 Mar 2024 17:48 by slowpoke.

Please Log in or Create an account to join the conversation.

More
25 Mar 2024 01:32 #296669 by tommylight
1. yes they are, as they are listed in the ini file
2. hal files can be named anything, use the same name in the ini file
3. postgui is what it's name says, it is loaded after the GUI has loaded
4. off the top of my head (and since i spent last 10 day 3D printing 24/7), say the machine needs to cool down before shutting off so fans must remain active, this is where that hal wizardry would go
5. in general, use custom.hal (name it whatever you like) and use POSTGUI_HALFILE = postgui_call_list.hal (again name it whatever you like), these should not be overwritten by wizards when editing.
The following user(s) said Thank You: slowpoke

Please Log in or Create an account to join the conversation.

More
25 Mar 2024 05:11 #296685 by cmorley
I'll add: starting in 2.9, you can have multiple POSTGUI_HALFILE in the INI.
They will be called in order.
postgui are useful for connecting to pins that the screen made - one has to wait until the screen finishes loading so the pins were made.
The following user(s) said Thank You: tommylight, Aciera, Unlogic, slowpoke

Please Log in or Create an account to join the conversation.

More
27 Mar 2024 15:05 #296903 by RotarySMP
On my lathe build I have multiple HAL's each for individual functions
E-Stop.HAL
Ladder.HAL
Colletchanger.HAL
Tailstop.HAL
Spindle.HAL
etc

I was told it make it easier to troubleshoot. I have found it easier to deal with than the one large HAL on my mill.
The following user(s) said Thank You: slowpoke

Please Log in or Create an account to join the conversation.

More
Time to create page: 0.179 seconds
Powered by Kunena Forum