HAL names - 16 argument limit?

More
7 years 9 months ago #125098 by Mike_Eitel
Nope, no misunderstanding, just clarification of bounderies.

And yes, if it has no side effects, I would prefer to see final 2.8 with bigger number than 16. At least in dimple logic elements like and / or etc.

m5c
Mike
The following user(s) said Thank You: Nico2017

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

More
More
7 years 8 months ago #125630 by Nico2017
Mhmm,

actually when I also use count definition I would face the 16 items limitation. For instance with
loadrt logic count=17 personality=0x103,0x203,0x1003,0x1003,0x108,0x108,0x106,0x106,0x803,0x108,0x203,0x107,0x107,0x107,0x106,0x106,0x203

So the 16 items limitation has been reach here using the count feature.

logic is actually useful when you start to have safety on some of your features machine so I guess it is actually easy to reach this limitation.

As Mike is saying, would be nice if it has no side effects [...] to see final 2.8 with bigger number than 16

Nicolas

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

More
7 years 8 months ago #126214 by mjohnston
Nicolas,

I believe it is actually the personality parameter that has the 16 item limitation. If you use for example
loadrt and2 count=20
it will succeed. Of course that doesn't help if you're trying to use the logic component, since personality is essentially required then.
The following user(s) said Thank You: Nico2017

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

More
7 years 8 months ago #126261 by dgarrett
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
The following user(s) said Thank You: Mike_Eitel, tommylight, Nico2017

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

More
7 years 1 month ago #146021 by Nico2017
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

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

Time to create page: 0.129 seconds
Powered by Kunena Forum