-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmesa7i92io.hal
140 lines (124 loc) · 5.38 KB
/
mesa7i92io.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Define signals connected to mesa 7i92T gpio and any necessary conditioning.
#
# Basic motion control signals:
# max-home-x
# max-home-y
# max-home-y2
# max-home-z
# G540-fault
# laser cross-hair enable?
#
# Additional signals for Laser control:
# Laser enable.
# Air Compressor relay
# Laser PWM. (automatically connected by PWM to G540 VFD PWM pin.)
#
# Additional signas for Plasma control:
# Plasma enable.
# Breakaway input.
# THCAD arc height. (automatically connected by encode to G50 XXX pin.)
# THCAD ohmic sense. (automatically connected by encoder to G540 XXX pin.)
#
#
# Add debounce filtering for inputs which were giving erroneous signals.
#
loadrt debounce cfg=4
addf debounce.0 servo-thread
setp debounce.0.delay 20
#
# Mesa 7i92T P2 Connector to G540.
#
# OUTPUT_1 and OUTPUT_2 are still available.
#
# IO Pin 000 (P2-01): gpio.000 OUTPUT_2
# IO Pin 001 (P2-14): pwmgen.00.Out0
# IO Pin 002 (P2-02): stepgen.00. step
# IO Pin 003 (P2-15): gpio.003 G540 fault.
# IO Pin 004 (P2-03): StepGen #0, pin Direction (Output)
# IO Pin 005 (P2-16): StepGen #4, pin Step (Output)
# IO Pin 006 (P2-04): StepGen #1, pin Step (Output)
# IO Pin 007 (P2-17): gpio.007 OUTPUT_1
# IO Pin 008 (P2-05): StepGen #1, pin Direction (Output)
# IO Pin 009 (P2-06): StepGen #2, pin Step (Output)
# IO Pin 010 (P2-07): StepGen #2, pin Direction (Output)
# IO Pin 011 (P2-08): StepGen #3, pin Step (Output)
# IO Pin 012 (P2-09): StepGen #3, pin Direction (Output)
# IO Pin 013 (P2-10): encoder.00.A
# IO Pin 014 (P2-11): gpio.014 max-home-z
# IO Pin 015 (P2-12): gpio.015 max-home-y2-raw
# IO Pin 016 (P2-13): gpio.016 max-home-x
setp [HMOT](CARD0).gpio.000.is_output true
setp [HMOT](CARD0).gpio.007.is_output true
net OUTPUT_2 => [HMOT](CARD0).gpio.000.out
net G540-fault <= [HMOT](CARD0).gpio.003.in
net OUTPUT_1 => [HMOT](CARD0).gpio.007.out
net max-home-z <= [HMOT](CARD0).gpio.014.in
net max-home-y2-raw <= [HMOT](CARD0).gpio.015.in => debounce.0.1.in
net max-home-x <= [HMOT](CARD0).gpio.016.in
net max-home-y <= debounce.0.0.out
net max-home-y2 <= debounce.0.1.out
#
# Mesa 7i92T P1 Connector to 7i75 configured as a G540.
# STEP#5 Step, Direction, PWMGen#1.Out0, and Encoder#1.pinA are assigned by firmware the rest are available.
#
# P1 is subdivided into 6 Eight pin connectors. Keep related signals together. (7i75 IO numbers are off by 17.)
# I arranged these values to correspond to looking at the 7i75 board documentation.
#
# GND GND
# 5V 5V
# GND GND
# 5V 5V
# GND GND
# 5V 5V
# GND GND
# NC IO16 gpio.033
# GND GND
# IO7 gpio.032 IO6 gpio.031
# GND GND
# IO5 gpio.030 encoder.01.A IO4 gpio.029
# GND GND
# IO3 gpio.028 torch-breakaway IO2 gpio.027 probe-in
# GND GND
# IO1 gpio.026 plasma-on IO0 gpio.025 length-in
# GND GND
# IO7 gpio.024 laser-enable IO6 gpio.023 GS2-fault
# GND GND
# IO5 gpio.022 laser-air-relay IO4 gpio.021 StepGen.5.Direction
# GND GND
# IO3 gpio.020 laser-cross-hair IO2 gpio.019 StepGen.5.Step
# GND GND
# IO1 gpio.018 pwmgen.01.Out0 IO0 gpio.017 max-home-y-raw
setp [HMOT](CARD0).gpio.026.is_output true
setp [HMOT](CARD0).gpio.024.is_output true
setp [HMOT](CARD0).gpio.022.is_output true
setp [HMOT](CARD0).gpio.020.is_output true
#
# Relay board uses reverse logic. Pull low when you want to turn it on.
#
setp [HMOT](CARD0).gpio.024.invert_output true
setp [HMOT](CARD0).gpio.022.invert_output true
setp [HMOT](CARD0).gpio.020.invert_output true
#
# Reserve pins for stepgen.05 and encoder.01.A and
# still have 3 available gpio (io33, io31, io29) on P1.
#
net io33 <= [HMOT](CARD0).gpio.033.in
net plasma-arc-ok <= [HMOT](CARD0).gpio.032.in
#encoder.01.A <= [HMOT](CARD0).gpio.030.in
net torch-breakaway <= [HMOT](CARD0).gpio.028.in
net plasma-on => [HMOT](CARD0).gpio.026.out
net io31 <= [HMOT](CARD0).gpio.031.in
net io29 <= [HMOT](CARD0).gpio.029.in
net probe-in <= [HMOT](CARD0).gpio.027.in # Spiral corded.
net length-in <= [HMOT](CARD0).gpio.025.in # Long phone wire.
#
# Only turn on gpio.024 in spindle.hal configuration
#
#net spindle-enable => [HMOT](CARD0).gpio.024.out
net laser-air-relay <= [HMOT](CARD0).gpio.022.out
net laser-cross-hair => [HMOT](CARD0).gpio.020.out
#pwmgen.01.Out0 => [HMOT](CARD0).gpio.018.out
net GS2-fault <= [HMOT](CARD0).gpio.023.in # Short phone wire. True for open connection which is a fault.
#stepgen.05.dir => [HMOT](CARD0).gpio.021.out
#stepgen.05.step => [HMOT](CARD0).gpio.019.out
net max-home-y-raw <= [HMOT](CARD0).gpio.017.in => debounce.0.0.in