Convert a .tcl file to the equivalent .hal
04 Jul 2018 15:35 #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 or Create an account to join the conversation.
04 Jul 2018 15:51 #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):
$ 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.
05 Jul 2018 06:15 #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 or Create an account to join the conversation.
Time to create page: 0.068 seconds