- LinuxCNC
- General LinuxCNC Questions
- Storing global values in Gcode (Variable tool length sensor z-position)
Storing global values in Gcode (Variable tool length sensor z-position)
- mark0815
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
10 Jul 2020 20:15 #174264
by mark0815
Storing global values in Gcode (Variable tool length sensor z-position) was created by mark0815
I added a tool length sensor to the table of mill to populate the tool length of my BT tool holders.
As the machine does not have encoders and therefor needs to be homed on every start the z-position of the switch tripping point varies on every startup due to the inherent inaccuracy of the z-axis home switch.
My idea is to create a script letting the spindle nose trip the tool length switch and save the value.
Then the value will be used to measure the length of the individual tools.
Does someone has an idea where to store that z-offset so that it is available across Gcode scripts? It does not need to be persisted as the initial value has to be measured on every machine start.
Regards Mark
As the machine does not have encoders and therefor needs to be homed on every start the z-position of the switch tripping point varies on every startup due to the inherent inaccuracy of the z-axis home switch.
My idea is to create a script letting the spindle nose trip the tool length switch and save the value.
Then the value will be used to measure the length of the individual tools.
Does someone has an idea where to store that z-offset so that it is available across Gcode scripts? It does not need to be persisted as the initial value has to be measured on every machine start.
Regards Mark
Please Log in or Create an account to join the conversation.
- MaHa
- Offline
- Platinum Member
Less
More
- Posts: 405
- Thank you received: 163
10 Jul 2020 20:56 #174271
by MaHa
Replied by MaHa on topic Storing global values in Gcode (Variable tool length sensor z-position)
Numbered is always global, as #111. Named <#local> or #<_global>. #5063 (G38.n) return value. #111 = #5063 or #<_probnose> = #5063, this global parameter can be used in your gcode.
Please Log in or Create an account to join the conversation.
- mark0815
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
11 Jul 2020 14:35 #174305
by mark0815
Replied by mark0815 on topic Storing global values in Gcode (Variable tool length sensor z-position)
Thanks a lot!
/Mark
/Mark
Please Log in or Create an account to join the conversation.
- LinuxCNC
- General LinuxCNC Questions
- Storing global values in Gcode (Variable tool length sensor z-position)
Time to create page: 0.045 seconds