- Posts: 226
- Thank you received: 0
The Parameters
1 year 1 month ago #334536
by JackRay
The Parameters was created by JackRay
Hello, I am writing G-code files with parameters O<measure> call [#1] [#2] ... and I cannot access certain variables in LinuxCNC 2.9.4 (e.g., <#_tool_diameter>). I need to read this data in my tool table in order to develop my program. Can anyone help me?Thank you.
Please Log in to join the conversation.
1 year 1 month ago #334545
by Aciera
Replied by Aciera on topic The Parameters
Not a lot to go on. Where are you assigning a value to what parameter, where are you trying to access it and what happens when you do?
Usually best to give a short example of what you are trying to do and describe what is not working as expected.
Usually best to give a short example of what you are trying to do and describe what is not working as expected.
Please Log in to join the conversation.
1 year 1 month ago #334978
by JackRay
Replied by JackRay on topic The Parameters
I am currently developing a parametric program (sub) to measure the exact dimensions of my tools. I need to read the theoretical diameter contained in the tool table that I use for my approaches. Thank you.
Please Log in to join the conversation.
1 year 1 month ago #335290
by JackRay
Replied by JackRay on topic The Parameters
Hello,
I need to acces at these set :DEBUG, Outil actif = #<tool>)
(DEBUG, Longueur outil = #<tool_length_offset>)
(DEBUG, Diamètre outil = #<tool_diameter>)
(DEBUG, Rayon outil = #<tool_radius>)
wihtout succes
Thanks
I need to acces at these set :DEBUG, Outil actif = #<tool>)
(DEBUG, Longueur outil = #<tool_length_offset>)
(DEBUG, Diamètre outil = #<tool_diameter>)
(DEBUG, Rayon outil = #<tool_radius>)
wihtout succes
Thanks
Please Log in to join the conversation.
1 year 1 month ago #335294
by MaHa
Replied by MaHa on topic The Parameters
This is for the loaded tool.
dont know how to read the tooltable with gcode. I'm affraid it's not possible.
(DEBUG, Outil actif = #5400)
(DEBUG, Longueur outil = #5403)
(DEBUG, Diamètre outil = #5410)
#<tool_radius> = [#5410 / 2]
(DEBUG, Rayon outil = #<tool_radius> )
dont know how to read the tooltable with gcode. I'm affraid it's not possible.
(DEBUG, Outil actif = #5400)
(DEBUG, Longueur outil = #5403)
(DEBUG, Diamètre outil = #5410)
#<tool_radius> = [#5410 / 2]
(DEBUG, Rayon outil = #<tool_radius> )
Please Log in to join the conversation.
1 year 1 month ago #335303
by JT
Replied by JT on topic The Parameters
You can use the loaded tool numbered or named parameters in G Code.
5400 - Tool Number. Volatile.
5401-5409 - Tool Offsets for X, Y, Z, A, B, C, U, V & W. Set by G43. Volatile.
5410 - Tool Diameter. Volatile.
5411 - Tool Front Angle. Volatile.
5412 - Tool Back Angle. Volatile.
5413 - Tool Orientation. Volatile.
#<_tool_offset> - Return 1 if tool offset (G43) is on, else 0.
#<_current_tool> - Return number of the current tool in spindle. Same as #5400.
#<_current_pocket> - Return the tool data index for the current tool.
#<_selected_tool> - Return number of the selected tool post a T code. Default -1.
#<_selected_pocket> - Return the tool data index of the selected pocket post a T code. Default -1 (no pocket selected).
You can use O Codes to do calculations.
linuxcnc.org/docs/stable/html/gcode/o-code.html
This might be a lot easier to do in Flex GUI where you can do calculations in Python.
JT
5400 - Tool Number. Volatile.
5401-5409 - Tool Offsets for X, Y, Z, A, B, C, U, V & W. Set by G43. Volatile.
5410 - Tool Diameter. Volatile.
5411 - Tool Front Angle. Volatile.
5412 - Tool Back Angle. Volatile.
5413 - Tool Orientation. Volatile.
#<_tool_offset> - Return 1 if tool offset (G43) is on, else 0.
#<_current_tool> - Return number of the current tool in spindle. Same as #5400.
#<_current_pocket> - Return the tool data index for the current tool.
#<_selected_tool> - Return number of the selected tool post a T code. Default -1.
#<_selected_pocket> - Return the tool data index of the selected pocket post a T code. Default -1 (no pocket selected).
You can use O Codes to do calculations.
linuxcnc.org/docs/stable/html/gcode/o-code.html
This might be a lot easier to do in Flex GUI where you can do calculations in Python.
JT
Please Log in to join the conversation.
Time to create page: 0.086 seconds
