Insufficient memory for signal/pin

More
08 Aug 2017 20:50 #97204 by Nico2017
I have got a lot:
2198 pins
887 signals

The error message is: HAL: ERROR: insufficient memory for signal 'name-of-signal'. So I guess the number of signal is too important. When I comment some of the signals required the message goes off and linuxCNC works no matter the latest component which was loaded. So I think it is really the amount of signal which is part of the issue.

Any way to increase the memory for the HAL program, if yes, how can I do that? I have been trying to modify the /etc/security/limits.d/limits.conf without any results.

Thanks

Nicolas

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

More
08 Aug 2017 22:28 #97213 by andypugh
You might be able to save some space by turning off unused functions. I am assuming that with that many pins this is not a parallel-port based system?

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

More
08 Aug 2017 22:51 #97215 by andypugh
You might have to edit this entry and recompile:

github.com/LinuxCNC/linuxcnc/blob/master.../hal/hal_priv.h#L331

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

More
09 Aug 2017 00:35 #97223 by Nico2017
Should I modify the HAL KEY or the HAL_SIZE? And which value should I put to modify one of this, especially if it is the HAL key which need to be modified.

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

More
09 Aug 2017 09:17 #97233 by andypugh
It would be the size, you certainly don't want to be changing the key.

Is there any possibility of reducing the pin count by modifying the loadrt parameters of some components?

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

More
09 Aug 2017 19:45 #97258 by Nico2017
At the moment I am still in the development phase, so I am still creating lots of pins and would like to be able to extend the memory. Surely will do a bit of cleaning once I get a more finalized version of the hal configuration I will eventually used. But so far, all components are used and I can hardly reduce the amount of pins.

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

More
09 Aug 2017 20:34 - 09 Aug 2017 20:34 #97260 by andypugh
If you are using Mesa cards then you can turn off unused stepgens and encoders (for example).

But, other than that, no, if you load the components you get the pins.

However, I have never heard of anyone else runnoing out of HAL memory (recently) and so I wonder if there are things that could be done more efficiently, possibly with some simple custom components.
Last edit: 09 Aug 2017 20:34 by andypugh.

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

More
23 Jul 2018 03:11 #114682 by Nico2017
Hi,

thanks for your advice. I managed to achieve some additional function for my project, by removing some other hal components or their pins function that were not used. Nevertheless the project has become bigger and I am at the point where I have removed all non used component pins. So here we go, I need all the hal elements loaded on my project but if I add one additional pin to any component I got the Hal insufficient memory error message.

I guess I have now to increase the memory for the hal. Can you indicate me how to do that more precisely from the file you have indicated earlier, especially to be able to recompile only the required file related to hal without the compiling everything for linuxcnc.

Thank you,

Nicolas

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

More
23 Jul 2018 14:28 #114707 by cmorley
looking at git commit b9ac31f:
in src/hal/hal_priv.h
basically this
-define HAL_VER  0x0000000E
-define HAL_SIZE =(75*4096)
+define HAL_VER  0x0000000F
+define HAL_SIZE =(85*4096)

then recompile

Chris M

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

More
23 Jul 2018 20:46 #114721 by Nico2017
Hi,
so I guess my idea would be to compile only the .hal component if I want to keep the rest of LinuxCNC as it is. I would just then need to run a make on the hal component folder, is that it?

Nicolas

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

Time to create page: 0.119 seconds
Powered by Kunena Forum