- Posts: 29
- Thank you received: 0
Convert a .tcl file to the equivalent .hal
8 years 3 months ago #113421
by kostas
Convert a .tcl file to the equivalent .hal was created 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
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.
8 years 3 months ago #113423
by dgarrett
Replied by dgarrett on topic Convert a .tcl file to the equivalent .hal
You can use the 'save' command of halcmd
Example, to generate a hal file of all commands (while linuxcnc is running):
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
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.
8 years 3 months ago #113457
by kostas
Replied by kostas on topic Convert a .tcl file to the equivalent .hal
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
