Convert a .tcl file to the equivalent .hal

More
8 years 3 months ago #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 to join the conversation.

More
8 years 3 months ago #113423 by dgarrett
You can use the 'save' command of halcmd

Example, to generate a hal file of all commands (while linuxcnc is running):
Code:
$ 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

Please Log in to join the conversation.

More
8 years 3 months ago #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 to join the conversation.

Time to create page: 0.085 seconds
Powered by Kunena Forum