Skip to content

Commit c063c2f

Browse files
committed
added tool touch off subroutine button with associated ngc file
1 parent 4385e9c commit c063c2f

File tree

2 files changed

+52
-34
lines changed

2 files changed

+52
-34
lines changed

config/probe_basic/subroutines/change.ngc renamed to config/probe_basic/subroutines/tool_touch_off.ngc

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
o<change> sub
2+
o<tool_touch_off> sub
33
;(debug, in change tool_in_spindle=#<tool_in_spindle> my_current_pocket=#<my_current_pocket>)
44
;(debug, selected_tool=#<selected_tool> selected_pocket=#<selected_pocket>)
55

@@ -8,17 +8,17 @@ o<change> sub
88
#<pocket> = #<selected_pocket>
99

1010
; we must execute this only in the milltask interpreter
11-
; or preview will break, so test for '#<_task>' which is 1 for
11+
; or preview will break, so test for '#<_task>' which is 1 for
1212
; the milltask interpreter and 0 in the UI's
1313
O100 if [#<_task> EQ 0]
1414
(debug, Task ist Null)
1515
O100 return [999]
1616
O100 endif
1717

1818
;first go up
19-
G53 G0 Z[#<_ini[CHANGE_POSITION]Z>]
19+
G53 G0 Z0
2020
; then move to change position
21-
G53 G0 X[#<_ini[CHANGE_POSITION]X>] Y[#<_ini[CHANGE_POSITION]Y>]
21+
G30
2222

2323
; cancel tool offset
2424
G49
@@ -27,18 +27,18 @@ G49
2727
M6
2828

2929
O200 if [#<_hal[gmoccapy.toolmeasurement]> EQ 0]
30-
O200 return [3] ; indicate no tool measurement
30+
O200 return [3] ; indicate no tool measurement
3131
O200 endif
3232

3333
G53 G0 X[#<_ini[TOOLSENSOR]X>] Y[#<_ini[TOOLSENSOR]Y>]
3434
G53 G0 Z[#<_ini[TOOLSENSOR]Z>]
3535

3636
O300 if [#<_hal[gmoccapy.searchvel]> LE 0]
37-
O300 return [-1] ; indicate searchvel <= 0
37+
O300 return [-1] ; indicate searchvel <= 0
3838
O300 endif
3939

4040
O400 if [#<_hal[gmoccapy.probevel]> LE 0]
41-
O400 return [-2] ; indicate probevel <= 0
41+
O400 return [-2] ; indicate probevel <= 0
4242
O400 endif
4343

4444
F #<_hal[gmoccapy.searchvel]>
@@ -58,7 +58,7 @@ G90
5858
G53 G0 Z[#<_ini[CHANGE_POSITION]Z>]
5959

6060
#<touch_result> = #5063
61-
#<probeheight> = #<_hal[gmoccapy.probeheight]>
61+
#<probeheight> = #<_hal[gmoccapy.probeheight]>
6262
#<blockheight> = #<_hal[gmoccapy.blockheight]>
6363

6464
;(DEBUG, #<touch_result> #<probeheight> #<blockheight>)
@@ -70,6 +70,4 @@ G43
7070
;G10 L2 P0 Z[#<workpieceheight> + #<probeheight> + #<touch_result>]
7171

7272
; signal success be returning a value > 0:
73-
o<change> endsub [1]
74-
75-
73+
o<tool_touch_off> endsub [1]

probe_basic/probe_basic.ui

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ bottom-margin: 0px;
224224
<enum>QTabWidget::South</enum>
225225
</property>
226226
<property name="currentIndex">
227-
<number>0</number>
227+
<number>3</number>
228228
</property>
229229
<widget class="QWidget" name="main_tab">
230230
<attribute name="title">
@@ -6382,36 +6382,56 @@ color: rgb(255, 255, 255);
63826382
<number>2</number>
63836383
</property>
63846384
<item>
6385-
<widget class="ActionButton" name="m01_break_button_29">
6386-
<property name="sizePolicy">
6387-
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
6388-
<horstretch>0</horstretch>
6389-
<verstretch>0</verstretch>
6390-
</sizepolicy>
6391-
</property>
6385+
<widget class="SubCallButton" name="tool_touch_off_button">
63926386
<property name="minimumSize">
63936387
<size>
6394-
<width>150</width>
6388+
<width>145</width>
63956389
<height>45</height>
63966390
</size>
63976391
</property>
6398-
<property name="maximumSize">
6399-
<size>
6400-
<width>16777215</width>
6401-
<height>45</height>
6402-
</size>
6403-
</property>
6404-
<property name="focusPolicy">
6405-
<enum>Qt::NoFocus</enum>
6406-
</property>
64076392
<property name="styleSheet">
64086393
<string notr="true">QPushButton {
6409-
font: 16pt &quot;Bebas Kai&quot;;
6410-
}</string>
6394+
color: white;
6395+
border-color: black;
6396+
border-style: solid;
6397+
border-radius: 5px;
6398+
border-width: 2px;
6399+
background: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(213, 218, 216, 255), stop:0.169312 rgba(82, 82, 83, 255), stop:0.328042 rgba(72, 70, 73, 255), stop:0.492063 rgba(78, 77, 79, 255), stop:0.703704 rgba(72, 70, 73, 255), stop:0.86 rgba(82, 82, 83, 255), stop:1 rgba(213, 218, 216, 255));
6400+
}
6401+
6402+
QPushButton {
6403+
font-family: &quot;Bebas Kai&quot;;
6404+
font-size: 16pt;
6405+
}
6406+
6407+
QPushButton:disabled {
6408+
border-color: gray;
6409+
}
6410+
6411+
QPushButton:hover {
6412+
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
6413+
stop: 0 #A19E9E, stop: 1.0 #5C5959);
6414+
}
6415+
6416+
QPushButton:pressed {
6417+
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(85, 85, 238, 255), stop:0.544974 rgba(90, 91, 239, 255), stop:1 rgba(126, 135, 243, 255));
6418+
}
6419+
6420+
QPushButton:checked[option=&quot;true&quot;] {
6421+
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(85, 85, 238, 255), stop:0.544974 rgba(90, 91, 239, 255), stop:1 rgba(126, 135, 243, 255));
6422+
}
6423+
6424+
QPushButton:checked {
6425+
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(85, 85, 238, 255), stop:0.544974 rgba(90, 91, 239, 255), stop:1 rgba(126, 135, 243, 255));
6426+
}
6427+
</string>
64116428
</property>
64126429
<property name="text">
64136430
<string>TOUCH OFF CURRENT TOOL</string>
64146431
</property>
6432+
<property name="filename" stdset="0">
6433+
<string>tool_touch_off.ngc</string>
6434+
</property>
64156435
</widget>
64166436
</item>
64176437
</layout>
@@ -27633,12 +27653,12 @@ font: 11pt bebas kai;
2763327653
</designerdata>
2763427654
<buttongroups>
2763527655
<buttongroup name="proberoutinebtnGroup"/>
27636-
<buttongroup name="mainorthoperspbtnGroup"/>
27637-
<buttongroup name="probemodeGroup"/>
2763827656
<buttongroup name="probetabGroup"/>
27657+
<buttongroup name="mainorthoperspbtnGroup"/>
27658+
<buttongroup name="plotviewGroup"/>
2763927659
<buttongroup name="xycalbtnGroup"/>
2764027660
<buttongroup name="plotorthoperspbtnGroup"/>
27661+
<buttongroup name="probemodeGroup"/>
2764127662
<buttongroup name="probehelpGroup"/>
27642-
<buttongroup name="plotviewGroup"/>
2764327663
</buttongroups>
2764427664
</ui>

0 commit comments

Comments
 (0)