HAL names - 16 argument limit?
12 Feb 2019 12:34 #126261
by dgarrett
Replied by dgarrett on topic HAL names - 16 argument limit?
With recent commits (master branch), realtime components
built with halcompile (including many components included
in the distribution):
1) no limit on number of count= instances (unchanged)
2) no limit on number of names= instances (was 16)
3) components using personality:
default maximum personalities is 64 (was 16)
4) the number of allowed personalites can
be altered for user-built components
using halcompile --personalities=value
Ref: github.com/LinuxCNC/linuxcnc/commit/f56515517
Ref: github.com/LinuxCNC/linuxcnc/commit/f56a73a9d
Note:
a) Using many components may excede memory limits
set by src/hal/hal_priv.h: #define HAL_SIZE
b) Using many very long component names may encounter
limits set by src/hal/halcmd.h: MAX_CMD_LENGTH
built with halcompile (including many components included
in the distribution):
1) no limit on number of count= instances (unchanged)
2) no limit on number of names= instances (was 16)
3) components using personality:
default maximum personalities is 64 (was 16)
4) the number of allowed personalites can
be altered for user-built components
using halcompile --personalities=value
Ref: github.com/LinuxCNC/linuxcnc/commit/f56515517
Ref: github.com/LinuxCNC/linuxcnc/commit/f56a73a9d
Note:
a) Using many components may excede memory limits
set by src/hal/hal_priv.h: #define HAL_SIZE
b) Using many very long component names may encounter
limits set by src/hal/halcmd.h: MAX_CMD_LENGTH
Please Log in or Create an account to join the conversation.
24 Sep 2019 03:02 #146021
by Nico2017
Replied by Nico2017 on topic HAL names - 16 argument limit?
Hi,
thank you for the extension of those limits, I believe this is a more flexible structure when a project evolves as it avoid to renumber a list of components if we want to keep things tidy. For instance, lets say you have loadrt sum2 count=20 and the first 3 sum2.0 sum2.1 and sum2.2 were dedicated to a part of your project. Lets say you have been coding using all your 20 count and then suddenly you realize you want another sum2 related to the initial part of your project. Using name allows to rapidly add the sum2 without renumbering everything.
As a personal note, names can use "." as a character
Thanks again,
Nicolas
thank you for the extension of those limits, I believe this is a more flexible structure when a project evolves as it avoid to renumber a list of components if we want to keep things tidy. For instance, lets say you have loadrt sum2 count=20 and the first 3 sum2.0 sum2.1 and sum2.2 were dedicated to a part of your project. Lets say you have been coding using all your 20 count and then suddenly you realize you want another sum2 related to the initial part of your project. Using name allows to rapidly add the sum2 without renumbering everything.
As a personal note, names can use "." as a character
Thanks again,
Nicolas
Please Log in or Create an account to join the conversation.
24 Sep 2019 03:09 - 24 Sep 2019 03:35 #146022
by Nico2017
Replied by Nico2017 on topic HAL names - 16 argument limit?
Hi, still got one last question,
I am aware of the TWOPASS = on,verbose,nodelete which is really powerfull combined with the names definition.
However I am using an EtherCAT drive and the TWOPASS feature seemed to be incompatible first with the lcec.
I hfound out a workround but I was still wondering if there was a way to split a hal file line into several line especially for the names definition. Example:
loadrt sum2 names=name1,name2,name3 \
name4,name5,name6
Itherwise I will use the TWOPASS and loadrt on different lines
Thank you,
Nicolas
I am aware of the TWOPASS = on,verbose,nodelete which is really powerfull combined with the names definition.
However I am using an EtherCAT drive and the TWOPASS feature seemed to be incompatible first with the lcec.
I hfound out a workround but I was still wondering if there was a way to split a hal file line into several line especially for the names definition. Example:
loadrt sum2 names=name1,name2,name3 \
name4,name5,name6
Itherwise I will use the TWOPASS and loadrt on different lines
Thank you,
Nicolas
Last edit: 24 Sep 2019 03:35 by Nico2017.
Please Log in or Create an account to join the conversation.
24 Sep 2019 03:29 - 24 Sep 2019 03:30 #146023
by Nico2017
Replied by Nico2017 on topic HAL names - 16 argument limit?
Hi,
as a note I have tested:
#Does not work: 65 with personality using count
#Does not work: 65 with personality using names
#64 names with personality works
as a note I have tested:
#Does not work: 65 with personality using count
loadrt logic count=65 personality=0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102
#Does not work: 65 with personality using names
loadrt logic names=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64 personality=0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102
#64 names with personality works
loadrt logic names=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63 personality=0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102,0x102
Last edit: 24 Sep 2019 03:30 by Nico2017.
Please Log in or Create an account to join the conversation.
24 Sep 2019 03:32 #146024
by dgarrett
Replied by dgarrett on topic HAL names - 16 argument limit?
There is a commit aimed at supporting realtime components
that depend on prior load of loadusr compoents:
github.com/LinuxCNC/linuxcnc/commit/b03ca613f9ea501708
also, this commit supports backslash line extends:
github.com/LinuxCNC/linuxcnc/commit/0e515b9a6
both commits are applied in the 2.8 and master branches
For other problems, the twopass docs give a method to
workround problems with unusal/nonconforming hal files:
linuxcnc.org/docs/2.8/html/hal/twopass.html
explain how to exclude a halfile from twopass processing:
linuxcnc.org/docs/2.8/html/hal/twopass.html#_exluding_hal_files
Ref:
that depend on prior load of loadusr compoents:
github.com/LinuxCNC/linuxcnc/commit/b03ca613f9ea501708
also, this commit supports backslash line extends:
github.com/LinuxCNC/linuxcnc/commit/0e515b9a6
both commits are applied in the 2.8 and master branches
For other problems, the twopass docs give a method to
workround problems with unusal/nonconforming hal files:
linuxcnc.org/docs/2.8/html/hal/twopass.html
explain how to exclude a halfile from twopass processing:
linuxcnc.org/docs/2.8/html/hal/twopass.html#_exluding_hal_files
Ref:
$ git branch --contains b03ca613f9
2.8
* master
...
$ git branch --contains 0e515b9a6
2.8
* master
...
The following user(s) said Thank You: Nico2017
Please Log in or Create an account to join the conversation.
24 Sep 2019 03:39 - 24 Sep 2019 04:05 #146026
by dgarrett
Replied by dgarrett on topic HAL names - 16 argument limit?
ref: linuxcnc.org/docs/2.8/html/man/man1/halcompile.1.html
(sudo needed if using deb install, not reqd (or recommended)
for non-root RIP usage)
By default, the maximum number of personalities is
64. To alter this limit, use the --personalities=
option with halcompile. For example, to set the
maximum of personality items to 4:
sudo halcompile --personalities=4 --install
(sudo needed if using deb install, not reqd (or recommended)
for non-root RIP usage)
Last edit: 24 Sep 2019 04:05 by dgarrett.
The following user(s) said Thank You: Nico2017
Please Log in or Create an account to join the conversation.
24 Sep 2019 03:41 #146027
by Nico2017
Replied by Nico2017 on topic HAL names - 16 argument limit?
As a note also, I have identified in src/hal/hal.h, so of course better not putting too long names:
Thanks @dgarrett for your help
Nicolas
#define HAL_NAME_LEN 47 /* length for pin, signal, etc, names */
Thanks @dgarrett for your help
Nicolas
Please Log in or Create an account to join the conversation.
24 Sep 2019 03:52 - 24 Sep 2019 03:54 #146028
by dgarrett
Replied by dgarrett on topic HAL names - 16 argument limit?
There are numerous string (and memory) limits that may prevent
very long line processing even with backslash line continuation.
With twopass, the need for very long lines could/should be
mitigated.
These features are lightly tested, so the error messages may not
be fully explanatory
very long line processing even with backslash line continuation.
With twopass, the need for very long lines could/should be
mitigated.
These features are lightly tested, so the error messages may not
be fully explanatory
Last edit: 24 Sep 2019 03:54 by dgarrett.
Please Log in or Create an account to join the conversation.
Time to create page: 0.073 seconds