Convert a .tcl file to the equivalent .hal

More
04 Jul 2018 15:35 #113421 by kostas
Does anyone know if there is a way to process a .tcl file and generate the equivalent (after all the computations) static .hal file?
My use case is that I would like to have a template for a similar set of machines - for reducing duplication - and generate the appropriate .hal file for each machine.
This would help since it is easier for me to read a static description of the components and nets, rather than follow the program's logic each time to derive the final product.

Thanks,
Kostas

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

More
04 Jul 2018 15:51 #113423 by dgarrett
You can use the 'save' command of halcmd

Example, to generate a hal file of all commands (while linuxcnc is running):
$ halcmd save all >| all.hal

Ref:
linuxcnc.org/docs/2.7/html/man/man1/halcmd.1.html

Note: userland components (loaded with loadusr) are not handled by
the 'save' command so must be added separately
The following user(s) said Thank You: kostas

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

More
05 Jul 2018 06:15 #113457 by kostas
Thanks Dewey. That's a nice trick, although it needs a running machine. I was thinking something like a preprocessor of some kind, since this is something that needs to be done in the development phase.

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

Time to create page: 0.231 seconds
Powered by Kunena Forum