Manual tool measurement procedure
19 Dec 2023 16:48 #288598
by MarkoPolo
Manual tool measurement procedure was created by MarkoPolo
I have a procedure in gtdragon (although it is not important) for measuring the tool length.
In ini, a remap of the M6 code was made that calls toolchange.ngc with the measurement procedure.
I also have a dialog box in python and TK as an interlude to have time to mount the touchpad.
Everything works fine, but I want to be able to skip the entire tool measurement procedure. I made an additional button for this purpose, which is displayed right at the beginning of the entire procedure.
How to pass information to linuxcnc from the dialog box to skip the toolchange.ngc procedure and continue working ? .
If I press "esc", it will end the entire task, not just the tool measurement.
Marek
In ini, a remap of the M6 code was made that calls toolchange.ngc with the measurement procedure.
I also have a dialog box in python and TK as an interlude to have time to mount the touchpad.
Everything works fine, but I want to be able to skip the entire tool measurement procedure. I made an additional button for this purpose, which is displayed right at the beginning of the entire procedure.
How to pass information to linuxcnc from the dialog box to skip the toolchange.ngc procedure and continue working ? .
If I press "esc", it will end the entire task, not just the tool measurement.
Marek
Please Log in or Create an account to join the conversation.
20 Dec 2023 01:43 #288635
by cmorley
Replied by cmorley on topic Manual tool measurement procedure
for versa probe we use a check button that controls a HAL bit pin.
In the remap:
O200 if [#<_hal[qtversaprobe.enable]> EQ 0]
(MSG, Auto Tool probe disabled )
G43
O200 return [3] ; indicate no tool measurement
O200 endif
is this to probe all the tools and fill in the tool table?
In the remap:
O200 if [#<_hal[qtversaprobe.enable]> EQ 0]
(MSG, Auto Tool probe disabled )
G43
O200 return [3] ; indicate no tool measurement
O200 endif
is this to probe all the tools and fill in the tool table?
Please Log in or Create an account to join the conversation.
20 Dec 2023 17:09 #288674
by MarkoPolo
Replied by MarkoPolo on topic Manual tool measurement procedure
No, I don't mean filling the tool table with dimensions.
I don't use versaprobe or basicprobe, I have my own measurement procedure so that after changing the tool I can measure the height in the Z axis.
If I press continue, the tool measurement procedure starts and it works fine.
If I run the program again and the tool is already measured, I want to skip the entire measurement process.
I want it to stop the measurement process and continue the program after pressing "Cancel, Continue without measuring the tool".
I want the toolchange.ngc code to be interrupted from this dialog and continue with my milling.
I don't use versaprobe or basicprobe, I have my own measurement procedure so that after changing the tool I can measure the height in the Z axis.
If I press continue, the tool measurement procedure starts and it works fine.
If I run the program again and the tool is already measured, I want to skip the entire measurement process.
I want it to stop the measurement process and continue the program after pressing "Cancel, Continue without measuring the tool".
I want the toolchange.ngc code to be interrupted from this dialog and continue with my milling.
Please Log in or Create an account to join the conversation.
21 Dec 2023 00:00 #288718
by cmorley
Replied by cmorley on topic Manual tool measurement procedure
Ok. Hopefully you can adapt my suggestion.
Please Log in or Create an account to join the conversation.
25 Dec 2023 20:34 #289042
by MarkoPolo
Replied by MarkoPolo on topic Manual tool measurement procedure
This code didn't help.
Well, unfortunately I'm tired, although the problem seems not to be complicated. I don't know gcode well.
In automatic mode I do not have access to the buttons in qtdragon.
The only buttons are from my dialog box.
All I want is to cancel the started ngc code with the tool measurement procedure from the button.
The beginning of my toolchange.ngc is like this:
O<tool_change> sub
M100 P10
o99 IF [#<_hal[qtdragon.led-probe]> EQ 0]
M100 P1
o99 ELSE
O<tool_change> endsub
o99 ENDIF
M100 P10 calls up a dialog box with buttons and here decides whether to continue the measurement or abandon the measurement.
Use the buttons to set the value of the "qtdragon.led-probe" diode, either 0 or 1.
If qtdragon.led-probe =0 I continue, if 1 I stop.
("qtdragon.led-probe" temporarily for now)
The problem is that the code is executed forward and the condition "o99 IF [#<_hal[qtdragon.led-probe]> EQ 0]" is checked before I press the appropriate button in my dialog.
How to solve this problem ?
Well, unfortunately I'm tired, although the problem seems not to be complicated. I don't know gcode well.
In automatic mode I do not have access to the buttons in qtdragon.
The only buttons are from my dialog box.
All I want is to cancel the started ngc code with the tool measurement procedure from the button.
The beginning of my toolchange.ngc is like this:
O<tool_change> sub
M100 P10
o99 IF [#<_hal[qtdragon.led-probe]> EQ 0]
M100 P1
o99 ELSE
O<tool_change> endsub
o99 ENDIF
M100 P10 calls up a dialog box with buttons and here decides whether to continue the measurement or abandon the measurement.
Use the buttons to set the value of the "qtdragon.led-probe" diode, either 0 or 1.
If qtdragon.led-probe =0 I continue, if 1 I stop.
("qtdragon.led-probe" temporarily for now)
The problem is that the code is executed forward and the condition "o99 IF [#<_hal[qtdragon.led-probe]> EQ 0]" is checked before I press the appropriate button in my dialog.
How to solve this problem ?
Please Log in or Create an account to join the conversation.
25 Dec 2023 21:39 #289045
by cmorley
Replied by cmorley on topic Manual tool measurement procedure
Can you post your config files?
Please Log in or Create an account to join the conversation.
25 Dec 2023 22:59 #289052
by MarkoPolo
Replied by MarkoPolo on topic Manual tool measurement procedure
I am sending the ini of the machine, the rest of the files are standard from the default configuration, but if necessary, I will send what I need.
The 3 measurement procedure files are located in nc_files
The 3 measurement procedure files are located in nc_files
Please Log in or Create an account to join the conversation.
26 Dec 2023 23:56 #289131
by MarkoPolo
Replied by MarkoPolo on topic Manual tool measurement procedure
Problem solved.
I put "M6" before the condition and everything started working properly.
O<tool_change> sub
M100 P10
M6
o99 IF [#<_hal[qtdragon.led-probe]> EQ 0]
M100 P0
o99 ELSE
O<tool_change> endsub
o99 ENDIF
I still need to create a new pin to switch the values.
Unless it can be done more simply, without switching the pin?
I put "M6" before the condition and everything started working properly.
O<tool_change> sub
M100 P10
M6
o99 IF [#<_hal[qtdragon.led-probe]> EQ 0]
M100 P0
o99 ELSE
O<tool_change> endsub
o99 ENDIF
I still need to create a new pin to switch the values.
Unless it can be done more simply, without switching the pin?
Please Log in or Create an account to join the conversation.
27 Dec 2023 00:15 #289133
by cmorley
Replied by cmorley on topic Manual tool measurement procedure
Nice! I was thinking you would need to expand your remap to python code. that's much easier.
You could use a variable but I'm not sure how you can easily set the variable from a dialog.
You could use a variable but I'm not sure how you can easily set the variable from a dialog.
Please Log in or Create an account to join the conversation.
27 Dec 2023 00:44 #289134
by MarkoPolo
Replied by MarkoPolo on topic Manual tool measurement procedure
I just made a signal in postgui.hal
"newsig measurement bit" and I switch its state, everything works fine.
Thanks for showing interest.
Soon I will write a little about the proposed minor corrections in qtdragon in a good old thread...
"newsig measurement bit" and I switch its state, everything works fine.
Thanks for showing interest.
Soon I will write a little about the proposed minor corrections in qtdragon in a good old thread...
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.101 seconds