Arithmetic in .ini and .hal files

More
10 Mar 2023 19:34 #266323 by frogandspanner
Arithmetic in .ini and .hal files was created by frogandspanner
Rather than doing dynamic arithmetic in hal, which is suitable for variables, there are some constants that I'd like to do arithmetic on to become a constant to be a setp on a pin.

e.g. something like
MYCONSTANT=MAX_LINEAR_VELOCITY*25.4

Is this possible?

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

More
11 Mar 2023 08:09 #266382 by TOLP2
Replied by TOLP2 on topic Arithmetic in .ini and .hal files
As far as I know this is not possible, would be a great improvement.

For now, I just write modified components for my Hal, which do have a param or pin to set for example the scale.

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

More
11 Mar 2023 08:16 #266384 by phillc54
Replied by phillc54 on topic Arithmetic in .ini and .hal files
It is possible to use haltcl files 
linuxcnc.org/docs/devel/html/hal/haltcl.html
 

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

Time to create page: 0.048 seconds
Powered by Kunena Forum