-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom.hal
109 lines (84 loc) · 3.28 KB
/
custom.hal
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Include your custom HAL commands here
# This file will not be overwritten when you run PNCconf again
# Edits
loadrt and2 count=2
loadrt or2 count=1
loadrt debounce cfg=2
#loadrt not count=1
addf and2.0 servo-thread
addf and2.1 servo-thread
addf or2.0 servo-thread
#addf not.0 servo-thread
addf debounce.0 servo-thread
# ------Machine Enable Input------
net machine-enable <= hm2_7i76e.0.7i76.0.0.input-08-not
#net machine-enable => motion.enable
net machine-enable => halui.machine.on
# ------Spindle dir------
#net spindle-fb-rpm-abs-filtered => qtpyvcp.spindle-encode-rpm.in
# --- SPINDLE-CW ---
setp hm2_7i76e.0.gpio.023.is_output true
setp hm2_7i76e.0.gpio.023.is_opendrain true
net mesaSpindleFWD => hm2_7i76e.0.gpio.023.out
setp hm2_7i76e.0.gpio.023.invert_output true
# --- SPINDLE-CCW ---
setp hm2_7i76e.0.gpio.024.is_output true
setp hm2_7i76e.0.gpio.024.is_opendrain true
net mesaSpindleREV => hm2_7i76e.0.gpio.024.out
setp hm2_7i76e.0.gpio.024.invert_output true
net spindle-enable and2.0.in0
net spindle-cw and2.0.in1
net mesaSpindleFWD and2.0.out
net spindle-enable and2.1.in0
net spindle-ccw and2.1.in1
net mesaSpindleREV and2.1.out
# ------Alarm Pins------
# --- X drive ALM ---
setp hm2_7i76e.0.gpio.028.is_output false
net x-fault => joint.0.amp-fault-in <= hm2_7i76e.0.gpio.028.in_not
# --- X2 drive ALM ---
setp hm2_7i76e.0.gpio.029.is_output false
net x2-fault => joint.1.amp-fault-in <= hm2_7i76e.0.gpio.029.in_not
# --- Y drive ALM ---
setp hm2_7i76e.0.gpio.030.is_output false
net y-fault => joint.2.amp-fault-in <= hm2_7i76e.0.gpio.030.in_not
# --- Z drive ALM ---
setp hm2_7i76e.0.gpio.031.is_output false
net z-fault => joint.3.amp-fault-in <= hm2_7i76e.0.gpio.031.in_not
# --- A drive ALM ---
setp hm2_7i76e.0.gpio.032.is_output false
net a-fault => joint.4.amp-fault-in <= hm2_7i76e.0.gpio.032.in_not
# --- Spindle ALM ---
net spindle-fault => spindle.0.amp-fault-in <= hm2_7i76e.0.7i76.0.0.input-07-not
# --- Drive Enables ---
setp hm2_7i76e.0.gpio.019.is_output true
setp hm2_7i76e.0.gpio.019.is_opendrain true
net machine-is-enabled => hm2_7i76e.0.gpio.019.out
setp hm2_7i76e.0.gpio.019.invert_output true
# ---coolant signals---
net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood
setp hm2_7i76e.0.gpio.021.is_output true
setp hm2_7i76e.0.gpio.021.is_opendrain true
net coolant-flood => hm2_7i76e.0.gpio.021.out
setp hm2_7i76e.0.gpio.021.invert_output true
setp hm2_7i76e.0.gpio.022.is_output true
setp hm2_7i76e.0.gpio.022.is_opendrain true
net coolant-mist => hm2_7i76e.0.gpio.022.out
setp hm2_7i76e.0.gpio.022.invert_output true
setp hm2_7i76e.0.gpio.020.is_output true
setp hm2_7i76e.0.gpio.020.is_opendrain true
net spindle-enable => hm2_7i76e.0.gpio.020.out
setp hm2_7i76e.0.gpio.020.invert_output true
net probe-TLO => hm2_7i76e.0.7i76.0.0.input-06-not
setp debounce.0.delay 20
net probe-TLO => debounce.0.0.in
net probe-TLO-overtravel => hm2_7i76e.0.7i76.0.0.input-05
net probe-TLO-debounced => debounce.0.0.out
net probe-TOUCH => hm2_7i76e.0.gpio.026.in
net probe-TLO-debounced => or2.0.in0
net probe-TOUCH => debounce.0.1.in
net probe-TOUCH-debounced => debounce.0.1.out
net probe-TOUCH-debounced => or2.0.in1
net probe-in => or2.0.out
#net probe-in => debounce.0.0.out