How to generate comments to KRL-code

Started by Henri_A, April 19, 2021, 09:25:28 AM

Previous topic - Next topic

Henri_A

Hi,

I have milling programs of about 10-20 lines/polylines that I use for trimming the edges of composite parts. It would be very useful to have a name (or any id) of each line as a comment at my KRL-code in front of the movements of the line.

I haven't found a way to do that, but I'm beginner with GH, so this is maybe a piece of cake for someone more skilled?

I'm very grateful for all help!

Br, Henri

Johannes @ Robots in Architecture

Hello Henri,

Here is an example how that could be done, it puts the length of each path into a comment. Of course that would also work with IDs etc.
LIN {X 88.173, Y 74.122, Z 0, A 0, B 90, C 21.114, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {X 89.288, Y 74.122, Z 0, A 0, B 90, C 21.066, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {X 89.288, Y 74.122, Z 20, A 0, B 90, C 21.066, E1 0, E2 0, E3 0, E4 0}
;Path length: 50
LIN {X 71.788, Y 74.122, Z 20, A 0, B 90, C 21.829, E1 0, E2 0, E3 0, E4 0}
LIN {X 71.788, Y 74.122, Z 0, A 0, B 90, C 21.829, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {X 71.788, Y 72.51, Z 0, A 0, B 90, C 22.011, E1 0, E2 0, E3 0, E4 0} C_DIS
LIN {X 71.788, Y 70.897, Z 0, A 0, B 90, C 22.191, E1 0, E2 0, E3 0, E4 0} C_DIS


This might cause issues with an older community version, let me know if you get an error message or if the robot disappears. The reason for that would be providing a Custom KRL before a movement command at the very beginning. This is fixed in the member release.

Best,
Johannes

Henri_A

Thank you Johannes!
This is exactly what I was looking for!

Br, Henri