Visualizing hal nets with graphviz
05 Nov 2011 13:01 #14592
by kostas
Visualizing hal nets with graphviz was created by kostas
I'm learning some python and I needed a quick hack to get a visual map on hal nets, so I made this little python script that reads input from "halcmd show" and outputs a graphviz file. Maybe you will find it useful.
You need to:
1) install graphviz, using "sudo apt-get install graphviz"
2) download the hal_sigs_graphviz.py attachment in a directory of your choice.
3) make a shell script inside the same dir, with the following lines in it and run it:
Attached is an example of what I get when running it with my (stepconf generated) hal configuration I use on my first cnc router. Tables are components and circles are nets.
I will probably add more features like colors and some fine tuning on how graphviz outputs the image, when I find some time to learn more about this excellent application. But it's probably good enough for a quick visualization as it is now.
You need to:
1) install graphviz, using "sudo apt-get install graphviz"
2) download the hal_sigs_graphviz.py attachment in a directory of your choice.
3) make a shell script inside the same dir, with the following lines in it and run it:
halcmd -s show pin | grep "==" > pin.out
halcmd -s show sig | grep -v "^$" > sig.out
python hal_sigs_graphviz.py > gv.in
dot -Tpng gv.in > gv.png
Attached is an example of what I get when running it with my (stepconf generated) hal configuration I use on my first cnc router. Tables are components and circles are nets.
I will probably add more features like colors and some fine tuning on how graphviz outputs the image, when I find some time to learn more about this excellent application. But it's probably good enough for a quick visualization as it is now.
Please Log in or Create an account to join the conversation.
05 Nov 2011 13:05 #14594
by kostas
Replied by kostas on topic Visualizing hal nets with graphviz
Forum does not let me attach a .py file, so I renamed it as .txt. You need to rename it back as a .py
I also had to resize the image file.
I also had to resize the image file.
Please Log in or Create an account to join the conversation.
29 Mar 2022 13:57 #238609
by Muecke
Replied by Muecke on topic Visualizing hal nets with graphviz
-- DE --
DANKE für das kleine jedoch sehr Effiziente Tool.
Es hilft mir sehr die HAL Daten einzuordnen was ich erstelle oder auch nicht .
DANKE, machen Sie weiter so!
Beim Ausführen hatte ich Probleme, mir war nicht bewusst das LinuxCNC gestartet sein muss. Es wird die Aktuelle HAL von LinuxCNC dargestellt.
-- EN --
THANK YOU for the small but very efficient tool.
It helps me a lot to classify the HAL data what I create or not .
THANK YOU, keep up the good work!
I had problems running it, I wasn't aware that LinuxCNC had to be started. The current HAL of LinuxCNC is displayed.
DANKE für das kleine jedoch sehr Effiziente Tool.
Es hilft mir sehr die HAL Daten einzuordnen was ich erstelle oder auch nicht .
DANKE, machen Sie weiter so!
Beim Ausführen hatte ich Probleme, mir war nicht bewusst das LinuxCNC gestartet sein muss. Es wird die Aktuelle HAL von LinuxCNC dargestellt.
-- EN --
THANK YOU for the small but very efficient tool.
It helps me a lot to classify the HAL data what I create or not .
THANK YOU, keep up the good work!
I had problems running it, I wasn't aware that LinuxCNC had to be started. The current HAL of LinuxCNC is displayed.
The following user(s) said Thank You: kostas
Please Log in or Create an account to join the conversation.
30 Mar 2022 18:33 - 03 Apr 2022 08:17 #238783
by Muecke
Replied by Muecke on topic Visualizing hal nets with graphviz
Last edit: 03 Apr 2022 08:17 by Muecke.
Please Log in or Create an account to join the conversation.
Time to create page: 0.067 seconds