-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetZprox.sbp
More file actions
47 lines (42 loc) · 1.85 KB
/
SetZprox.sbp
File metadata and controls
47 lines (42 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
'Routine to Manually Set Offset Height for Z-Prox Switch Zeroing (Useful for Handibots without ZZero)
'Recent ShopBot Updates
' 06/17/14 th Created
'Initialize
SF,0 'Turn off limit checking temporarily here
'Confirm Spindles OFF
SO, 1, 0
SO, 2, 0
'Determine whether we are in Preview mode or Move/Cut mode
&modenow = %(22)
IF &modenow = 1 then GoTo CHANGEMODE
'Determine whether we are in the correct UNITS
IF &my_units <> %(25) Then GoTo CHANGEUNITS
'Load variables from my_variables.sbc, process called by Custom Cut 90
C#,90
VN, 0 'Deactivate the limit switch functionality on input #3
'Create a few useful variables
&Ztrgt = 3 'Input for Desktops and Handibot
&TrgtHIT = 1 'Switch Condition for
&MoveBackDownBy = .5
'NOW... Go to Work >>>> Make Move from where we are to Z Prox
'You should be starting this file with the Z-axis Zeroed for this cutter.
ON INP(&Ztrgt,&TrgtHIT) GoSub Z_IsTopped
MZ, 8 ' ... arbitrary height just to make sure we hit top
END 'Leave program if no hit!
'SUBROUTINES============================================================================================
Z_IsTopped:
ON INP(&Ztrgt,&TrgtHIT)
&my_XYzeroOffsetZ = %(3)
MZ, %(3)- &MoveBackDownBy
SHELL, "C:\SbParts\Custom\MyVars.exe [&]my_XYzeroOffsetZ = &my_XYzeroOffsetZ"
'Prox Location Now Saved for THIS CUTTER ...
PAUSE
RETURN
CHANGEMODE:
'Tool won't Set Prox in Preview Mode. Quit and change Move/Cut mode ...
PAUSE
END
CHANGEUNITS:
'You are using a different unit system (inches/millimeters) than you used when this program was set up. Exiting ...
PAUSE
END